Tag: Nextcloud

  • Upgrading Nextcloud installation on shared Kapsi server

    Upgrading Nextcloud installation on shared Kapsi server

    In case you have very old Nextcloud installation on Kapsi server, it may stop working after the PHP version is upgraded on Kapsi servers. In thta case you may see a error message like:

    This version of Nextcloud is not compatible with > PHP 7.2.
    You are currently running 7.3.21-1+0~20200807.66+debian10~1.gbp18a1c2.

    It is generally good idea to keep the cloud service software up to date, but in case you have forgotten to upgrade it, here is a short guide how to do it manually on a shared host using command line tool.

    Usually I use Linux command line. But because I thought there might be also Windows users facing this problem, I show how to upgrade the Nextcloud instance using PuTTY on Windows. On linux machine you can do the same with the regular terminal app.

    On Windows, download and install PuTTY software which allows you to create connection to your file base on Kapsi server. You can find the latest version here. After installation, open up PuTTY and type the Kapsi server location you aim to connect to. Then hit “Open”.

    You need to type in your Kapsi username and password. After that you will see the welcome screen and you are able to navigate inside the file system. If you are new to command line, use the following tips to navigate:

    ls = shows folders in the current location

    cd xxx = enter to “xxx” folder

    cd .. = go back one step in the directory hierarchy

    Navigate to the parent folder that directly holds the one directory containing the outdated Nextcloud installation files. When you are located in the parent folder, it is time to download the installation package. You may use the following command, but adjust the version number:

    wget https://download.nextcloud.com/server/releases/nextcloud-19.0.1.zip

    Note! The version in the command above is the latest one at the time of writing this, you should check the version you want to install. The easiest way is to copy the link from the website:

    After the download is finished, unzip the package.

    unzip nextcloud-19.0.1.zip

    Then rename the old parent directory that contains the current Nextclud installation to something “-old”. You can do it by typing for example:

    mv ~/siilo/sites/xxxx-siilo.kapsi.fi/www/ ~/siilo/sites/xxxx-siilo.kapsi.fi/www-old

    And then rename the downloaded updated file directory to same as your Nextcloud installation used to be before.

    mv ~/siilo/sites/xxxx-siilo.kapsi.fi/nextcloud/ ~/siilo/sites/xxxx-siilo.kapsi.fi/www

    Then we follow the original guidance provided by Nextcloud, I directly refer the website:

    Copy the config/config.php file from your old Nextcloud directory to your new Nextcloud directory. If you keep your data/ directory in your nextcloud/ directory, copy it from your old version of Nextcloud to your new nextcloud/. If you keep it outside of nextcloud/ then you don’t have to do anything with it, because its location is configured in your original config.php, and none of the upgrade steps touch it.

    (If you are new to command line: copying can be done with command cp or you can also move the files and folders. Always write the full source and target location after the command.)

    Check that your new folders have the same ownership and permissions. Permissions should be OK automatically if you followed this process but if you have problems, refer to Nextcloud manual for further details.

    Now we can run the occ upgrade command. Because Kapsi server is a shared host service and we do not have sudo-access to it, we cannot use the command Nextcloud manual suggests (sudo -u www-data php occ upgrade).

    As we know that Siilo server is using today (August 2020) PHP version 7.3. We can run the upgrade command by typing:

    /usr/bin/php7.3 occ upgrade

    If everything works as expected the PuTTY window should show multiple lines of green text as the upgrading process runs succesfully.

    Note: if you are trying to upgrade over multiple major releases, you may get error message. That is why you should always try keep your Nextcloud up to date.

  • Nextcloud Installation on Kapsi

    Nextcloud Installation on Kapsi

    This guide describes the installation steps of Nextcloud server on Kapsi shared hosting service. It covers two methods: the first is based on usage of software with graphical user-interface and the other is focusing on command line usage. The first is suitable for beginners and the latter for more advanced Linux users. At the end there is one common addition to be made, it is described under Configuration title.

    Installation using GUI:

    1. Go to Nextcloud download page.
    2. Click Download under the Get Nextcloud Server title.
    3. Select Web Installer (the link is located at middle of the lowest row of the popup window).
    4. Save the file on your computer (Step 1. in the instructions).
    5. Use FTPS client (Filezilla or similar) and open the connection to Kapsi server (Additional guidance in Finnish).
    6. Upload the setup-nextcloud.php file to /siilo/x/username/sites/yoursite-siilo.kapsi.fi/www/
    7. Open web browser and go to https://yoursite-siilo.kapsi.fi/setup-nextcloud.php, Nextcloud webinstaller appears to your screen.
    8. Click Next.
    9. If everything is ready for installation, the installer says: All Nextcloud dependencies found
    10. Here you can choose whether you want to install the software in a sub-folder or at the root of www -directory (in case just enter . to the box).
    11. Click Next.
    12. After few moments the installer says: Success, Nextcloud is now installed!
    13. Click Next.
    14. Create admin account by entering admin username and password.
    15. Click Storage & Database section, select MySQL/MariaDB
    16. Enter database information. Usually the database name and the user is same as your Kapsi username. The host address of Kapsi MySQL server is db1.n.kapsi.fi. If you do not have a personal password for database, you can ask for it from the Kapsi support (helpdesk@tuki.kapsi.fi).
    17. Installation is ready, see the configuration below.

    Installation using CLI:

    1. Open terminal.
    2. Type ssh username@kapsi.fi
    3. Enter your Kapsi password.
    4. Type cd siilo/sites/yoursite-siilo.kapsi.fi/www
    5. Typewget 'https://download.nextcloud.com/server/releases/nextcloud-12.0.3.tar.bz2'(Check the latest version)
    6. Type tar xvfj nextcloud-12.0.3.tar.bz2
    7. Open web browser and go to the Nextcloud location.
    8. Setup page appears, see the steps 10 -16 from GUI guide above.
    9. Installation is ready, see the configuration below.

    Configuration

    There are some adjustments to be done to make the internet traffic use https and allowing access from different ip-addresses if used with multiple devices. Open the .htacces file in installation directory. Add the following lines to the beginning of the file:

    RewriteEngine on
    RewriteCond %{ENV:HTTPS} !on
    RewriteRule (.*) https://yoursite-siilo.kapsi.fi/$1 [R=301,L]

    Then add the following lines to the very end of the file:

    IndexIgnore *
    <Limit GET POST PUT DELETE OPTIONS PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
    order allow,deny
    allow from all
    </Limit>

    In case you have security considerations related to this script that allows all traffic with all methods you may adjust your own setup which can be limited to particular ip-addresses or something else. However, even if all traffic is allowed, there is still the normal Nextcloud authentication system keeping the data safe from outsiders.

    Now we are all set. Hope you enjoy your very own Nextcloud server!

  • Nextcloud Client for Linux

    Nextcloud Client for Linux

    If you have been following the open source cloud storage software scene lately, you may know the history of ownCloud and Nextcloud. In short, Nextcloud is a fork of ownCloud, an open source project that consists of client and server software for creating and running file hosting services for personal and enterprise use. I personally understood that the project split up after some key persons could not share a same vision  regarding the level of having close source code for the enterprise customers. Since I may have totally misunderstood what it was all about, have a look at yourself: Nextcloud’s introduction and ownCloud’s statement about it.

    I am a huge fan of the project, I liked the idea of former ownCloud and later I got along with Nextcloud. However, all the software were available for all kinds of platform very shortly after the split up. I still missed the Nextcloud branded desktop client for Linux. There was a some sort of theming repository available but it was not straight forward to install for a less advanced user. And even today the default client in the “app stores” of many Linux distributions for this service is the original ownCloud branded client software.

    In case you have also being looking forward the Linux Nextcloud client, here they are, you can download it for Ubuntu/Debian as a PPA (explanation). To do so, use command line (open Terminal) and type:

    sudo add-apt-repository ppa:nextcloud-devs/client
    sudo apt-get update
    sudo apt install nextcloud-client

    Happy Nextclouding!