Software & Configuration

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 -y

Check the releases page for the latest version.


Run as a service

sudo systemctl enable duplicati
sudo systemctl start duplicati
sudo systemctl status duplicati

By 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-server

Then 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

  1. Click Add backup
  2. Step 1, General: give the backup a name, set an AES-256 passphrase (store it safely, without it, backups are unrecoverable)
  3. 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
  4. Step 3, Source data: select folders to back up (e.g. /var/www, /etc, /home)
  5. Step 4, Schedule: set frequency (daily, hourly, etc.)
  6. 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:

FieldValue
Servers3.us-west-004.backblazeb2.com
Bucket namemy-server-backups
AWS Access Key IDYour B2 Key ID
AWS Secret Access KeyYour B2 Application Key
Bucket create regionus-west-004

SFTP destination example

FieldValue
Serverbackup-server.example.com
Port22
Usernamebackupuser
Password / SSH keyyour 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 months

In 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

  1. In the web UI, click Restore
  2. Select the backup job
  3. Choose a restore point (date/time)
  4. Browse and select files/folders
  5. Choose restore destination (original path or a new folder)
  6. 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 -f

Or 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.gz
chmod +x /opt/backup-scripts/dump-mysql.sh

Include /var/backups/ in your Duplicati source folder.

On this page