Duplicati
Install Duplicati for encrypted, deduplicated backups to cloud storage, SFTP, and local destinations with a web UI
Duplicati is an open-source backup tool with a web interface. It supports AES-256 encryption, deduplication, and dozens of storage backends, S3, Backblaze B2, Google Drive, SFTP, FTP, and more. Ideal for automated server backups with a GUI.
Installation
# Install .NET dependency
sudo apt update
sudo apt install apt-transport-https -y
# Download Duplicati
wget https://github.com/duplicati/duplicati/releases/download/v2.0.8.1/duplicati_2.0.8.1-1_all.deb
sudo dpkg -i duplicati_2.0.8.1-1_all.deb
sudo apt install -f -yCheck the releases page for the latest version.
Run as a service
sudo systemctl enable duplicati
sudo systemctl start duplicati
sudo systemctl status duplicatiBy default, Duplicati listens on 127.0.0.1:8200.
Access the web UI
Use an SSH tunnel to access it securely:
ssh -L 8200:localhost:8200 user@your-serverThen open http://localhost:8200 in your browser.
Never expose port 8200 directly to the internet without authentication. Always access via SSH tunnel or put it behind a reverse proxy with HTTPS and a password.
Set a UI password
On first access, Duplicati will ask you to set a password. Do this immediately.
Or set it via CLI:
duplicati-server --webservice-password="YourStrongPassword"Create a backup job
- Click Add backup
- Step 1, General: give the backup a name, set an AES-256 passphrase (store it safely, without it, backups are unrecoverable)
- Step 2, Destination: choose where to store backups:
- SFTP, another server via SSH
- S3-compatible, AWS S3, Backblaze B2, MinIO, Cloudflare R2
- Local folder, external drive or mounted NFS
- Google Drive, OneDrive, cloud storage
- Step 3, Source data: select folders to back up (e.g.
/var/www,/etc,/home) - Step 4, Schedule: set frequency (daily, hourly, etc.)
- Step 5, Options: set retention policy (e.g. keep 7 daily + 4 weekly + 12 monthly)
S3-compatible storage example (Backblaze B2)
In the destination step, select S3 Compatible:
| Field | Value |
|---|---|
| Server | s3.us-west-004.backblazeb2.com |
| Bucket name | my-server-backups |
| AWS Access Key ID | Your B2 Key ID |
| AWS Secret Access Key | Your B2 Application Key |
| Bucket create region | us-west-004 |
SFTP destination example
| Field | Value |
|---|---|
| Server | backup-server.example.com |
| Port | 22 |
| Username | backupuser |
| Password / SSH key | your credentials |
| Path | /backups/myserver |
Retention policy
Duplicati supports "smart" retention, keep more recent backups and fewer old ones:
Keep 1 backup per day for 7 days
Keep 1 backup per week for 4 weeks
Keep 1 backup per month for 12 monthsIn the UI, set this under Options → Keep a specific number of backups or use the Custom retention option.
CLI usage
Run a backup manually:
# List configured backup jobs (by ID)
duplicati-cli list-backups
# Run a backup job
duplicati-cli backup <destination-url> <source-folder> \
--passphrase="YourPassphrase" \
--encryption-module="aes" \
--compression-module="zip"Restore from CLI:
duplicati-cli restore <destination-url> "*" \
--passphrase="YourPassphrase" \
--restore-path="/tmp/restore"Restore files
- In the web UI, click Restore
- Select the backup job
- Choose a restore point (date/time)
- Browse and select files/folders
- Choose restore destination (original path or a new folder)
- Click Restore
Nginx reverse proxy
server {
listen 443 ssl;
server_name backup.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/backup.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/backup.yourdomain.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8200;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 300;
}
}Logs
journalctl -u duplicati -fOr in the web UI: click on a backup job → Show log.
Database backup integration
Add a pre-backup script to dump MySQL before Duplicati runs:
In the backup job → Options → Advanced options:
--run-script-before=/opt/backup-scripts/dump-mysql.sh/opt/backup-scripts/dump-mysql.sh:
#!/bin/bash
mysqldump --all-databases -u root -p'yourpassword' \
| gzip > /var/backups/mysql-latest.sql.gzchmod +x /opt/backup-scripts/dump-mysql.shInclude /var/backups/ in your Duplicati source folder.