Installing Nextcloud [version 16+]
Nextcloud is an open source file sharing, communication, and collaboration platform. It can be installed on our servers.
This guide has been tested with Nextcloud versions 16, 17, and 18.
Before you install Nextcloud, there are a few settings to configure on your hosting account.
Nextcloud requires PHP 7.2 or later. If your hosting account is still configured with PHP 5.6, you should change the PHP version to PHP 7.3 for Nextcloud.
You should also change the php.ini settings. The following settings are recommended:
memory_limit = -1 max_execution_time = 120
You need to create a MySQL database and a MySQL username for Nextcloud. You can do this through your web hosting Control Panel's MySQL Databases section.
By default, the collation for new databases is utf8_general_ci. However, you should make sure that you choose the utf8mb4_general_ci collation instead.
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.
After that, 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.
Point your browser to the location of setup-nextcloud.php you just uploaded. The Nextcloud Setup Wizard will open. Click on Next to proceed.
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.
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. Make sure that the directory you install into is empty.
Finally, click on 'Finish setup'. Once the installation has completed, you will be automatically logged in to your new Nextcloud installation.
To ensure that Nextcloud is secure and working properly, we recommend that you make the following additional changes:
You can set up an SSL certificate and force all connections through HTTPS using the SSL/HTTPS section of the hosting Control Panel.
Using the Control Panel's File Manager, go to the directory where Nextcloud is installed and open the file named .htaccess. In it, you should add the following lines at the beginning of the file:
# Enable Strict-Transport-Security for 180 days
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)
In Settings -> Overview of Nextcloud, the following warnings may be 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.
You may also get the following warning message:
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 that are not part of the Nextcloud installation. You may want to move or delete any such files. Also, if you have edited the .htaccess file as advised above, the file may appear in the list as having an invalid hash. You can safely ignore that warning.
Nextcloud stores the server settings in config/config.php – this file 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 the config.php file with the File Manager in the hosting Control Panel and add the following line at the end of the file:
In the config.php file, you can also change the location where Nextcloud stores temporary files. Open config.php in the File Manager and add the following lines 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.
We would also recommend that you add the following two lines:
'htaccess.RewriteBase' => '/', 'htaccess.IgnoreFrontController' => true,
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 another directory named 'tmp'.
Nextcloud can perform background tasks using a cron job. This is the recommended method to run such tasks.
To set up a cron job for Nextcloud, go to Settings -> Basic settings in Nextcloud and select 'Cron' for 'Background jobs'.
After that, 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 edit that file and add the following line at the top: