Quick start
1. Install Docker if not present
Native installations without Docker are possible, but not supported.
Issues are not observed.
2. Continue with the Beginner's Guide
Docker images
Select the CPU architecture and, if desired, the GPU support:
docker run {...params} datarhei/core:latest
Pi 3 supports MMAL/OMX for 32 Bit (64 Bit is not supported).
Pi4 supports V4LM2M for 32/64 Bit
docker run {...params} --privileged datarhei/core:rpi-latest
Hint: raspi-config requires gpu_mem=256 or more.
docker run {...params} --runtime=nvidia datarhei/core:cuda-latest
docker run {...params} --volume /dev/dri:/dev/dri datarhei/core:vaapi-latest
Docker run {...params}
All default values can be changed and are described on the Configuration page.
Complete example:
docker run --detach --name core \
--privileged \
--security-opt seccomp=unconfined \
--env CORE_API_AUTH_ENABLE=true \
--env CORE_API_AUTH_USERNAME=admin \
--env CORE_API_AUTH_PASSWORD=datarhei \
--publish 1935:1935 \
--publish 1936:1936 \
--publish 6000:6000/udp \
--publish 8080:8080 \
--publish 8181:8181 \
--volume ${PWD}/core/config:/core/config \
--volume ${PWD}/core/data:/core/data \
datarhei/core:latest
${PWD} creates a folder structure in the folder where the command is issued. Please correct this if necessary.
docker run --detach --name core --privileged --security-opt seccomp=unconfined --env CORE_API_AUTH_ENABLE=true --env CORE_API_AUTH_USERNAME=admin --env CORE_API_AUTH_PASSWORD=datarhei --publish 1935:1935 --publish 1936:1936 --publish 6000:6000/udp --publish 8080:8080 --publish 8181:8181 --volume %USERPROFILE%/core/config:/core/config --volume %USERPROFILE%/core/data:/core/data datarhei/core:latest
Replace %USERPROFILE% with something like c:/myfolder
Directory exports
docker ...
--volume $HOST_DIR:$CORE_DIR \
...
$HOST_DIR
can be adjusted without reconfiguring the app. For the $CORE_DIR,
check the configuration instructions.
Configuration directory
--volume ${PWD}/core/config:/core/config
Directory for holding the config and operational data.
${PWD} creates a folder structure in the folder where the command is issued. Please correct this if necessary.
Data directory
--volume ${PWD}/core/data:/core/data
Directory on disk, exposed on HTTP path “/“.
${PWD} creates a folder structure in the folder where the command is issued. Please correct this if necessary.
Port
docker ...
--publish $HOST_PORT:$CORE_PORT \
...
$HOST_PORT
can be adjusted without reconfiguring the app. For the $CORE_PORT,
check the configuration instructions.
HTTP Port
HTTP listening address.
HTTPS Port
HTTPS listening address.
RTMP Port
RTMPS Port
RTMP server listen address.
SRT Port (UDP)
--publish 6000:6000/udp
SRT server listen address.
/udp is required for SRT port-mapping.
docker ...
--net=host \
...
With --net=host the container is started without network isolation. In this case, port forwarding is not required.
Environment variables
docker ...
--env CORE_API_AUTH_ENABLE=true \
--env CORE_API_AUTH_USERNAME=admin \
--env CORE_API_AUTH_PASSWORD=datarhei \
...
More in the Configuration instructions.
Device access
Allow FFmpeg to access GPU's, USB and other devices available in the container.
Network issues (seccomp)
If seccomp is active and no internal-to-external communication is possible:
--security-opt seccomp=unconfined
Docker commands
Start in background
docker run --detach --name core {params ...} {image}
Stop
Kill and remove the instance
docker kill core
docker rm core
Update the local image and restart the Core
docker pull {image}
docker kill core
docker rm core
docker run {params ...} {image}
Top
Logging
Systemd
To manage the Core container via systemd (systemd is a Linux process daemon.)
Service file
/etc/system/systemd/core.service
[Unit]
Description=datarhei Core
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStart=/usr/bin/docker run \
--rm --name core --privileged \
--security-opt seccomp=unconfined \
-v /opt/core/config:/core/config \
-v /opt/core/data:/core/data \
-p 8080:8080 -p 8181:8181 \
-p 1935:1935 -p 1936:1936 \
-p 6000:6000/udp \
datarhei/core:latest
ExecStop=/usr/bin/docker kill core
[Install]
WantedBy=multi-user.target
Adjust the docker command options according to your setup.
Commands
Install
systemctl daemon-reload && systemctl enable core.service
Uninstall
systemctl disable core.service
Start
systemctl start core.service
Stop
systemctl stop core.service
Update image
docker pull datarhei/core:latest && \
systemctl restart core.service
Status
systemctl status core.service
Logging
journald -u core.service -f