Backup your Linux Server with Duplicati

Self-Hosting Jan 21, 2021

What is Duplicati?

Duplicati is an Open Source backup client that can run encrypted incremental backups to local storage or offsite with support for a large array of different file transfer protocols.

Supported Storage Protocols:

  • FTP
  • OpenStack Object Storage
  • S3 Compatible
  • SFTP (SSH)
  • WebDAV

Proprietary Protocols:

  • Amazon S3
  • Azure Blob
  • B2 Cloud Storage
  • Dropbox
  • Google Cloud Storage
  • Google Drive
  • HubiC
  • Jottacloud
  • Microsoft Onedrive
  • Microsoft Sharepoint
  • Rackspace CloudFiles
  • Rclone
  • Sia Decentralised Cloud


This will be using Ubuntu 20.04 with Docker Compose but it should work on other distributions without issues.

  1. Install Docker
  2. Install docker-compose:
    sudo apt install docker-compose
  3. Make a duplicati directory to place the docker-compose file within:
    sudo mkdir duplicati
    cd duplicati
  4. Use the following docker compose template:

sudo nano docker-compose.yaml

version: "2.1"
    container_name: duplicati
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - ./config:/config
      - <Path to store local backups>:/backups
      #Remove :ro (Read Only) when restoring! 
      - <Path to source for files to backup>:/source:ro
    restart: unless-stopped
      name: dockernet

Please change the volume locations and potentially the IP.

  1. Startup the docker container:
    sudo docker-compose up -d

  2. Reverse Proxy Setup
    The WebUI operates on port 8200.
    Example Caddy setup: {
  1. Set a password for the WebUI, to prevent unauthorised access.

  2. Configure a Name and Encryption Password (Make sure you save this) for your backup.

  3. Select the storage type and enter your credentials.

  4. Source Data
    The source directory should contain the data you want to backup.

  5. Select your Backup Schedule
    Once a day is recommended but feel free to adjust this.

  6. You are safe to save this and finish the setup.

  7. Press Run now and hope it runs without errors.

If errors do occur this is probably due to file permissions.

Please note when restoring the data you will want to remove :ro on the source volume otherwise it will be read only.

Cover Image Credit:


Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.