After years of using Anki for medical school, I finally got tired of relying on AnkiWeb for syncing. Privacy concerns, sync limits, and the occasional downtime pushed me to self-host. The problem? The official Anki project provides source code but no pre-built Docker image. Building from source every time there’s an update? No thanks.
So I built Anki Sync Server Enhanced — a production-ready Docker image with all the features self-hosters actually need.
Why Self-Host Your Anki Sync?
- Privacy — Your flashcards stay on your server
- No limits — Sync as much as you want
- Speed — Local network sync is instant
- Control — Backups, monitoring, your rules
What Makes This Image Different?
I looked at existing solutions and found them lacking. Most require you to build from source or offer minimal features. Here’s what this image provides out of the box:
| Feature | Build from Source | This Image |
|---|---|---|
| Pre-built Docker image | No | Yes |
| Auto-updates | Manual | Daily builds via GitHub Actions |
| Multi-architecture | Manual setup | amd64 + arm64 |
| Automated backups | No | Yes, with retention policy |
| S3 backup upload | No | Yes (AWS, MinIO, Garage) |
| Prometheus metrics | No | Yes |
| Web dashboard | No | Yes |
| Notifications | No | Discord, Telegram, Slack, Email |
Quick Start
Getting started takes less than a minute:
docker run -d \ --name anki-sync \ -p 8080:8080 \ -e SYNC_USER1=myuser:mypassword \ -v anki_data:/data \ chrislongros/anki-sync-server-enhanced
That’s it. Your sync server is running.
Docker Compose (Recommended)
For a more complete setup with backups and monitoring:
services: anki-sync-server: image: chrislongros/anki-sync-server-enhanced:latest container_name: anki-sync-server ports: - "8080:8080" # Sync server - "8081:8081" # Dashboard - "9090:9090" # Metrics environment: - SYNC_USER1=alice:password1 - SYNC_USER2=bob:password2 - TZ=Europe/Berlin - BACKUP_ENABLED=true - BACKUP_SCHEDULE=0 3 * * * - METRICS_ENABLED=true - DASHBOARD_ENABLED=true volumes: - anki_data:/data - anki_backups:/backups restart: unless-stoppedvolumes: anki_data: anki_backups:
The Dashboard
One feature I’m particularly proud of is the built-in web dashboard. Enable it with DASHBOARD_ENABLED=true and access it on port 8081.
It shows:
- Server status and uptime
- Active users
- Data size
- Backup status
- Authentication statistics
- Feature toggles
No more SSH-ing into your server just to check if everything is running.
Configuring Your Anki Clients
Desktop (Windows/Mac/Linux)
- Open Anki
- Go to Tools → Preferences → Syncing
- Set the sync server to:
http://your-server:8080/ - Sync and enter your credentials
AnkiDroid
- Open Settings → Sync
- Set Custom sync server to:
http://your-server:8080/ - Set Media sync URL to:
http://your-server:8080/msync/
AnkiMobile (iOS)
- Settings → Sync → Custom server
- Enter:
http://your-server:8080/
Backup to S3
If you want offsite backups, the image supports S3-compatible storage (AWS S3, MinIO, Garage, Backblaze B2):
environment: - BACKUP_ENABLED=true - S3_BACKUP_ENABLED=true - S3_ENDPOINT=https://s3.example.com - S3_BUCKET=anki-backups - S3_ACCESS_KEY=your-access-key - S3_SECRET_KEY=your-secret-key
Notifications
Get notified when the server starts, stops, or completes a backup:
# Discord- NOTIFY_ENABLED=true- NOTIFY_TYPE=discord- NOTIFY_WEBHOOK_URL=https://discord.com/api/webhooks/...# Or Telegram, Slack, ntfy, generic webhook
NAS Support
The image works great on NAS systems:
- TrueNAS SCALE — Install via Custom App with YAML
- Unraid — Template available in the repository
- Synology/QNAP — Standard Docker installation
CLI Tools Included
The image comes with helpful management scripts:
# User managementdocker exec anki-sync user-manager.sh listdocker exec anki-sync user-manager.sh add johndocker exec anki-sync user-manager.sh reset john newpassword# Backup management docker exec anki-sync backup.shdocker exec anki-sync restore.sh --listdocker exec anki-sync restore.sh backup_file.tar.gz
Links
- GitHub: github.com/chrislongros/anki-sync-server-enhanced
- Docker Hub: hub.docker.com/r/chrislongros/anki-sync-server-enhanced
Conclusion
If you’re using Anki seriously — for medical school, language learning, or any knowledge work — self-hosting your sync server gives you complete control over your data. This image makes it as simple as a single Docker command.
Questions or feature requests? Open an issue on GitHub or leave a comment below.
Happy studying!





