Skip to content

Configuring Flussonic Media Server


Restarting Flussonic Media Server

To restart the server with Flussonic, run this command:

service flussonic restart

The server's global options

Global options include ports for protocols and general settings. Find all the available global settings and options in the config section of the Flussonic Media Server API Reference.

Ports and protocols

Options (Ports and Protocols) Description
https 443; Turns on accepting HTTPS requests via the specified port. Multiple ports can be specified with multiple lines.
http 80; Turns on accepting HTTP requests via the specified port. Multiple ports can be specified with multiple lines.
http; Turns on accepting HTTP requests via the specified port and IP address. Multiple ports can be specified with multiple lines.
rtmp 80; Turns on accepting RTMP requests via the specified port.
rtmps 1443; Turns on accepting RTMPS requests via the specified port.
rtsp 554; Turns on accepting RTSP requests via the specified port.
rtsps 1554; Turns on accepting RTSPS requests via the specified port.


When configuring the protocols HTTPS, RTMPS, and RTSPS, Flussonic Media Server expects that there are certificates in the directory /etc/flussonic.

The RTMPS protocol works only if you have a valid certificate that works without any warnings or errors.

Flussonic Media Server expects the private key of the server in the file /etc/flussonic/streamer.key with the password flussonic. The server's certificate is in the file /etc/flussonic/streamer.crt. The intermediate certificate and CA certificate are in /etc/flussonic/streamer-ca.crt.

For example, when you receive the purchased set of keys and certificates, you must do the following:

cat intermediate.crt ca.crt > /etc/flussonic/streamer-ca.crt
cp server.crt /etc/flussonic/streamer.crt
openssl rsa -des3 -in server.key -out /etc/flussonic/streamer.key

Other server options

Server Options Description
loglevel debug; Manages the level of detail in the data being logged. Variable values: debug, notice, error.
logrequests true; Turns on logging all HTTP requests to /var/log/flussonic/access.log.
total_bandwidth 10G; Specifies max channel depth. Necessary for load balancing in a cluster.
auth_token TOKEN; Specifies name of the query string parameter to be interpreted as the authorization token.
max_sessions 1000; Sets global limit on the quantity of concurrent sessions.
cluster_key SECRETKEY; This line of code is used for authorizing other Flussonic servers comprising a cluster.
view_auth USER PASSWORD; Turns on authorization for read-only access to API.
edit_auth USER PASSWORD; Login and password for administrator access to the server.
api_allowed_from 10/8 192.168/16; Specifies IP addresses or networks from which accessing API is allowed.
event_sink HANDLER_NAME {url http://backend/event.php;}, event_sink HANDLER_NAME {url /etc/flussonic/events.lua;} Flussonic events will be sent to the specified URL or script. Learn more in Events API.
pulsedb /var/lib/flussonic; Specifies the path to which streams statistical data will be recorded.
session_log /var/lib/flussonic; Specifies the path to which session history will be recorded.
url_prefix PREFIX, url_prefix; This option applies to HLS or DASH protocols, for all streams on the server. The addresses of individual segments within a segment-based playlist will start with the specified prefix. This option no longer works for variant playlists. Use it for segment-based playlists, such as tracks-v1a1/mono.m3u8 (but not for variant ones such as index.m3u8). This setting is available in the global part of the config file as well as locally for any individual stream. Naturally, when specified at the stream level, it is only valid for this particular stream.
source SOURCE/PREFIX;, source SOURCE/PREFIX { }, source { } This directive turns on automated stream repeating to the local server from a remote one.
stream ntv { input tshttp://source/ntv.ts; } The stream directive turns on a permanent stream that will be kept alive for the entire lifetime of the server, even if no data sources are available.
ondemand ntv { input tshttp://source/ntv.ts; } The ondemand directive specifies the stream to be started on demand. If the stream has been unavailable for a certain amount of time, it will be turned off automatically.
live published { } The live directive makes it possible to publish to the server all streams with the names starting with published/.
vod vod { path /storage; } The vod directive turns on broadcasting for all files in the /storage directory with the names starting with vod/. Please see below for the vod directive's options.
cache globalcache /var/www misses=4 2d 40G; Сonfigures a global cache named globalcache in the /var/www directory, with the limits of 40 Gigabytes and 2 days. Flussonic begins to cache files only after the 4th request for the files (cache miss).
nvidia_monitor true; Сonfigures Flussonic to save statistics on Nvidia performance (true) or to stop saving it (false). Learn more.
geoip PATH_TO_DATABASE; Сonfigures Flussonic to use the specified GeoLite2 database for geolocation instead of the built-in GeoLite2 database. Learn more.

Starting Flussonic without configuration file

Flussonic configuration file is not the only source of Flussonic settings. Some settings can be defined in:

  • Includes—immutable partial configuration files in /etc/flussonic/flussonic.conf.d/*.conf. These files are usually created by the system starting Flussonic, for example, Kubernetes. Flussonic doesn't write any data to these files, so you can't modify them.
  • Environment variables. For Flussonic to start without configuration file, it is enough to specify the environment variables HTTP_PORT and EDIT_AUTH. For example: HTTP_PORT=80, EDIT_AUTH=login pass.

Flussonic settings are applied in the following order:

  1. Includes on the disk
  2. Configuration file on the disk
  3. Environment variables

Thus, environment variables will override all other settings. If the resulting configuration is invalid, Flussonic will not start and the maintenance page will be displayed.