Docker stack for running proton-drive-sync against a local Kopia repository.
This wrapper keeps Proton credentials and sync state in local persistent volumes, and builds from the local ./source checkout.
- Docker Engine + Docker Compose plugin
- A Proton account
- A local Kopia repository on the host
- Go to this stack directory:
cd /path/to/proton-drive-sync
- Create
.envfrom the template:cp .env.example .env
- Set
KEYRING_PASSWORDin.env:openssl rand -base64 32
- Confirm
SYNC_DIR_KOPIAin.envpoints to your host Kopia repository path. - Build image:
docker compose build proton-drive-sync
- Authenticate once:
docker compose run --rm --entrypoint proton-drive-sync proton-drive-sync auth
- Start service:
docker compose up -d proton-drive-sync
- Open dashboard:
http://<server-ip>:4242
Add one sync mapping:
- Local path:
/data/kopia-repository - Remote root: your Proton destination (example:
/Backups/Kopia)
- Docker-first deployment wrapper with compose/env and persistent state volumes.
- Local source image build (
./source) instead of relying on external prebuilt image availability. - Job execution timeout to prevent hung worker operations.
- Recovery of stale in-memory active task slots after timeout.
- Periodic blocked-job recovery pass in the sync loop.
- Auto-requeue for blocked jobs caused by
Invalid access token(with cooldown). - Idempotent handling for create-file conflicts:
A file or folder with that name already existsis treated as synced instead of endlessly retried.
- Run-lock hardening for container restart PID reuse:
- stale
running_pidself-lock is auto-cleared.
- stale
- Docker runtime hardening in compose (
no-new-privileges,pids_limit, controlled stop grace period).
During auth, you may see:
Failed to fork child session: Cannot fork child sessionFalling back to parent session: ...
This can be non-fatal if startup logs later show successful auth.
Check:
docker compose logs --tail=80 proton-drive-sync- Look for:
Authenticated as <user>
If startup still fails with Invalid access token:
- Re-run auth:
docker compose run --rm --entrypoint proton-drive-sync proton-drive-sync auth
- Start again:
docker compose up -d proton-drive-sync
- Status:
docker compose pscurl -s http://127.0.0.1:4242/api/stats
- Logs:
docker compose logs -f proton-drive-sync
- Restart:
docker compose restart proton-drive-sync
- Rebuild + restart:
docker compose up -d --build proton-drive-sync
- Stop:
docker compose stop proton-drive-sync
If queue health is bad (blocked > 0, processing stuck, or retries never drain):
- Rebuild and restart:
docker compose up -d --build proton-drive-sync
- Check stats:
curl -s http://127.0.0.1:4242/api/stats
- Check logs for auth or conflict errors:
docker compose logs --tail=200 proton-drive-sync
- Do not commit
.envordata/directories. data/configcontains encrypted credentials and config.data/statecontains sync state and internal SQLite metadata.