Production Deployment
Rust-Srec runs as a self-hosted, single-node service. If clustering or failover is a requirement, read Scope and Limits before going further.
Reference Topology
Keep the backend, database, configuration, and output paths on one trusted host. Publish only the frontend through a TLS reverse proxy unless an API integration specifically requires direct API access.
Deployment Baseline
- Use the Docker deployment and set
VERSION=v0.5.1for both images. Avoidlatestwhere changes must be reviewed before rollout. - Generate unique values for
JWT_SECRETandSESSION_SECRET; store the.envfile with restrictive permissions. - Bind host ports to a private address or loopback. In Compose, a loopback-only mapping takes the form
127.0.0.1:15275:80and127.0.0.1:12555:8080. - Terminate HTTPS at a maintained reverse proxy and forward
Host,X-Forwarded-For, andX-Forwarded-Proto. The session cookie is markedSecureautomatically once the proxy sendsX-Forwarded-Proto: https. If the proxy cannot send that header, setCOOKIE_SECURE=trueexplicitly. - Put
DATA_DIR,CONFIG_DIR,OUTPUT_DIR, andLOG_DIRon persistent storage. Size and monitor the output volume separately from the system disk. - Set resource and application concurrency limits for the host. Start conservatively and load-test the expected number and bitrate of simultaneous streams.
- Configure notifications for recording failures, pipeline failures, credential expiry, and output-root write failures.
- Complete a backup and restore drill before adding production channels.
Network Boundary
The frontend reaches the API over BACKEND_URL=http://rust-srec:8080 on the private Compose network. The host API port is useful for local administration and integrations, but it does not need to be Internet-facing for ordinary browser use.
If direct API access is required, proxy it through HTTPS, restrict source networks, and use individual credentials. Swagger exposes the complete attack surface and should not be public by default.
Capacity and Reliability
- SQLite, output files, and pipeline work make storage latency material. Do not use an unreliable network filesystem without testing locking, atomic rename, and sustained write behavior.
- Recording and transcode peaks are different workloads. Limit
max_concurrent_downloads, CPU jobs, IO jobs, and uploads independently. - Docker restart policies recover a failed process, but do not provide host failover. Monitor the host as well as the container.
- Keep enough free space for an active recording, temporary pipeline files, and rollback snapshots. See Storage and Capacity.
Go-Live Checklist
- Default password changed and unused accounts disabled.
- Secrets replaced, protected, and absent from logs and tickets.
- TLS and secure cookies verified from the user-facing URL.
- Backend and Swagger not publicly exposed without a requirement.
- Persistent volume ownership and free-space alerts verified.
- Liveness and authenticated readiness checks monitored.
- Restore drill and rollback procedure completed.
- Platform recording permission, retention, and privacy requirements approved.
Continue with Security, Backup and Restore, and Monitoring.