Quick Start
This path is for single-node production: one SyncTV process, one PostgreSQL instance, and one Redis instance. For Kubernetes or multiple replicas, complete this path first, then read Helm Deployment and Cluster Configuration.
Prerequisites
Section titled “Prerequisites”- Docker and Docker Compose are available.
opensslandpython3are available for the env initializer.- The current directory can permanently store Compose files,
.env.postgres,.env.redis,.env.synctv, and volumes. - You have an initial root password. Use a password manager in production.
-
Create a directory and download the Compose files:
Terminal window mkdir synctv-composecd synctv-composecurl -fsSLO https://raw.githubusercontent.com/zijiren233/synctv/next/docker-compose.ymlcurl -fsSLO https://raw.githubusercontent.com/zijiren233/synctv/next/.env.postgres.examplecurl -fsSLO https://raw.githubusercontent.com/zijiren233/synctv/next/.env.redis.examplecurl -fsSLO https://raw.githubusercontent.com/zijiren233/synctv/next/.env.synctv.examplemkdir -p scriptscurl -fsSL https://raw.githubusercontent.com/zijiren233/synctv/next/scripts/init-compose-env.sh -o scripts/init-compose-env.shchmod +x scripts/init-compose-env.sh -
Generate
.env.postgres,.env.redis, and.env.synctv:Terminal window ./scripts/init-compose-env.sh -
Edit
.env.synctvand set the root password:SYNCTV_BOOTSTRAP_ROOT_PASSWORD=replace-with-a-strong-password -
Check the rendered Compose config:
Terminal window docker compose config -
Start the service:
Terminal window docker compose up -d
Verify
Section titled “Verify”docker compose pscurl -fsS http://localhost:8080/health/readyThen open:
http://localhost:8080The default root username is root. Its password comes from SYNCTV_BOOTSTRAP_ROOT_PASSWORD in .env.synctv.
Values To Keep
Section titled “Values To Keep”| Environment variable | Purpose |
|---|---|
SYNCTV_JWT_SECRET | Signs access, refresh, and guest tokens |
SYNCTV_SECURITY_OPAQUE_SERVER_SETUP_SECRET | Long-lived server secret for OPAQUE password authentication |
SYNCTV_SECURITY_CREDENTIAL_ENCRYPTION_KEY | Encrypts Provider credentials |
SYNCTV_BOOTSTRAP_ROOT_PASSWORD | Creates the initial root user |
Common Failures
Section titled “Common Failures”| Symptom | Action |
|---|---|
docker compose config reports missing variables | Run ./scripts/init-compose-env.sh and keep .env.postgres, .env.redis, and .env.synctv in the current directory. |
/health/ready fails | Run docker compose logs -f synctv and inspect the first startup error. |
| Browser CORS errors | Set SYNCTV_SERVER_CORS_ALLOWED_ORIGINS in .env.synctv; use origins only. |
| Root user cannot log in | Confirm SYNCTV_BOOTSTRAP_ROOT_PASSWORD was set before first database startup and inspect bootstrap logs. |
Continue Reading
Section titled “Continue Reading”- Complete the Production Checklist for TLS, backups, metrics, and alerts.
- Read Docker Compose Deployment for Compose file, port, and volume details.
- For local source development, read Development Guide.