Skip to content

Configuration ​

NukeVideo is configured through environment variables. This page documents all available settings.

The Used in column indicates where each variable is used:

  • API — The Laravel application
  • Proxy — Nginx VOD proxy nodes
  • Worker — FFmpeg encoding nodes
  • Vector — Log collector (runs on both proxy and worker nodes)

Application ​

VariableDefaultUsed inDescription
APP_ENVlocalAPIEnvironment (local, production)
APP_DEBUGtrueAPIEnable debug mode (disable in production)
APP_URLhttp://localhostAPIBase URL for the API
APP_KEY—APIApplication encryption key (generate with php artisan key:generate)
WEBHOOK_SECRET—APISecret for validating video upload webhooks

Database ​

VariableDefaultUsed inDescription
DB_CONNECTIONmysqlAPIDatabase driver
DB_HOSTdbAPIDatabase hostname
DB_PORT3306APIDatabase port
DB_DATABASElaravelAPIDatabase name
DB_USERNAMErootAPIDatabase user
DB_PASSWORD—APIDatabase password

Redis ​

VariableDefaultUsed inDescription
REDIS_HOST127.0.0.1APIRedis hostname
REDIS_PORT6379APIRedis port
REDIS_PASSWORDnullAPIRedis password
REDIS_CLIENTphpredisAPIRedis client

S3 Storage ​

VariableDefaultUsed inDescription
AWS_ACCESS_KEY_ID—API, ProxyS3 access key
AWS_SECRET_ACCESS_KEY—API, ProxyS3 secret key
AWS_DEFAULT_REGIONus-east-1API, ProxyS3 region
AWS_BUCKET—API, ProxyS3 bucket name
AWS_ENDPOINT—API, ProxyS3 endpoint URL (for MinIO/RustFS)
AWS_USE_PATH_STYLE_ENDPOINTfalseAPIUse path-style URLs (required for MinIO)

VOD Proxy ​

These variables configure the Nginx VOD module on proxy nodes. They are substituted into the Nginx config via envsubst at container startup.

VariableDefaultUsed inDescription
VOD_SEGMENT_DURATION10000ProxyHLS/DASH segment duration in ms
VOD_METADATA_CACHE_SIZE512mProxyMetadata cache size
VOD_RESPONSE_CACHE_SIZE128mProxyResponse cache size
VOD_MAPPING_CACHE_SIZE5mProxyMapping cache size
API_UPSTREAM_HOSTnukevideo-api:8080ProxyAPI server hostname:port for upstream mapping requests
VOD_TOKEN_SECRET—API, ProxySecret for signing and validating VOD streaming tokens
SECURE_TOKEN_EXPIRES_TIME100dProxyStream token expiration (e.g., 100d, 24h)
SECURE_TOKEN_QUERY_EXPIRES_TIME1hProxyQuery token expiration
VOD_CACHE_MAX_SIZE10gProxyMax size for local proxy cache
VOD_CACHE_INACTIVE1hProxyEvict cached items not accessed within this period
CDN_MODEfalseProxySet to true to disable local proxy cache (when behind a CDN)

API_UPSTREAM is not user-set. The proxy entrypoint derives it automatically from API_UPSTREAM_HOST — prefixing http:// in local environments and https:// otherwise. You only need to set API_UPSTREAM_HOST.

Video Processing ​

Variables that control FFmpeg concurrency on worker nodes.

VariableDefaultUsed inDescription
VIDEO_FFMPEG_THREADS4WorkerCPU threads per video encoder. Each rendition in a chunk gets this many threads.
VIDEO_RENDITION_ESTIMATE1WorkerExpected number of video renditions per chunk. Used to size worker concurrency: floor(nproc / (VIDEO_FFMPEG_THREADS × VIDEO_RENDITION_ESTIMATE)). Set to your typical rendition count (e.g. 4) so the worker doesn't oversubscribe the CPU when one ffmpeg process fans out across several encoders simultaneously.
VIDEO_WORKER_PROCESSESautoWorkerParallel FFmpeg processes per node. Defaults to floor(nproc / (VIDEO_FFMPEG_THREADS × VIDEO_RENDITION_ESTIMATE)). Explicit value wins.
VIDEO_WORKER_TIMEOUT600WorkerPer-chunk wall-clock ceiling in seconds. FFmpeg gets this minus 120 s. Raise it for slow codecs (x265/AV1) at low thread counts. In production NodeService injects this per worker container.

ClickHouse (Analytics) ​

VariableDefaultUsed inDescription
CLICKHOUSE_HOSTclickhouseAPIClickHouse hostname
CLICKHOUSE_PORT8123APIClickHouse HTTP port
CLICKHOUSE_DATABASEdefaultAPI, VectorClickHouse database name
CLICKHOUSE_USERdefaultAPI, VectorClickHouse username
CLICKHOUSE_PASSWORD—API, VectorClickHouse password
CLICKHOUSE_ENDPOINThttp://clickhouse:8123VectorFull ClickHouse URL used by Vector for log ingestion

Monitoring ​

VariableDefaultUsed inDescription
SENTRY_LARAVEL_DSN—APISentry DSN for error tracking
SENTRY_TRACES_SAMPLE_RATE1.0APISentry trace sampling rate (0.0 – 1.0)

Mail ​

VariableDefaultUsed inDescription
MAIL_MAILERlogAPIMail driver (smtp, ses, log)
MAIL_HOST127.0.0.1APISMTP host
MAIL_PORT2525APISMTP port
MAIL_USERNAMEnullAPISMTP username
MAIL_PASSWORDnullAPISMTP password

Node Environment Variables ​

Variables for proxy and worker nodes are managed through the UI or API at /api/node-environments/{type}. These are injected into Docker containers at deploy time.

Proxy Nodes ​

Proxy containers receive all variables from the VOD Proxy and S3 Storage sections above.

Worker Nodes ​

Worker containers receive their environment from the worker node environment configuration. Typically includes Redis connection details and encoding-related settings.

Vector (Both Nodes) ​

Vector runs on both proxy and worker nodes as a log collector. It receives the ClickHouse variables (CLICKHOUSE_ENDPOINT, CLICKHOUSE_DATABASE, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD) plus NODE_ID which is injected automatically per node.

Released under the MIT License.