Press "Enter" to skip to content

Nextcloud Installation on Kapsi

8

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!

  1. Marko Ulvila Marko Ulvila

    Thanks a bunch! However, got stalled with the following error:

    “Error while trying to create admin user: There is no column with name ‘remember’ on table ‘oc_authtoken’. ”

    What to do?

    • jolahde jolahde

      Hi Marko,
      Since creating an admin account is the first task using your newly configured database connection, my first consider is related to db connection. However, usually if there is a problem with the db connection, the error message would something like “Failed to connect to the database” or similar.
      I checked that the “remember” column in the “oc_authtoken” table is a “small integer” data type, which should default to number “0”. I honestly do not have any idea what has gone wrong in your case. But did you try to setup everything again? And if yes, did you succeed?
      If you cannot find a solution, this forum may be the next place to ask for further help.
      Sorry for not having any clear resolution for you.

  2. Pinq Pinq

    Thanks! This is awesome! Can I post this to the Kapsi UKK or to you want to that?
    I have one question, if I login with admin and go to the settings, it says in the Security and setup warnings: “The “Strict-Transport-Security” HTTP header is not set to at least “15552000” seconds. For enhanced security, it is recommended to enable HSTS “
    Any idea how to get rid of this message?

  3. Markku Markku

    If possible it would be nice to have separate instruction for installing nextcloud to siilo when using own domain “example.com” with lets encrypt. There are bits and pieces available in the UKK and in this instruction that in combination make it possible (although difficult). But it would be truly helpful to make a version of these instructions for that scenario too.

  4. Juha Lipponen Juha Lipponen

    Seems that the yoursite-siilo.kapsi.fi website is not configured by default to all kapsi users.
    It need to be separately requested from the admin.

    • jolahde jolahde

      Hmm.. I cannot remember how it exactly was in my case but there is no mention about that in their guidance: https://www.kapsi.fi/palvelut/levytila.html
      However, if you face any problems their support will help you out for sure.

  5. Elias Aarnio Elias Aarnio

    I installed Nextcloud 19.0.1 yesterday. Using mySQL which has been used before. Having problems with uploading pictures. Uploading starts fine and some pictures get uploaded but then upload stalls and I get plenty of error boxes saying ‘An unknown error has occurred’.

    Nextcloud log includes several fatal errors like this:
    “Sabre\DAV\Exception\BadRequest: Expected filesize of 1012212 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 122880 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.”

    I am using the new www backend of Kapsi.

    Any ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *