Skip to content

Full Configuration Example

The full template is for discovering field names, confirming hierarchy, and preparing your own configuration file. Do not copy every default into production unless you intentionally own that value. Production configs should usually pin secrets, database, Redis, domains, reverse proxy settings, storage paths, and enabled feature settings.

Recommended workflow:

  1. Start from the minimal production skeleton below.
  2. Copy individual sections from the full template only when you enable the matching feature.
  3. Run synctv config validate.
  4. Run synctv config show --output yaml to inspect the final effective configuration after defaults, config files, environment variables, and CLI overrides are merged. Secrets are redacted.

Use _file keys for secrets whenever possible.

server:
host: "0.0.0.0"
port: 8080
enable_reflection: false
cors_allowed_origins:
- "https://app.example.com"
trusted_proxies:
- "10.0.0.0/8"
data_dir: "/var/lib/synctv"
database:
url_file: "/run/secrets/database_url"
max_connections: 20
min_connections: 5
redis:
url_file: "/run/secrets/redis_url"
key_prefix: "synctv:"
jwt:
secret_file: "/run/secrets/jwt_secret"
security:
credential_encryption_key_file: "/run/secrets/credential_encryption_key"
opaque_server_setup_secret_file: "/run/secrets/opaque_server_setup_secret"
management:
enabled: true
transport: "unix"
enable_reflection: false
bootstrap:
create_root_user: true
root_username: "root"
root_email: "admin@example.com"
root_password_file: "/run/secrets/bootstrap_root_password"
logging:
level: "info"
format: "json"
metrics:
enabled: true
host: "0.0.0.0"
port: 9090
auth:
mode: "bearer_token"
bearer_token_file: "/run/secrets/metrics_bearer_token"

This skeleton does not enable clustering, WebAuthn, OAuth2, SMTP, media provider instances, file-backed HLS storage, or file-backed proxy slice cache. Add those only when the corresponding feature is required.

database and redis both support full URLs and split fields. Prefer url_file in production because it minimizes credential exposure.

Database URL form:

database:
url_file: "/run/secrets/database_url"

Database split form:

database:
host: "postgres.example.com"
port: 5432
username: "synctv"
password_file: "/run/secrets/database_password"
name: "synctv"

Redis URL form:

redis:
url_file: "/run/secrets/redis_url"

Redis Sentinel form:

Sentinel cannot be combined with cluster.enabled=true. For clustered deployments, use a stable single Redis endpoint, managed Redis, or a platform that guarantees stable connection semantics.

redis:
deployment_mode: "sentinel"
sentinel_master_name: "mymaster"
sentinel_addresses:
- "redis://sentinel-0.redis:26379"
- "redis://sentinel-1.redis:26379"
- "redis://sentinel-2.redis:26379"
Terminal window
synctv config show --output yaml

With an explicit config file:

Terminal window
synctv --config /etc/synctv/synctv.yaml config show --output yaml

TOML output:

Terminal window
synctv --config /etc/synctv/synctv.yaml config show --output toml
Terminal window
synctv --config /etc/synctv/synctv.yaml config validate

Validation checks required secrets, cluster Redis requirements, TCP management authentication, CORS origins, gRPC message size, WebAuthn origins, and path resolution.