In­stalling Nextcloud on Synology provides an al­tern­at­ive to the features natively offered by the NAS system, such as Cloud Sync and Synology Drive. Before down­load­ing 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 man­u­fac­tures and sells NAS servers (Network Attached Storage). These network-based file servers are es­pe­cially popular thanks to the user-friendly DiskSta­tion Manager (DSM) operating system, which allows the server to be easily con­figured via a web browser.

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

While Synology offers similar func­tion­al­ity through CloudSync and Synology Drive, the appeal of Nextcloud on Synology lies in its extensive range of ex­ten­sions across various areas (such as office pro­ductiv­ity, mul­ti­me­dia and com­mu­nic­a­tion), excellent data pro­tec­tion and the flex­ib­il­ity to make custom ad­just­ments.

What are the re­quire­ments for Nextcloud on Synology?

To suc­cess­fully install and run Nextcloud on a Synology NAS, certain re­quire­ments need to be met. The server should have at least 512 MB of RAM and be running a current version of DiskSta­tion Manager. You will also need the following packages, which can be down­loaded from the Synology Package Centre:

  • Web Station (for managing web servers and ap­plic­a­tions)

  • Apache HTTP Server 2.4 (web server)

  • PHP (scripting language, at least version 8.3 as re­com­men­ded by Nextcloud)

  • MariaDB 10 or MySQL (database server, ensure TCP/IP con­nec­tions are enabled)

  • phpMy­Ad­min (optional database man­age­ment)

Tip

With Managed Nextcloud from IONOS, you gain access to a powerful cloud solution. You retain full data sov­er­eignty without the need to manage the server yourself, as IONOS takes care of in­stall­a­tion, updates and main­ten­ance.

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 in­stalling Nextcloud Hub via DiskSta­tion Manager. While Nextcloud in­stall­a­tion with Docker is also possible, it’s better suited for ex­per­i­enced 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 per­mis­sions

Right-click on the Nextcloud folder and go to its prop­er­ties. There, clock on the ‘Per­mis­sions’ 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 per­mis­sions, 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 ‘De­scrip­tion’. Select your PHP version and tick the ‘Enable PHP Cache’ box.

In the ‘Ex­ten­sions’ tab, enable the following PHP ex­ten­sions:

  • 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 re­com­men­ded)

  • 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 phpMy­Ad­min ap­plic­a­tion and log in with your MariaDB root cre­den­tials. Under ‘Create database’, type ‘nextcloud’ in the input field and click the ‘Create’ button.

Once the database has been created, select the cor­res­pond­ing entry from the left sidebar. Then go to the ‘Priv­ileges’ 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 In­form­a­tion’. Then, click ‘Go’.

Step 6: Install Nextcloud

Now, open your browser and go to http://ip-address/nextcloud (using your in­di­vidu­al IP address) to access the Nextcloud in­stall­a­tion page. Here, create an admin account and enter the profile in­form­a­tion 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 Per­mis­sions’. 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 syn­chron­ise Nextcloud with your devices.

Step 8: Set up Nextcloud

Once Nextcloud is installed, there are a few ad­di­tion­al 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 for­ward­ing on your FRITZ!Box or another router to allow external access to your NAS server.

  • SSL en­cryp­tion: Use Let’s Encrypt to secure your con­nec­tions with a valid SSL cer­ti­fic­ate.

  • Apps and ex­ten­sions: Install ad­di­tion­al apps like Nextcloud Flow or Nextcloud Deck for extended func­tion­al­ity.

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

Tip

Take advantage of a public Nextcloud demo to explore its features and func­tion­al­it­ies.

Managed Nextcloud
Cloud storage that puts you in control
  • Keep your data safe with industry-leading security
  • Save time on updates and main­ten­ance
  • Easily add apps and online office tools
Go to Main Menu