Prerequisites
Quickstart
The fastest way to get started is with the docker-compose.yaml file included in the repository. It pulls the pre-built image from Docker Hub automatically.
To run in detached (background) mode:
Add your recording URLs to config/URL_config.ini before starting the container. The config directory is mounted as a volume, so the file must exist on the host before the container launches.
docker-compose.yaml
The full compose file used to run the recorder:
version: '3.8'
services:
app:
image: ihmily/douyin-live-recorder:latest
environment:
- TERM=xterm-256color
tty: true
stdin_open: true
#build: .
volumes:
- ./config:/app/config
- ./logs:/app/logs
- ./backup_config:/app/backup_config
- ./downloads:/app/downloads
restart: always
Volume mounts
| Host path | Container path | Purpose |
|---|
./config | /app/config | Configuration files, including URL_config.ini and config.ini |
./logs | /app/logs | Runtime log files |
./backup_config | /app/backup_config | Automatic config backups |
./downloads | /app/downloads | Recorded video output |
All four directories are created automatically by Docker Compose if they do not already exist on the host.
Docker Hub image
The official pre-built image is published at:
ihmily/douyin-live-recorder
The compose file defaults to the latest tag. To pin a specific version, change the image field:
image: ihmily/douyin-live-recorder:v4.0.7
The Docker Hub image may not always reflect the very latest commit on the main branch. If you need the most recent code, build a custom image from source instead.
Building a custom image from source
To build and run from the local source tree:
-
Edit
docker-compose.yaml — change the image name and uncomment the build line:
image: douyin-live-recorder:latest
#build: . <-- uncomment this line
-
Build the image and start the container:
docker build -t douyin-live-recorder:latest .
docker-compose up
Or build and start in a single step:
docker-compose -f docker-compose.yaml up
Viewing logs
To follow the container output in real time:
Stopping the container
Do not forcefully kill or interrupt a running container while recordings are in progress. Abrupt termination will corrupt the video files currently being written.
Use ts as the recording format in config/config.ini. TS is a container format that is resilient to unexpected interruptions — if recording does stop abruptly, the file up to that point remains playable.