Daemon mode rsync shares on Synology diskstation

In this post, I describe how to override the default rsyncd settings on a Synology diskstation to enable custom daemon mode modules/shares that don’t require user authentication.

This week I’ve been doing quite a bit of work with Synology Diskstations, particularly in terms of mirroring data across sites. The Diskstations are replacing some older Netgear ReadyNAS boxes, which are a getting a bit full and a bit slow as data size has grown. On the ReadyNAS boxes it was straightforward to set up rsync modules (aka shares) via the web frontend, which is preferable on a secure network connection as it avoids the overhead of running rsync over SSH. It also has the advantage that you can configure shares to be read only, to reduce the risk of inadvertently deleting data.

It’s possible to set up rsync shares in the same way on Synology NAS boxes, but it requires a bit more work. These instructions were tested on some new Diskstations running DSM 5.2.

  1. Log in to the Synology Diskstation web frontend, usually at http://ip_address:5000/ or https://ip_address:5001/.
  2. Click the main menu icon in the top left.
  3. Select Backup & Replication from the menu.
  4. Select Backup Services in the window that pops up.
  5. Tick the Enable network backup and the Use customized rsync configuration checkboxes and click Apply.
  6. Make sure to allow rsync connections through the Diskstation firewall if prompted.
  7. Now SSH in to the Diskstation (instructions on how to do this are easy to find on the web if you haven’t already enabled SSH).
  8. Run grep rsync /etc/synoinfo.conf and check that use_rsyncd_conf is set to "yes", including quotes.
  9. Edit the rsync configuration file as required – it’s in /etc/rsyncd.conf. Example share config info is below.
  10. Restart the rsync daemon with /usr/syno/etc.defaults/rc.sysv/S84rsyncd.sh stop && /usr/syno/etc.defaults/rc.sysv/S84rsyncd.sh start.
  11. Test the share works with a command like rsync --recursive --dry-run ip_address::share_name/ test from a remote machine.

Here is a sample share config section to put into /etc/rsyncd.conf, creating a read-only share that’s accessible without authentication from 192.168.1.1:

[test]
path = /volume1/test
comment = "Test share"
uid = root
gid = root
read only = yes
list = yes
charset = utf-8
secrets file = /etc/rsyncd.secrets
hosts allow = 192.168.1.1

References: http://forum.synology.com/enu/viewtopic.php?f=160&t=34661 gave me the first steps required to get this working.

Add new comment

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.