Self-Hosted Anki Sync Server with Backups, Dashboard, and Monitoring!!!

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:

FeatureBuild from SourceThis Image
Pre-built Docker imageNoYes
Auto-updatesManualDaily builds via GitHub Actions
Multi-architectureManual setupamd64 + arm64
Automated backupsNoYes, with retention policy
S3 backup uploadNoYes (AWS, MinIO, Garage)
Prometheus metricsNoYes
Web dashboardNoYes
NotificationsNoDiscord, 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-stopped
volumes:
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)

  1. Open Anki
  2. Go to Tools → Preferences → Syncing
  3. Set the sync server to: http://your-server:8080/
  4. Sync and enter your credentials

AnkiDroid

  1. Open Settings → Sync
  2. Set Custom sync server to: http://your-server:8080/
  3. Set Media sync URL to: http://your-server:8080/msync/

AnkiMobile (iOS)

  1. Settings → Sync → Custom server
  2. 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 management
docker exec anki-sync user-manager.sh list
docker exec anki-sync user-manager.sh add john
docker exec anki-sync user-manager.sh reset john newpassword
# Backup management
docker exec anki-sync backup.sh
docker exec anki-sync restore.sh --list
docker exec anki-sync restore.sh backup_file.tar.gz

Links

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!


Leave a comment

Discover more from /root

Subscribe now to keep reading and get access to the full archive.

Continue reading