Self-Host Kopia: Modern Encrypted Backups with GUI in 15 Minutes
Tired of backup tools that feel like they were designed in 2005? Meet Kopia — a modern, fast, and secure backup tool written in Go that combines the power of Borg/Restic with an actually usable web interface. No more command-line gymnastics just to restore a single file.
In this guide, you'll set up Kopia Server with a web UI, configure encrypted backups to any S3-compatible storage (or local disk), and schedule automatic snapshots — all in about 15 minutes.
Why Kopia?
- Modern UI: Web-based dashboard for managing backups, restores, and policies
- End-to-end encryption: AES-256 or ChaCha20 with client-side keys
- Deduplication: Content-defined chunking saves space across snapshots
- Compression: Built-in compression (zstd, s2, pgzip)
- Flexible storage: Local, SFTP, S3, MinIO, Google Cloud, Azure, and more
- Fast: Parallel processing and caching make backups snappy
Prerequisites
- A VPS or homelab server with Docker and Docker Compose installed
- 2GB RAM minimum (4GB recommended)
- Storage for your backups (local disk or S3-compatible bucket)
- 10 minutes of your time
Step 1: Create the Docker Compose File
Create a directory for Kopia and add a docker-compose.yml:
version: "3.8"
services:
kopia:
image: kopia/kopia:latest
container_name: kopia
restart: unless-stopped
ports:
- "51515:51515"
environment:
KOPIA_PASSWORD: "your-secure-repository-password"
KOPIA_SERVER_USERNAME: "admin"
KOPIA_SERVER_PASSWORD: "your-admin-password"
volumes:
- kopia-config:/app/config
- kopia-cache:/app/cache
- kopia-logs:/app/logs
# Mount directories you want to back up
- /home:/data/home:ro
- /etc:/data/etc:ro
# Optional: mount backup destination if using local disk
- /backups:/backups
command:
- server
- start
- --disable-csrf-token-checks
- --address=0.0.0.0:51515
- --server-username=admin
- --server-password=your-admin-password
- --password=your-secure-repository-password
volumes:
kopia-config:
kopia-cache:
kopia-logs:
Important: Replace the passwords with strong, unique values. The KOPIA_PASSWORD encrypts your backup repository — losing it means losing your backups.
Step 2: Start Kopia
mkdir -p ~/kopia && cd ~/kopia
# Create the compose file above
docker compose up -d
# Check logs
docker logs -f kopia
Wait for the "Server started" message, then access the web UI at http://your-server-ip:51515.
Step 3: Create Your First Repository
A repository is where Kopia stores your encrypted backups. Let's create one on local disk (you can switch to S3 later).
- Open the web UI and log in with your admin credentials
- Click "Create New Repository"
- Choose "Filesystem" (or "S3" if you have a bucket ready)
- For filesystem, set the path to
/backups/kopia-repo - Enter your repository password (the one from
KOPIA_PASSWORD) - Click "Create Repository"
Kopia will initialize the repository with encryption. This takes a few seconds.
Step 4: Configure a Backup Policy
Policies define what to back up and how often.
- Go to "Policies" → "New Policy"
- Set the source path:
/data/home(or whatever you mounted) - Configure retention:
- Keep last 7 daily snapshots
- Keep last 4 weekly snapshots
- Keep last 12 monthly snapshots
- Set compression: zstd (best balance of speed and ratio)
- Enable encryption: AES-256-GCM
- Save the policy
Step 5: Run Your First Snapshot
Click "Snapshot Now" on your policy. Kopia will scan, deduplicate, compress, and encrypt your files. The first snapshot takes the longest; subsequent ones are incremental and fast.
Check the "Snapshots" tab to see progress and completion status.
Step 6: Schedule Automatic Backups
Kopia supports cron-style scheduling. In your policy, set:
- Snapshot frequency:
0 2 * * *(daily at 2 AM) - Or use interval:
24h
Kopia Server runs schedules automatically — no external cron needed.
Verification: Test a Restore
Backups are useless if you can't restore. Let's verify:
- Go to "Snapshots" and click your completed snapshot
- Browse the file tree and find a test file
- Click "Restore" and choose a destination path
- Verify the restored file matches the original
You can also restore via CLI:
docker exec -it kopia kopia snapshot list
docker exec -it kopia kopia restore <snapshot-id> /tmp/restore-test
Optional: S3/MinIO Backend
For offsite backups, switch your repository to S3 or self-hosted MinIO:
docker exec -it kopia kopia repository create s3 --bucket=your-backup-bucket --endpoint=minio.yourdomain.com --access-key=your-access-key --secret-access-key=your-secret-key --password=your-repo-password
Same workflow, but your encrypted blobs land in object storage.
Next Steps
- Multiple repositories: Set up one for local, one for cloud
- KopiaUI desktop app: Connect to your server for local management
- Monitoring: Pair with Uptime Kuma to alert on backup failures
- Related: Compare with Borgmatic and Restic to find your perfect backup tool
Kopia brings modern backup workflows to self-hosters without the enterprise bloat. Set it up once, schedule it, and sleep better knowing your data is encrypted, deduplicated, and restorable in minutes.