LogoLogo
  • About
  • Installation
  • Update & migration
  • Configuration
    • Hostname
    • TLS / HTTPS
    • Database
    • Logging
    • API Security
    • Storage
      • Disk
      • In-memory
      • S3
    • RTMP
    • SRT
    • FFmpeg
    • Sessions
    • Metrics
    • Router
    • Debug
  • API Swagger-Documentation
  • API Clients
  • Web-Interface
  • Guides
    • Beginner
    • RTMP
    • SRT
    • Filesystems
  • General
    • Prometheus metrics
  • API
    • Login
    • Config
    • Log
    • Filesystem
      • Disk
      • In-memory
      • S3
    • Metrics
    • Sessions
    • Profiling
    • Ping
  • API / FFmpeg
    • Process
      • Command
      • Metadata
      • State
      • Probe
      • Report
    • Skills
    • Widget (Website)
  • API / RTMP
    • RTMP
  • API / SRT
    • SRT
  • Development
    • Architecture
    • Coding
    • Custom Docker images
    • Benchmark
    • Support
Powered by GitBook
On this page
  • Quick start
  • Docker images
  • Docker run {...params}
  • Directory exports
  • Port
  • Environment variables
  • Device access
  • Network issues (seccomp)
  • Docker commands
  • Systemd
  • Service file
  • Commands

Was this helpful?

Export as PDF

Installation

How to start and configure the Core via Docker.

PreviousAboutNextUpdate & migration

Last updated 2 years ago

Was this helpful?

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

--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.

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 \
    ...

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

Docker images can also be run with other -compatible container services, like , , , and .

More in the instructions.

OCI
podman
Buildah
containerd
LXC
kaniko
Beginner
Configuration
Install Docker EngineDocker Documentation
Logo