Daemon Mode
Daemon vs SSH
| Feature | Daemon (rsyncd) | SSH |
|---|---|---|
| Port | 873 | 22 |
| Encryption | None (use stunnel) | Built-in |
| Authentication | Username/password | SSH keys |
| Setup | rsyncd.conf file | SSH config |
| Best for | LAN / internal sync | Remote / internet |
| Module-based paths | Yes | No |
Setup
/etc/rsyncd.conf
[backups]
path = /backup
comment = Backup storage
read only = yes
auth users = backupuser
secrets file = /etc/rsyncd.secrets
hosts allow = 10.0.0.0/24
hosts deny = *
uid = nobody
gid = nogroup
/etc/rsyncd.secrets
backupuser:strong_password_here
# Set correct permissions
sudo chmod 600 /etc/rsyncd.secrets
# Start daemon
sudo rsync --daemon
# Or via systemd
sudo systemctl enable rsync
sudo systemctl start rsync
Client Commands
# List modules on daemon
rsync rsync://server/
# Sync from daemon module
rsync -av rsync://backupuser@server/backups/ /local/backup/
# Sync to daemon module
rsync -av /local/data/ rsync://backupuser@server/backups/
# With password file (for automation)
rsync -av --password-file=/etc/rsync.passwd rsync://backupuser@server/backups/ /local/
warning
Daemon mode has no encryption. Only use on trusted LANs or wrap with stunnel/VPN for internet access.