docker.recipes

Duplicati Backup Solution

beginner

Duplicati for encrypted cloud backups.

Overview

Duplicati is an open-source backup client that specializes in creating encrypted, incremental, compressed backups stored on cloud storage services and remote file servers. Originally developed to address the need for secure, automated backups with client-side encryption, Duplicati has become a popular choice for users who want to maintain control over their data while leveraging affordable cloud storage options like Amazon S3, Google Drive, OneDrive, and Dropbox. This Docker stack combines Duplicati with NGINX to create a robust backup solution where Duplicati handles the backup operations and encryption while NGINX serves as a reverse proxy to provide additional security, SSL termination, and access control for the web interface. The configuration allows NGINX to act as a protective layer in front of Duplicati's web UI, enabling features like authentication, rate limiting, and custom headers that aren't natively available in Duplicati's built-in web server. This combination is ideal for system administrators managing multiple backup jobs, small businesses requiring automated cloud backups, and home users who want enterprise-grade backup features with a user-friendly web interface. The stack provides the security and reliability needed for critical data protection while maintaining the simplicity that makes Duplicati accessible to non-technical users.

Key Features

  • AES-256 encryption with client-side key management for secure cloud backups
  • Support for 20+ cloud storage backends including AWS S3, Google Drive, OneDrive, and Dropbox
  • Incremental backup system with block-level deduplication to minimize storage usage
  • Web-based backup job configuration and monitoring interface
  • Built-in scheduler for automated backup operations with flexible timing options
  • NGINX reverse proxy providing SSL termination and access control for the web interface
  • Email notification system for backup success, failure, and warnings
  • Backup verification and restoration testing capabilities

Common Use Cases

  • 1Home users backing up personal files and documents to cloud storage with encryption
  • 2Small businesses implementing automated daily backups of critical business data
  • 3Remote workers needing secure offsite backup of work files to company-approved cloud storage
  • 4System administrators managing backup schedules for multiple desktop computers
  • 5Developers backing up source code repositories and project files to multiple cloud providers
  • 6Organizations requiring compliance with data retention policies through scheduled backups
  • 7Home lab enthusiasts protecting configuration files and personal projects with automated cloud sync

Prerequisites

  • Minimum 512MB RAM for Duplicati container plus 64MB for NGINX
  • Available ports 8200 (Duplicati) and 80 (NGINX) or custom ports via environment variables
  • Cloud storage account credentials (AWS S3, Google Drive, OneDrive, etc.) for backup destinations
  • Basic understanding of backup retention policies and encryption key management
  • Storage space for local backup cache and temporary files during backup operations
  • Network connectivity to chosen cloud storage providers with adequate upload bandwidth

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 duplicati:
3 image: linuxserver/duplicati:latest
4 container_name: duplicati
5 restart: unless-stopped
6 ports:
7 - "${DUPLICATI_PORT:-8200}:8200"
8 environment:
9 - PUID=1000
10 - PGID=1000
11 - TZ=${TZ:-UTC}
12 volumes:
13 - duplicati_config:/config
14 - ${BACKUP_SOURCE:-./source}:/source:ro
15 - ${BACKUP_DEST:-./backups}:/backups
16
17 nginx:
18 image: nginx:alpine
19 container_name: duplicati-nginx
20 restart: unless-stopped
21 ports:
22 - "${NGINX_PORT:-80}:80"
23 volumes:
24 - ./nginx.conf:/etc/nginx/nginx.conf:ro
25
26volumes:
27 duplicati_config:

.env Template

.env
1# Duplicati
2DUPLICATI_PORT=8200
3TZ=UTC
4BACKUP_SOURCE=./source
5BACKUP_DEST=./backups
6NGINX_PORT=80

Usage Notes

  1. 1Duplicati at http://localhost:8200
  2. 2Setup backup job wizard
  3. 3Supports many cloud providers
  4. 4Client-side encryption

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

duplicati
duplicati:
  image: linuxserver/duplicati:latest
  container_name: duplicati
  restart: unless-stopped
  ports:
    - ${DUPLICATI_PORT:-8200}:8200
  environment:
    - PUID=1000
    - PGID=1000
    - TZ=${TZ:-UTC}
  volumes:
    - duplicati_config:/config
    - ${BACKUP_SOURCE:-./source}:/source:ro
    - ${BACKUP_DEST:-./backups}:/backups
nginx
nginx:
  image: nginx:alpine
  container_name: duplicati-nginx
  restart: unless-stopped
  ports:
    - ${NGINX_PORT:-80}:80
  volumes:
    - ./nginx.conf:/etc/nginx/nginx.conf:ro

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 duplicati:
5 image: linuxserver/duplicati:latest
6 container_name: duplicati
7 restart: unless-stopped
8 ports:
9 - "${DUPLICATI_PORT:-8200}:8200"
10 environment:
11 - PUID=1000
12 - PGID=1000
13 - TZ=${TZ:-UTC}
14 volumes:
15 - duplicati_config:/config
16 - ${BACKUP_SOURCE:-./source}:/source:ro
17 - ${BACKUP_DEST:-./backups}:/backups
18
19 nginx:
20 image: nginx:alpine
21 container_name: duplicati-nginx
22 restart: unless-stopped
23 ports:
24 - "${NGINX_PORT:-80}:80"
25 volumes:
26 - ./nginx.conf:/etc/nginx/nginx.conf:ro
27
28volumes:
29 duplicati_config:
30EOF
31
32# 2. Create the .env file
33cat > .env << 'EOF'
34# Duplicati
35DUPLICATI_PORT=8200
36TZ=UTC
37BACKUP_SOURCE=./source
38BACKUP_DEST=./backups
39NGINX_PORT=80
40EOF
41
42# 3. Start the services
43docker compose up -d
44
45# 4. View logs
46docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/duplicati-backup-stack/run | bash

Troubleshooting

  • Duplicati web interface shows 'Database is locked': Stop the container, remove any .lock files from the config volume, then restart
  • Backup jobs fail with 'Access denied' errors: Verify cloud storage credentials and check that the service account has write permissions to the destination folder
  • NGINX returns 502 Bad Gateway: Ensure Duplicati container is running and accessible on port 8200, check nginx.conf proxy_pass configuration
  • Backup operations consume excessive memory: Reduce the 'remote-volume-size' setting in backup job options and increase 'blocksize' to 1MB or higher
  • Email notifications not working: Configure SMTP settings in Duplicati's global settings and test with a simple backup job first
  • Restore operations fail with decryption errors: Verify the correct passphrase is entered and that backup files haven't been corrupted in cloud storage

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space