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:
- Go to Nextcloud download page.
- Click Download under the Get Nextcloud Server title.
- Select Web Installer (the link is located at middle of the lowest row of the popup window).
- Save the file on your computer (Step 1. in the instructions).
- Use FTPS client (Filezilla or similar) and open the connection to Kapsi server (Additional guidance in Finnish).
- Upload the setup-nextcloud.php file to /siilo/x/username/sites/yoursite-siilo.kapsi.fi/www/
- Open web browser and go to https://yoursite-siilo.kapsi.fi/setup-nextcloud.php, Nextcloud webinstaller appears to your screen.
- Click Next.
- If everything is ready for installation, the installer says: All Nextcloud dependencies found
- 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).
- Click Next.
- After few moments the installer says: Success, Nextcloud is now installed!
- Click Next.
- Create admin account by entering admin username and password.
- Click Storage & Database section, select MySQL/MariaDB
- 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).
- Installation is ready, see the configuration below.
Installation using CLI:
- Open terminal.
- Type
ssh username@kapsi.fi
- Enter your Kapsi password.
- Type
cd siilo/sites/yoursite-siilo.kapsi.fi/www
- Type
wget 'https://download.nextcloud.com/server/releases/nextcloud-12.0.3.tar.bz2'
(Check the latest version) - Type
tar xvfj
nextcloud-12.0.3.tar.bz2
- Open web browser and go to the Nextcloud location.
- Setup page appears, see the steps 10 -16 from GUI guide above.
- 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!
Leave a Reply