Configuration
Configuration can be done via a configuration file, command line arguments or environment variables.
- File
- Environment variables
- Command line arguments
- Generate a configuration file with default values:
- TOML
- YAML
/opt/yucca/yucca server --show-config --show-config-format=toml
/opt/yucca/yucca server --show-config --show-config-format=yaml
- You can view all available environment variables with the following command:
/opt/yucca/yucca server --show-config --show-config-format=env
- You can view all available command line arguments with the following command:
/opt/yucca/yucca server --help
Parameters are divided into logical sections (blocks) that correspond to the prefix in command line arguments and environment variables.
server
Global server parameters.
log_level
Logging level for the server.
Possible values: panic, fatal, error, warning, info, debug
infoThe value can be defined in one of the following ways:
- using a launch argument:
--log-level=info - using an environment variable:
#!shell export YUCCA_SERVER_LOG_LEVEL=info - using a configuration file:
# /opt/yucca/yucca.toml
[server]
log_level = "info"
data_dir
Global directory for storing state (when using sqlite3) and stream data.
./dataThe value can be defined in one of the following ways:
- using a launch argument:
--data-dir=/opt/yucca/data/ - using an environment variable:
#!shell export YUCCA_SERVER_DATA_DIR=/opt/yucca/data/ - using a configuration file:
# /opt/yucca/yucca.toml
[server]
data_dir = "/opt/yucca/data/"
alloc_dir
Directory with stream data (video archive and other data).
<data_dir>/allocThe value can be defined in one of the following ways:
- using a launch argument:
--alloc-dir=/opt/yucca/data/alloc/ - using an environment variable:
#!shell export YUCCA_SERVER_ALLOC_DIR=/opt/yucca/data/alloc/ - using a configuration file:
# /opt/yucca/yucca.toml
[server]
alloc_dir = "/opt/yucca/data/alloc/"
state_dir
Directory with the database file (when using sqlite3).
<data_dir>/serverThe value can be defined in one of the following ways:
- using a launch argument:
--state-dir=/opt/yucca/data/server/ - using an environment variable:
#!shell export YUCCA_SERVER_STATE_DIR=/opt/yucca/data/server/ - using a configuration file:
# /opt/yucca/yucca.toml
[server]
state_dir = "/opt/yucca/data/server/"
temp_dir
tmpfs directory for short-lived data. (this is where rotated chunks for a live stream are stored)
/dev/shm/yuccaThe value can be defined in one of the following ways:
- using a launch argument:
--temp-dir=/dev/shm/yucca - using an environment variable:
#!shell export YUCCA_SERVER_TEMP_DIR=/dev/shm/yucca - using a configuration file:
# /opt/yucca/yucca.toml
[server]
temp_dir = "/dev/shm/yucca"
alloc_dir_warning_threshold
Threshold percentage for the disk usage warning.
All administrators will see a warning in the server interface, and if an SMTP client is configured, all administrators will also receive a notification by e-mail that disk space is running low.
80The value can be defined in one of the following ways:
- using a launch argument:
--alloc-dir-warning-threshold=80 - using an environment variable:
#!shell export YUCCA_SERVER_ALLOC_DIR_WARNING_THRESHOLD=80 - using a configuration file:
# /opt/yucca/yucca.toml
[server]
alloc_dir_warning_threshold = "80"
stats_collection_interval
Interval for collecting system resource statistics.
1sThe value can be defined in one of the following ways:
- using a launch argument:
--stats-collection-interval=1s - using an environment variable:
#!shell export YUCCA_SERVER_STATS_COLLECTION_INTERVAL=1s - using a configuration file:
# /opt/yucca/yucca.toml
[server]
stats_collection_interval = "1s"
default_language
Default interface language for new users, also used on the login page.
Possible values: en, ru, uk, es, pt, tr
enThe value can be defined in one of the following ways:
- using a launch argument:
--default-language=en - using an environment variable:
#!shell export YUCCA_SERVER_DEFAULT_LANGUAGE=en - using a configuration file:
# /opt/yucca/yucca.toml
[server]
default_language = "en"
domain
Used to determine the Server field when configuring receiving events by Email
""The value can be defined in one of the following ways:
- using a launch argument:
--domain=demo.yucca.app - using an environment variable:
#!shell export YUCCA_SERVER_DOMAIN=192.168.188.15 - using a configuration file:
# /opt/yucca/yucca.toml
[server]
domain = "demo.yucca.app"
health_check_interval
Interval for checking the health of dependencies.
"30s"The value can be defined in one of the following ways:
- using a launch argument:
--health-check-interval="30s" - using an environment variable:
#!shell export YUCCA_SERVER_HEALTH_CHECK_INTERVAL="30s" - using a configuration file:
# /opt/yucca/yucca.toml
[server]
health_check_interval = "30s"
listen_address
IP address and port on which the web interface will be available.
:9910The value can be defined in one of the following ways:
- using a launch argument:
--web.listen-address=:9910 - using an environment variable:
#!shell export YUCCA_SERVER_LISTEN_ADDRESS=:9910 - using a configuration file:
# /opt/yucca/yucca.toml
[server]
listen_address = ":9910"
log_file
Path to the log file; if not specified, stdout is used.
""The value can be defined in one of the following ways:
- using a launch argument:
--log-file=/var/log/yucca.log - using an environment variable:
#!shell export YUCCA_SERVER_LOG_FILE=/var/log/yucca.log - using a configuration file:
# /opt/yucca/yucca.toml
[server]
log_file = "/var/log/yucca.log"
self_logs
View server and stream logs in the interface on the debug tab.
trueThe value can be defined in one of the following ways:
- using a launch argument:
--self-logs=true - using an environment variable:
#!shell export YUCCA_SERVER_SELF_LOGS=false - using a configuration file:
# /opt/yucca/yucca.toml
[server]
self_logs = true
log_buffer_size
Number of recent messages in the interface on the debug tab.
50The value can be defined in one of the following ways:
- using a launch argument:
--log-buffer-size=50 - using an environment variable:
#!shell export YUCCA_SERVER_LOG_BUFFER_SIZE=50 - using a configuration file:
# /opt/yucca/yucca.toml
[server]
log_buffer_size = 50
cert_file
Path to the certificate file when using HTTPS.
""The value can be defined in one of the following ways:
- using a launch argument:
--cert-file=/opt/yucca/ssl/cert.crt - using an environment variable:
#!shell export YUCCA_SERVER_CERT_FILE=/opt/yucca/ssl/cert.crt - using a configuration file:
# /opt/yucca/yucca.toml
[server]
cert_file = "/opt/yucca/ssl/cert.crt"
cert_key
Path to the key file when using HTTPS.
""The value can be defined in one of the following ways:
- using a launch argument:
--cert-key=/opt/yucca/ssl/cert.key - using an environment variable:
#!shell export YUCCA_SERVER_CERT_KEY=/opt/yucca/ssl/cert.key - using a configuration file:
# /opt/yucca/yucca.toml
[server]
cert_key = "/opt/yucca/ssl/cert.key"
pprof
Enable profiling.
falseThe value can be defined in one of the following ways:
- using a launch argument:
--pprof=true - using an environment variable:
#!shell export YUCCA_SERVER_PPROF=true - using a configuration file:
# /opt/yucca/yucca.toml
[server]
pprof = true
pprof_listen_address
IP address and port on which the pprof profiler will be available.
:9911The value can be defined in one of the following ways:
- using a launch argument:
--pprof-listen-address=":9911" - using an environment variable:
#!shell export YUCCA_SERVER_PPROF_LISTEN_ADDRESS=":9911" - using a configuration file:
# /opt/yucca/yucca.toml
[server]
pprof_listen_address = ":9911"
validate
Flag to validate the correctness of the configuration.
The value can be defined in one of the following ways:
- using a launch argument:
--validate
Usage example
./yucca server --config /opt/yucca/yucca.toml --validate
Valid configuration
database
Database connection.
type
2 database types are supported for storing state – sqlite3 and postgres. For small installations, sqlite3 is sufficient; for a large number of streams, we recommend using postgres.
sqlite3The value can be defined in one of the following ways:
- using a launch argument:
--database-type=sqlite3 - using an environment variable:
#!shell export YUCCA_DATABASE_TYPE=sqlite3 - using a configuration file:
# /opt/yucca/yucca.toml
[database]
type = "sqlite3"
path
Path to the database file (sqlite3 only).
<state_dir>/state.dbThe value can be defined in one of the following ways:
- using a launch argument:
--database-path=/opt/yucca/server/state.db - using an environment variable:
#!shell export YUCCA_DATABASE_PATH=/opt/yucca/server/state.db - using a configuration file:
# /opt/yucca/yucca.toml
[database]
path = "/opt/yucca/server/state.db"
host
Database connection address (postgres only).
127.0.0.1:5432The value can be defined in one of the following ways:
- using a launch argument:
--database-host=127.0.0.1:5432 - using an environment variable:
#!shell export YUCCA_DATABASE_HOST=127.0.0.1:5432 - using a configuration file:
# /opt/yucca/yucca.toml
[database]
host = "127.0.0.1:5432"
name
Database name (postgres only).
yuccaThe value can be defined in one of the following ways:
- using a launch argument:
--database-name=yucca - using an environment variable:
#!shell export YUCCA_DATABASE_NAME=yucca - using a configuration file:
# /opt/yucca/yucca.toml
[database]
name = "yucca"
user
Username for the connection (postgres only).
postgresThe value can be defined in one of the following ways:
- using a launch argument:
--database-user=postgres - using an environment variable:
#!shell export YUCCA_DATABASE_USER=postgres - using a configuration file:
# /opt/yucca/yucca.toml
[database]
user = "postgres"
password
Password for the connection (postgres only).
postgresThe value can be defined in one of the following ways:
- using a launch argument:
--database-password=postgres - using an environment variable:
#!shell export YUCCA_DATABASE_PASSWORD=postgres - using a configuration file:
# /opt/yucca/yucca.toml
[database]
password = "postgres"
ssl_mode
Use SSL (encrypted connection) for the connection (postgres only). Possible values: disable, require, verify-full).
disableThe value can be defined in one of the following ways:
- using a launch argument:
--database-ssl-mode=disable - using an environment variable:
#!shell export YUCCA_DATABASE_SSL_MODE=disable - using a configuration file:
# /opt/yucca/yucca.toml
[database]
ssl_mode = "disable"
busy_timeout
Timeout in seconds to wait for the SQLite table to unlock (sqlite3 only).
500The value can be defined in one of the following ways:
- using a launch argument:
--database-busy-timeout=500 - using an environment variable:
#!shell export YUCCA_DATABASE_BUSY_TIMEOUT=500 - using a configuration file:
# /opt/yucca/yucca.toml
[database]
busy_timeout = 500
ca_cert_path
Path to the certificate authority (CA) certificate when using SSL (postgres only).
/etc/ssl/certsThe value can be defined in one of the following ways:
- using a launch argument:
--database-ca-cert-path=/etc/ssl/certs - using an environment variable:
#!shell export YUCCA_DATABASE_CA_CERT_PATH=/etc/ssl/certs - using a configuration file:
# /opt/yucca/yucca.toml
[database]
ca_cert_path = "/etc/ssl/certs"
client_cert_path
Path to the certificate file when using SSL (postgres only).
""The value can be defined in one of the following ways:
- using a launch argument:
--database-client-cert-path=/opt/yucca/ssl/cert.crt - using an environment variable:
#!shell export YUCCA_DATABASE_CLIENT_CERT_PATH=/opt/yucca/ssl/cert.crt - using a configuration file:
# /opt/yucca/yucca.toml
[database]
client_cert_path = "/opt/yucca/ssl/cert.crt"
client_key_path
Path to the key file when using SSL (postgres only).
""The value can be defined in one of the following ways:
- using a launch argument:
--database-client-key-path=/opt/yucca/ssl/cert.key - using an environment variable:
#!shell export YUCCA_DATABASE_CLIENT_KEY_PATH=/opt/yucca/ssl/cert.key - using a configuration file:
# /opt/yucca/yucca.toml
[database]
client_key_path = "/opt/yucca/ssl/cert.key"
cache_mode
Shared cache setting used for the database connection (sqlite3 only). Possible values: private, shared.
sharedThe value can be defined in one of the following ways:
- using a launch argument:
--database-cache-mode=shared - using an environment variable:
#!shell export YUCCA_DATABASE_CACHE_MODE=shared - using a configuration file:
# /opt/yucca/yucca.toml
[database]
cache_mode = "shared"
conn_max_lifetime
Sets the maximum amount of time a connection may be reused.
0sThe value can be defined in one of the following ways:
- using a launch argument:
--database-conn-max-lifetime=0s - using an environment variable:
#!shell export YUCCA_DATABASE_CONN_MAX_LIFETIME=0s - using a configuration file:
# /opt/yucca/yucca.toml
[database]
conn_max_lifetime = "0s"
log_queries
Log SQL queries and their execution time.
falseThe value can be defined in one of the following ways:
- using a launch argument:
--database-log-queries=false - using an environment variable:
#!shell export YUCCA_DATABASE_LOG_QUERIES=false - using a configuration file:
# /opt/yucca/yucca.toml
[database]
log_queries = false
max_open_conn
Maximum number of open database connections (postgres only).
0The value can be defined in one of the following ways:
- using a launch argument:
--database-max-open-conn=0 - using an environment variable:
#!shell export YUCCA_DATABASE_MAX_OPEN_CONN=0 - using a configuration file:
# /opt/yucca/yucca.toml
[database]
max_open_conn = 0
max_idle_conn
Maximum number of idle connections (postgres only).
2The value can be defined in one of the following ways:
- using a launch argument:
--database-max-idle-conn=2 - using an environment variable:
#!shell export YUCCA_DATABASE_MAX_IDLE_CONN=2 - using a configuration file:
# /opt/yucca/yucca.toml
[database]
max_idle_conn = 2
streams
Parameters related to stream behavior.
archive_download_max_duration
Maximum allowed length of the requested time interval for downloading.
24hThe value can be defined in one of the following ways:
- using a launch argument:
--streams-archive-download-max-duration=24h - using an environment variable:
#!shell export YUCCA_STREAMS_ARCHIVE_DOWNLOAD_MAX_DURATION=24h - using a configuration file:
# /opt/yucca/yucca.toml
[streams]
archive_download_max_duration = "24h"
archive_download_request_lifetime
Lifetime of a downloaded archive interval.
When downloading archive intervals, a file of the requested length is generated and will be available for download for the duration specified in this parameter. If you are downloading long intervals at a slow download speed, we recommend increasing this parameter's value.
1h0m0sThe value can be defined in one of the following ways:
- using a launch argument:
--streams-archive-download-request-lifetime=6h - using an environment variable:
#!shell export YUCCA_STREAMS_ARCHIVE_DOWNLOAD_REQUEST_LIFETIME=1h0m0s - using a configuration file:
# /opt/yucca/yucca.toml
[streams]
archive_download_request_lifetime = "1h0m0s"
archive_max_depth_hours
Maximum allowed archive retention depth in hours.
-1The value can be defined in one of the following ways:
- using a launch argument:
--streams-archive-max-depth-hours=-1 - using an environment variable:
#!shell export YUCCA_STREAMS_ARCHIVE_MAX_DEPTH_HOURS=-1 - using a configuration file:
# /opt/yucca/yucca.toml
[streams]
archive_max_depth_hours = -1
live_on_demand_lease_duration
Lease duration for a live on-demand stream.
The time during which a requested live on-demand stream will keep running after the last lease renewal, i.e. the lease lifetime after its last renewal. The lease is renewed when the stream status is requested on its viewing page. The lower the number, the faster the stream will switch to paused state after the viewing page is closed.
1m0sThe value can be defined in one of the following ways:
- using a launch argument:
--streams-live-on-demand-lease-duration=1m0s - using an environment variable:
#!shell export YUCCA_STREAMS_LIVE_ON_DEMAND_LEASE_DURATION=1m0s - using a configuration file:
# /opt/yucca/yucca.toml
[streams]
live_on_demand_lease_duration = 1m0s