Installing Nextcloud on Synology provides an alternative to the features natively offered by the NAS system, such as Cloud Sync and Synology Drive. Before downloading the open-source software, you will need to configure essential packages like Web Station and a database. Once that’s done, you can install Nextcloud in just a few steps.

What are Nextcloud and Synology NAS?

Synology Inc. is a Taiwanese company that manufactures and sells NAS servers (Network Attached Storage). These network-based file servers are especially popular thanks to the user-friendly DiskStation Manager (DSM) operating system, which allows the server to be easily configured via a web browser.

Nextcloud is open-source software designed for self-hosting and cloud computing, available for desktop PCs and mobile devices. Installing Nextcloud on a Synology NAS allows you to create your own cloud, providing access to the data stored on the NAS and enabling synchronisation with other devices, even outside your local network.

While Synology offers similar functionality through CloudSync and Synology Drive, the appeal of Nextcloud on Synology lies in its extensive range of extensions across various areas (such as office productivity, multimedia and communication), excellent data protection and the flexibility to make custom adjustments.

What are the requirements for Nextcloud on Synology?

To successfully install and run Nextcloud on a Synology NAS, certain requirements need to be met. The server should have at least 512 MB of RAM and be running a current version of DiskStation Manager. You will also need the following packages, which can be downloaded from the Synology Package Centre:

  • Web Station (for managing web servers and applications)

  • Apache HTTP Server 2.4 (web server)

  • PHP (scripting language, at least version 8.3 as recommended by Nextcloud)

  • MariaDB 10 or MySQL (database server, ensure TCP/IP connections are enabled)

  • phpMyAdmin (optional database management)

Tip

With Managed Nextcloud from IONOS, you gain access to a powerful cloud solution. You retain full data sovereignty without the need to manage the server yourself, as IONOS takes care of installation, updates and maintenance.

How to install Nextcloud on Synology and set it up securely

There are several different methods to set up Nextcloud on a Synology NAS. Below we guide you through installing Nextcloud Hub via DiskStation Manager. While Nextcloud installation with Docker is also possible, it’s better suited for experienced users.

Step 1: Download Nextcloud

Download the latest version of Nextcloud from the official Nextcloud website and copy the ZIP file into the root directory of your web folder (./volume1/web/). Next, extract the file in the web folder.

Step 2: Enable read and write permissions

Right-click on the Nextcloud folder and go to its properties. There, clock on the ‘Permissions’ tab, where you can select ‘Create’ to add a new entry. In the dropdown menu, choose SYSTEM under ‘User or group’. Next, enable all read and write permissions, then click ‘Done’.

Make sure you tick the box for ‘Apply to this folder, sub-folder and files’.

Step 3: Configure PHP

Open Web Station and select ‘Script Language Settings’ on the left. Click ‘Create’ to set up a new profile. A new window will appear, where you can access the ‘Settings’ tab. Enter your preferred ‘Profile name’ and provide a ‘Description’. Select your PHP version and tick the ‘Enable PHP Cache’ box.

In the ‘Extensions’ tab, enable the following PHP extensions:

  • bcmath

  • bz2

  • curl

  • exif

  • ftp

  • gd

  • gettext

  • iconv

  • intl

  • gmp

  • mysqli

  • openssl

  • pdo_mysql

  • posix

  • soap

  • sodium

  • sockets

  • zip

  • zlib

Next, go to the ‘Core’ tab and adjust the following variables using the search function:

  • memory_limit= 512M

  • upload_max_filesize= 128M (for uploading larger files, for example, 4000M = 40 GB is recommended)

  • post_max_size= 128M

  • opcache.enable= 1

  • apc.enable_cli= 1

  • opcache.enable_cli= 1

  • opcache.interned_strings_buffer= 64

  • opcache.max_accelerated_files= 32531

  • opcache.memory_consumption= 512

  • opcache.save_comments= 1

  • opcache.revalidate_freq= 240

Step 4: Configure the Web Server

In Web Station, go to the ‘Web Service’ section and set your default server portal. Click on the ‘Edit’ tab, select ‘Apache 2.4’ as the ‘HTTP Backend Server’ and choose the PHP profile you created under ‘PHP’. Then save the changes.

Step 5: Create the Nextcloud database

Go to to the phpMyAdmin application and log in with your MariaDB root credentials. Under ‘Create database’, type ‘nextcloud’ in the input field and click the ‘Create’ button.

Once the database has been created, select the corresponding entry from the left sidebar. Then go to the ‘Privileges’ tab and click on ‘Add user account’ at the bottom. In the next window, enter a profile name (‘User Name’), host name (‘Host Name’ - select ‘Local’ on the left), and a password (‘Password’) under ‘Login Information’. Then, click ‘Go’.

Step 6: Install Nextcloud

Now, open your browser and go to http://ip-address/nextcloud (using your individual IP address) to access the Nextcloud installation page. Here, create an admin account and enter the profile information set in step 5 at the bottom. Once everything is filled out, click ‘Install’.

Step 7: Schedule tasks

Open the Task Scheduler via the Control Panel, select ‘Create’, and choose ‘User-defined script’. A new window will appear where you can set the following:

  1. General’: Assign a name to the task, such as ‘Nextcloud Permissions’. Set the user option to ‘root’ and make sure to tick the box for ‘Enabled’.

  2. Schedule’: Set the task to run at a specific time and ensure it won’t repeat.

  3. Task Settings’: Enable ‘Send run details by email’ and enter the following execution command in the command line:

chown -R http:http /volume1/web/nextcloud
chmod -R 0755 /volume1/web/nextcloud
bash

Then run the script to synchronise Nextcloud with your devices.

Step 8: Set up Nextcloud

Once Nextcloud is installed, there are a few additional steps to ensure it runs smoothly on your Synology NAS. These include:

  • Trusted domains: Add your external domains to the Nextcloud config.php.

  • External access: Set up port forwarding on your FRITZ!Box or another router to allow external access to your NAS server.

  • SSL encryption: Use Let’s Encrypt to secure your connections with a valid SSL certificate.

  • Apps and extensions: Install additional apps like Nextcloud Flow or Nextcloud Deck for extended functionality.

  • Backups: Set up a reliable backup strategy to protect your data.

Tip

Take advantage of a public Nextcloud demo to explore its features and functionalities.

Managed Nextcloud
Cloud storage that puts you in control
  • Keep your data safe with industry-leading security
  • Save time on updates and maintenance
  • Easily add apps and online office tools
Was this article helpful?
Go to Main Menu