New SmartVPS service! The SmartVPS platform offers dedicated CPU and RAM resources, unlimited websites, and more!
Winter Sale - 63% Discount
Promo code winter applied. 63% discount.

Installing Nextcloud [version 16]

 Nextcloud_Logo

Nextcloud is an open source, self-hosted file sharing and communication platform. To install Nextcloud, follow these steps:

1.  You need to create a MySQL database and a MySQL user for Nextcloud. You can do this through your web hosting Control Panel's MySQL Databases section. Be sure to grant all privileges to the MySQL user.

2. Open https://nextcloud.com/install in your browser. Click on 'Download for server' and then select the 'Web Installer' option. Right-click on the link to the installer and save the setup-nextcloud.php file to your computer.

3. Upload setup-nextcloud.php to the location on your hosting account where you wish to install Nextcloud. You can easily upload the file through the File Manager section of the hosting Control Panel. If you prefer to install Nextcloud in a subdomain such as nextcloud.yourdomain.com, you can create a new subdomain through the Subdomains section of the hosting Control Panel.

4. Point your browser to the location of setup-nextcloud.php you just uploaded. The Nextcloud Setup Wizard will open. Click on Next to proceed.

5. Nextcloud requires PHP 7.0.0 or higher. If you are running PHP 5.6 or below, make sure you change the PHP version to PHP 7. Once all dependency checks have completed, the wizard will ask you for the directory where it should install Nextcloud. You can enter . (a single dot) to install in the current directory, or you can enter a subdirectory name.

6. On the next screen, enter your desired administrator’s username and password. After that, click on 'Storage & database' and select 'MySQL/MariaDB'. In the respective fields enter the MySQL username, password, and database name you created at step 1.

Next Cloud Install

7. Click on 'Finish setup'. Once the installation has completed, you will be automatically logged in to your new Nextcloud installation.

Additional Configuration

To ensure that Nextcloud is secure and working properly, we recommend that you also follow these steps:

1. Install/enable an SSL certificate and force all connections through HTTPS. You can do this through the SSL/HTTPS section of the hosting Control Panel. In case your hosting provider offers Let's Encrypt certificates, you will see a Let's Encrypt section there.

2. Using the Control Panel's File Manager, go to the directory where Nextcloud is installed and open the file .htaccess. Add the following lines at the beginning of the file:

# Enable Strict-Transport-Security for 180 days
Header always set Strict-Transport-Security "max-age=15552000"
3. Configure the email functionality. Go to Settings -> Basic Settings in Nextcloud and make sure that you have the following settings for 'Email server':

Send mode: Sendmail Sendmail mode: smtp (-bs)
From address: a valid email address on your domain

4. In Settings -> Overview of Nextcloud the following warnings are displayed:

The "X-Content-Type-Options" HTTP header is not set to "nosniff". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.
The "X-Robots-Tag" HTTP header is not set to "none". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.
The "X-Download-Options" HTTP header is not set to "noopen". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.
The "X-Permitted-Cross-Domain-Policies" HTTP header is not set to "none". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.

Nextcloud stores the server settings in config/config.php - config.php is located in the config subdirectory of the directory where Nextcloud is installed. For example, if Nextcloud is installed in /home/your_username/www/nextcloud, the full path to the configuration file would be /home/your_username/www/nextcloud/config/config.php. To resolve the issue with the HTTP headers, open config.php with the File Manager in the hosting Control Panel and add the following line at the end of the file:

putenv("modHeadersAvailable=true");


You may also get the following error:
Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the documentation. (List of invalid files… / Rescan…)Clicking on "List of invalid files..." will show you any extra files not part of the Nextcloud installation. You may want to (re)move any such files. Also, if you have edited the .htaccess file as advised above, the file will appear in the list as having an invalid hash.
 
5. Change the location where Nextcloud stores temporary files. Open config.php in the File Manager and add the following line right after 'dbtype' => 'mysql':
 
'tempdirectory' => '/home/your_username/www/nextcloud/data/tmp',
Make sure you set the correct path to the Nextcloud installation, replacing "your_username" with your actual account username.
 
After that, using the Control Panel's File Manager go to the directory where Nextcloud is installed. Open the 'data' directory and create in it a directory named 'tmp'. 
 
6. Use the system cron service for background jobs. Go the Settings -> Basic settings in Nextcloud and select 'Cron' for 'Background jobs'. Open the Cron Jobs interface of the hosting Control Panel and set the cron.php file of Nextcloud to be executed every 15 minutes. The cron.php file is located in the directory of your Nextcloud installation. You should set the first line of the file to: 
#!/usr/local/bin/php.cli