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
  • Location
  • Configuration
  • id (string)
  • name (string)
  • address (string)
  • log
  • db
  • host
  • api
  • tls
  • storage
  • rtmp
  • srt
  • ffmpeg
  • session
  • metrics
  • route
  • debug
  • update_check (bool)

Was this helpful?

Export as PDF

Configuration

Location

You have to provide the location of the config file by setting the environment variable CORE_CONFIGFILE to path to the config file. Example:

export CORE_CONFIGFILE=./config/config.json

The config file is written in JSON format.

If the config file doesn't exist yet, it will be created and its fields will be filled with their default values.

If the config file is partially complete or of an older version, it will be upgraded and the missing fields will be filled with their default values.

If you don't provide the CORE_CONFIGFILE environment variable, the default config values will be used and the configuration will not be persisted to the disk.

As of version 16.12.0:

If no path is given in the environment variable CORE_CONFIGFILE, different standard locations will be probed:

  • os.UserConfigDir() + /datarhei-core/config.js

  • os.UserHomeDir() + /.config/datarhei-core/config.js

  • ./config/config.js

If the config.js doesn't exist in any of these locations, it will be assumed at ./config/config.js

A minimal valid config file must contain at least the config version:

{
    "version": 3
}

Configuration

{
   "version": 3,
   "id": "1",
   "name": "super-core-1337",
   "address": ":8080",
   "log": {
      "level": "warn"
   }
}
CORE_ID=1
CORE_NAME=super-core-1337
CORE_ADDRESS=:8080
CORE_LOG_LEVEL=warn

Following, every field of the configuration file will be described in detail:

id (string)

ID of the Core. If not set, a UUIDv4 will be generated. Default: unset

name (string)

Human-readable name of the Core. If not set a custom name will be generated. Default: unset

address (string)

HTTP listening address. Default: :8080

The default :8080 will listen on all interfaces on port 8080. To use a specific interface, write additionally it's IP, e.g. 127.0.0.1:8080 to only listen on the loopback interface.

log

Log settings.

db

Database (processes, metadata, ...) endpoint.

host

Configuration to detect or set the host-/domainname.

api

API Security options.

tls

TLS/HTTPS settings (also required for RTMPS).

storage

General configuration, DiskFS, MemFS, and S3.

rtmp

RTMP server for publishing and playing streams.

srt

SRT server for publishing and playing streams.

ffmpeg

General FFmpeg settings.

session

HLS-/MPEG-DASH session management and bandwidth limitations.

metrics

General metrics settings.

route

HTTP/S route configuration (e.g., to inject UI's).

debug

Core / Golang debugging options.

update_check (bool)

All about datarhei Update-Checks and data tracking.

{
   "update_check": true,
   "service": {
      "url": "https://service.datarhei.com"
   }
}

CORE_UPDATE_CHECK=true

CORE_SERVICE_URL=https://service.datarhei.com

Check for updates and send anonymized data (default: false). Requires service.url.

IP addresses are anonymized and stored for 30 days on servers in the EU.

service.url (string)

URL for the update_check Service API. Default: https://service.datarhei.com

About anonymizied data:

We receive: id, os architecture, uptime, process stats (total: running, failed, killed), viewer count

The data is used exclusively for the further development of the products and error detection. Domains/IP addresses, companies, and persons remain anonymous.

PreviousUpdate & migrationNextHostname

Last updated 2 years ago

Was this helpful?

Configuration values can be changed by either editing the config file directly, or via the (API for short) or via environment variables (ENV for short). All environment variables have the prefix CORE_ followed by the JSON names in uppercase. Example:

JSON API
Logging
Database
Hostname
API Security
TLS / HTTPS
Storage
RTMP
SRT
FFmpeg
Sessions
Metrics
Router
Debug