Installation

How to start and configure the Core via Docker.

Quick start

1. Install Docker if not present

Docker images can also be run with other OCI-compatible container services, like podman, Buildah, containerd, LXC and kaniko.

Native installations without Docker are possible, but not supported. Issues are not observed.

2. Continue with the Beginner's Guide

pageBeginner

Docker images

Select the CPU architecture and, if desired, the GPU support:

docker run {...params} datarhei/core: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.

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

--publish 8080:8080

HTTP listening address.

HTTPS Port

--publish 8181:8181

HTTPS listening address.

RTMP Port

--publish 1935:1935

RTMPS Port

--publish 1936:1936

RTMP server listen address.

SRT Port (UDP)

--publish 6000:6000/udp

SRT server listen address.

/udp is required for SRT port-mapping.

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

--privileged

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

docker stop core

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

docker top core

Logging

docker logs core -f

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

Last updated