Flussonic Media Server documentation


Configuring Flussonic Media Server


Flussonic Media Server configuration management

Flussonic Media Server settings are stored in the configuration file /etc/flussonic/flussonic.conf.

You can edit Flussonic settings in several ways:

After you have made changes to configuration parameters within flussonic.conf, you must reload the Flussonic Media Server service with the following command:

/etc/init.d/flussonic reload

Another way to reload the service is to use the HTTP API:

curl -u user:pass http://localhost:8080/flussonic/api/reload

where user:pass — the login and password specified in the option edit_auth (see Other server options later on this page) .

Restarting Flussonic Media Server

To restart the server with Flussonic, run this command:

/etc/init.d/flussonic restart

The server's global options

Global options include ports for protocols and general settings.

Ports and protocols

Server 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.
mysql 3306; Turns on accepting MySQL queries via the specified port.


When configuring protocol 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/flussonic.key with the password flussonic. The server's certificate is in the file /etc/flussonic/flussonic.crt. The intermediate certificate and CA certificate are in /etc/flussonic/flussonic-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/flussonic-ca.crt
cp server.crt flussonic.crt
openssl rsa -des3 -in server.key -out flussonic.key

Other server options

Server Options Description
loglevel info; Manages the level of detail in the data being logged. Variable values: debug, info, alert.
logrequests true; Turns on logging all HTTP requests to /var/log/flussonic/access.log.
auth_token TOKEN; Specifies the name of the query string parameter to be interpreted as the authorization token.
auth false; Turns off authorization at the global scope.
auth http://backend/auth.php; Turns on the authorization backend at the global scope.
max_sessions 1000; Sets global limit on the quantity of concurrent sessions.

auto_token false;
If this option is specified, any incoming request without the token variable in the query string will be refused immediately.
auto_token UUID; If this option is specified, the authorization token will be generated automatically, provided that it is not found within the query string.
auto_token blank; If this option is specified, a blank authorization token will be accepted, provided that no token is found within the query string. This is the default behavior.
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.
  sink http://backend/event.php;

  sink /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.
session_log false; Disables writing sessions to disk.
url_prefix PREFIX

url_prefix http://my.domain.address.com:8080;
When using the HLS protocol, for all streams on the server the addresses of individual segments and playlists within the playlist variable will start with the speicified prefix. 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 origin1.tv {
This directive turns on automated stream repeating to the local server from a remote one.
stream ntv {
  url 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. Please see below for the stream directive's options.
ondemand ntv {
  url 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. Please see below for the ondemand directive's options.
rewrite client16/* {
  url rtmp://origin/%s;
The rewrite directive turns on dynamic stream start on demand, for all streams with the names satisfying the client16/* mask. Please see below for the rewrite directive's options.
live published { } The live directive makes it possible to publish to the server all streams with the names starting with published/. Please see below for the live directive's options.
file vod {
  path /storage;
The file directive turns on broadcasting for all files in the /storage directory with the names starting with vod/. Please see below for the file 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, and Flussonic beginning to put files in the cache only after 4 requests for the files (cache misses).
nvidia_monitor true; Сonfigures Flussonic to save statistics on Nvidia performance (true) or to stop saving it (false). You can retrieve the statistics figures in the Pulse section in the UI. Run a custom query like this one `sum:1m-avg:gpu_dec{from=-2h,gpu=nv0}`. 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