-
Notifications
You must be signed in to change notification settings - Fork 5
Server & TLS
im-pingo edited this page Mar 26, 2026
·
1 revision
English | 中文
The server section controls general server behavior.
server:
name: "streamserver-01"
log_level: info
drain_timeout: 30s| Field | Type | Default | Description |
|---|---|---|---|
name |
string | "liveforge" |
Server instance name, included in API responses |
log_level |
string | "info" |
Log verbosity: debug, info, warn, error
|
drain_timeout |
duration | 30s |
Time to wait for active connections to finish during graceful shutdown |
The tls section provides global TLS certificate settings. When configured, all modules use TLS by default.
tls:
cert_file: "/etc/ssl/certs/server.crt"
key_file: "/etc/ssl/private/server.key"| Field | Type | Description |
|---|---|---|
cert_file |
string | Path to the PEM-encoded certificate file |
key_file |
string | Path to the PEM-encoded private key file |
TLS is considered configured when both cert_file and key_file are non-empty.
Each protocol module (RTMP, RTSP, HTTP, WebRTC, API) has an optional tls field of type *bool (a three-state boolean):
Module tls value |
Global TLS configured | Result |
|---|---|---|
nil (not set) |
Yes | TLS enabled (follows global) |
nil (not set) |
No | TLS disabled (follows global) |
true |
Yes | TLS enabled (forced on) |
true |
No | Error: no certificate available |
false |
Yes | TLS disabled (forced off) |
false |
No | TLS disabled |
This allows fine-grained control per module. For example, you may want RTMPS on port 1935 but plain HTTP streaming on port 8080.
tls:
cert_file: "/etc/ssl/certs/server.crt"
key_file: "/etc/ssl/private/server.key"
rtmp:
enabled: true
listen: ":1935"
# tls not set -> follows global -> RTMPS
http_stream:
enabled: true
listen: ":8080"
tls: false # Force plain HTTP despite global TLS
webrtc:
enabled: true
listen: ":8443"
# tls not set -> follows global -> HTTPS signaling
api:
enabled: true
listen: ":8090"
tls: false # Force plain HTTP for management APIIn this configuration, RTMP and WebRTC listeners use TLS, while the HTTP streaming and API listeners remain plain HTTP.