Part 3 - rsyncd Configuration#

If you haven’t already, complete Part 2 - Drive Setup before continuing. With storage ready, this part covers installing and configuring rsyncd on the Linux server.


Install rsync#

sudo apt install rsync

Configure rsyncd#

Create the configuration file:

sudo nano /etc/rsyncd.conf

Add the following:

[backup]
path = /mnt/backup_hdd/synology_share
comment = Synology Backup Module
read only = false
timeout = 300
auth users = synology
secrets file = /etc/rsyncd.secrets
uid = archive
gid = archive

Configuration Breakdown#

Setting Purpose
[backup] Module name. Think of this like a shared folder name (like an SMB share) on a network
path The actual folder on the Linux server where files are stored
comment Description shown when listing modules
read only Set to false so files can be written
timeout Kills stuck or frozen sessions after this many seconds
auth users rsync usernames allowed to connect
secrets file Path to the rsync password file
uid User that owns files written through rsync
gid Group that owns files written through rsync

A Note on uid and gid#

rsyncd runs as root and by default writes files as the nobody user. In Part 2 we set specific permissions on the backup directory for the archive account. Setting uid and gid to archive ensures rsync writes files with the correct ownership. Without this you would need to open permissions to “other,” which is not ideal.

A Note on Authentication#

auth users and secrets file define the username and password used to authenticate with rsyncd. This is rsync-level authentication, similar to share-level permissions in SMB. It is separate from Linux user accounts and filesystem permissions.


Create the Secrets File#

sudo nano /etc/rsyncd.secrets

Add a line in this exact format:

synology:123456

You can use any username and password you want. Once this server goes offsite it will only be reachable over Tailscale, not exposed to the internet, so a simple password is fine.

Format matters. The secrets file must have no extra spaces, no blank lines, and no trailing whitespace. rsyncd will silently fail to authenticate if the file is malformed.

Set the required permissions:

sudo chmod 600 /etc/rsyncd.secrets

The secrets file must be readable only by its owner. rsyncd will refuse to start if permissions are too open.


Start the Service#

Start rsyncd and enable it at boot:

sudo systemctl start rsync
sudo systemctl enable rsync

Confirm it is running:

sudo systemctl status rsync

The output should show active (running) in green.


Test the Configuration#

Test before configuring Hyper Backup. If something is misconfigured, Synology’s error messages are too generic to be useful for debugging.

Run these tests from any other machine on the LAN. You just need rsync installed and network access to the rsyncd server.

Replace <rsyncd-server-lan-ip> with the LAN IP of your rsyncd server.

Check That the Module Is Visible#

rsync rsync://synology@<rsyncd-server-lan-ip>/backup

Enter the password when prompted. An empty listing is fine if synology_share has no files yet. What matters is that no error is returned.

If you get an error, check these first:

  • Recreate the secrets file from scratch. Typos and whitespace issues are common.
  • If running a firewall, add an exception for rsyncd (port 873).
  • Double-check spelling in rsyncd.conf and rsyncd.secrets.

Test a File Upload#

Create a test file and upload it to the module:

touch /tmp/testfile.txt
rsync /tmp/testfile.txt rsync://synology@<rsyncd-server-lan-ip>/backup

Confirm the file arrived:

rsync rsync://synology@<rsyncd-server-lan-ip>/backup

You should see testfile.txt listed.