Skip to content

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.

  • Docker and Docker Compose are available.
  • openssl and python3 are 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.
  1. Create a directory and download the Compose files:

    Terminal window
    mkdir synctv-compose
    cd synctv-compose
    curl -fsSLO https://raw.githubusercontent.com/zijiren233/synctv/next/docker-compose.yml
    curl -fsSLO https://raw.githubusercontent.com/zijiren233/synctv/next/.env.postgres.example
    curl -fsSLO https://raw.githubusercontent.com/zijiren233/synctv/next/.env.redis.example
    curl -fsSLO https://raw.githubusercontent.com/zijiren233/synctv/next/.env.synctv.example
    mkdir -p scripts
    curl -fsSL https://raw.githubusercontent.com/zijiren233/synctv/next/scripts/init-compose-env.sh -o scripts/init-compose-env.sh
    chmod +x scripts/init-compose-env.sh
  2. Generate .env.postgres, .env.redis, and .env.synctv:

    Terminal window
    ./scripts/init-compose-env.sh
  3. Edit .env.synctv and set the root password:

    SYNCTV_BOOTSTRAP_ROOT_PASSWORD=replace-with-a-strong-password
  4. Check the rendered Compose config:

    Terminal window
    docker compose config
  5. Start the service:

    Terminal window
    docker compose up -d
Terminal window
docker compose ps
curl -fsS http://localhost:8080/health/ready

Then open:

http://localhost:8080

The default root username is root. Its password comes from SYNCTV_BOOTSTRAP_ROOT_PASSWORD in .env.synctv.

Environment variablePurpose
SYNCTV_JWT_SECRETSigns access, refresh, and guest tokens
SYNCTV_SECURITY_OPAQUE_SERVER_SETUP_SECRETLong-lived server secret for OPAQUE password authentication
SYNCTV_SECURITY_CREDENTIAL_ENCRYPTION_KEYEncrypts Provider credentials
SYNCTV_BOOTSTRAP_ROOT_PASSWORDCreates the initial root user
SymptomAction
docker compose config reports missing variablesRun ./scripts/init-compose-env.sh and keep .env.postgres, .env.redis, and .env.synctv in the current directory.
/health/ready failsRun docker compose logs -f synctv and inspect the first startup error.
Browser CORS errorsSet SYNCTV_SERVER_CORS_ALLOWED_ORIGINS in .env.synctv; use origins only.
Root user cannot log inConfirm SYNCTV_BOOTSTRAP_ROOT_PASSWORD was set before first database startup and inspect bootstrap logs.