Simple RTMP Restreamer automatically saves all stream and target configuration to a file named simple-rtmp-restreamer.data.json in the application’s working directory. Every time you create or delete a stream, or add or remove a restream target, the file is written immediately. Without a persistent volume mount, this file lives inside the container and is lost when the container is removed or recreated.
Mount a persistent volume
To keep your configuration across container restarts and upgrades, mount the data file from your host into the container. Add a volumes entry to your docker-compose.yml:
services:
restreamer:
image: ghcr.io/kbats183/simple-rtmp-restreamer:latest
ports:
- "6070:6070"
- "1935:1935"
volumes:
- ./simple-rtmp-restreamer.data.json:/app/simple-rtmp-restreamer.data.json
Before starting the container for the first time, create an empty file on the host so Docker does not create a directory in its place:
touch simple-rtmp-restreamer.data.json
If you do not mount the data file as a volume, your stream configuration is lost every time the container restarts or is recreated. Always mount this file in production deployments.
Back up your configuration
To back up your stream configuration, copy the JSON file to a safe location:
cp simple-rtmp-restreamer.data.json simple-rtmp-restreamer.data.backup.json
The file is plain JSON and can be stored in version control, copied to remote storage, or included in an automated backup routine.
Restore from a backup
To restore a previous configuration, replace the data file and restart the container:
cp simple-rtmp-restreamer.data.backup.json simple-rtmp-restreamer.data.json
docker compose restart restreamer
The file contains a JSON array of stream objects. Each stream has a name and a list of restream targets:
[
{
"name": "my-stream",
"targets": [
{ "name": "YouTube", "url": "rtmp://a.rtmp.youtube.com/live2/YOUR_KEY" }
]
}
]
You can edit this file manually to bulk-import streams or targets, then restart the container to apply changes.