Deploy a standalone Packager
This walkthrough turns a working standalone configuration into a persistent Docker service. First complete the quickstart or your chosen recipe and verify playback. For control-plane-owned tasks, follow managed operation instead.
Prepare the configuration and storage
Prepare the host as described in Installation, including clock synchronization, which is strongly recommended on every Packager host.
Keep the following in a deployment directory:
config/config.toml: the complete v3 configuration you have tested.media/: any local media, images or fonts used by that configuration.output/: persistent recording output, if required.
Mount inputs read-only and ensure the container user can write to output/.
Keep credentials in access-controlled configuration or your deployment's secret
management system. Retain a copy of the working configuration and its exact image
tag or digest for rollback.
For the container networking below, configure the API to listen inside the container and set a private API key. Replace the key before deployment:
[api]
bind = "0.0.0.0:4040"
api_key = "REPLACE_WITH_YOUR_PRIVATE_API_KEY"
Insert this into the existing configuration; do not add a second [api] table.
The Docker command publishes the API on host loopback only. Remote management
and monitoring should use your private network or an authenticated HTTPS access
path. Health and metrics requests need the same bearer key as other API calls.
Start the service
Set PACKAGER_IMAGE to your supplied release tag or digest as described in
image selection, then pull it before starting:
docker pull "${PACKAGER_IMAGE:?Set PACKAGER_IMAGE to your release image}"
docker run -d --name packager \
--restart unless-stopped \
--log-driver local \
-p 127.0.0.1:4040:4040 \
-p 10000:10000/udp \
-v "$PWD/config:/etc/packager:ro" \
-v "$PWD/media:/media:ro" \
-v "$PWD/output:/output" \
"${PACKAGER_IMAGE:?Set PACKAGER_IMAGE to your release image}" start
This command suits the quickstart's file-to-SRT pipeline and includes an optional recording mount. Connect a receiver using the quickstart playback command. Adjust media ports and device mappings for your actual configuration, including the GPU/SDI settings in Usage. NDI discovery may require host networking; reassess the API bind address when using that network mode.
The local logging driver rotates container logs; configure retention or forwarding
to suit your operations. See Docker local logging.
The unless-stopped policy restarts the container after an exit or Docker restart
while preserving an intentional manual stop. It does not restart a process simply
because media has stopped flowing. See Docker restart policies.
Check readiness and playback
Inspect startup logs:
docker logs --tail 100 packager
In a Bash terminal, enter the same API key used in config.toml and query status:
read -r -s -p 'Packager API key: ' PACKAGER_API_KEY
curl --fail-with-body -H "Authorization: Bearer $PACKAGER_API_KEY" \
http://127.0.0.1:4040/healthcheck
curl --fail-with-body -H "Authorization: Bearer $PACKAGER_API_KEY" \
http://127.0.0.1:4040/api/sources
curl --fail-with-body -H "Authorization: Bearer $PACKAGER_API_KEY" \
http://127.0.0.1:4040/api/sinks
The process health endpoint confirms that the HTTP service responds. Readiness also requires the intended inputs and outputs to be running, with increasing media counters and playable output. Connect any required SRT peer before judging listener readiness. Inspect the picture, selected audio, lip sync and output formats at the destination.
For HLS, arrange HTTP delivery of output/ or publish to your configured storage
service/CDN. The recording guide's local HTTP server is a playback test tool; choose
your production serving infrastructure separately.
Monitor operation
Configure your monitoring system using the Prometheus example.
Its target must be reachable from the scraper; 127.0.0.1 inside a separate
container refers to that container. Keep the API key available to the scraper.
Monitor required source/sink health, output traffic, reconnect counts, frame processing time, and available recording storage. Set thresholds around your expected stream rather than treating process health as a playback guarantee. Use Lifecycle and recovery to rehearse input loss and restart behavior before accepting production traffic.
Update and roll back
A single-instance replacement interrupts its output. Schedule a maintenance window or use your tested redundant deployment and handover procedure.
- Keep the current image reference, configuration, and launch settings together as a known working release. Save durable API changes before taking this copy.
- Test the candidate image with a copy of the configuration on separate ports and output storage. Use a test destination so it does not compete with the live publisher or write to the live recording directory.
- Pull the candidate image, stop the old container, and remove that stopped container. Keep the mounted configuration and media directories.
- Start the replacement with the tested image and configuration, using the same required network, device and storage settings. Repeat readiness and playback checks and inspect any recovered recording.
- If verification fails, stop and remove the replacement, restore the previous configuration and image reference, and repeat the launch and playback checks.
For the service name used above, the replacement step is:
docker stop --time 30 packager
docker rm packager
Then run the service-start command with the chosen image and configuration.
Changing PACKAGER_IMAGE or running docker restart alone does not replace a
container's image. Preserve recording data separately from configuration backups;
rolling back an image does not undo changes to recorded media.