Environment variables
Reference list of every environment variable read by the Phlix Media Server, its default, and a one-line description. Each entry links back to the file that consumes it.
Container & bootstrap
| Variable | Default | Description |
|---|---|---|
PHLIX_CONTAINER_COMPILE | unset | When truthy (1, true, yes, on) enables PHP-DI's compiled-container cache in var/cache/container/. Disabled by default for dev parity. See Phlix\Common\Container\ContainerFactory. |
Events
| Variable | Default | Description |
|---|---|---|
PHLIX_DEBUG_EVENTS | 0 | When truthy (1, true, yes, on) wraps the PSR-14 dispatcher in Tukio's DebugEventDispatcher, which logs every dispatched event class at debug level on the events channel (.logs/events.log). Useful for tracing plugin behaviour; leave off in production. See Phlix\Common\Events\EventDispatcherFactory and docs/dev/event-reference.md. |
Plugins
| Variable | Default | Description |
|---|---|---|
PHLIX_PLUGINS_ALLOW_HTTP | 0 | When truthy (1, true, yes, on) lets the plugin loader accept plain http:// source URLs. Default off — HTTPS or file:// only. See Phlix\Plugins\Installer\HttpInstaller. |
PHLIX_PLUGINS_REQUIRE_SIGNATURE | 0 | When truthy, the plugin loader refuses to install unsigned plugins and refuses signatures missing from the trusted-key allowlist. Default off, which means unsigned plugins install with a warning on the plugins log channel. See Phlix\Plugins\Signature\SignatureVerifier. |
PHLIX_PLUGINS_COMPOSER_TIMEOUT | 120 | Hard timeout (seconds) on the per-plugin composer install --no-dev subprocess. See Phlix\Plugins\Installer\ComposerRunner. |
Auth
| Variable | Default | Description |
|---|---|---|
JWT_SECRET | default-secret-change-me | HMAC secret used to sign / verify JWT access and refresh tokens. The default is intentionally insecure so a missing env var fails closed in production deployments. Read by Phlix\Common\Container\Providers\AuthServicesProvider. |
Hub / Pairing
| Variable | Default | Description |
|---|---|---|
PHLIX_HUB_URL | unset | Base URL of the Phlix Hub to pair with (e.g. https://hub.example.com). When set, the server initiates pairing automatically on startup if enrolled. See Phlix\Hub\HubClient and config/hub.php. |
PHLIX_HUB_JWKS_URL | unset | URL of the hub's JWKS endpoint for validating hub-issued JWTs. Typically set automatically during enrollment. See Phlix\Hub\HubJwtValidator and config/hub.php. |
PHLIX_HUB_ENROLLMENT_TOKEN | unset | When set, overrides the enrollment token read from config/hub-enrollment.json. Mostly useful for automation / container orchestration. See Phlix\Hub\HubClient::loadEnrollment(). |
PHLIX_HUB_HEARTBEAT_INTERVAL | 60 | Interval in seconds between hub heartbeat calls. Must be between 30 and 3600. See Phlix\Hub\HubClient::startHeartbeatLoop() and config/hub.php. |
PHLIX_SUBDOMAIN_AUTO_CLAIM | 1 | When truthy (1, true, yes, on) automatically claims a *.phlix.media subdomain from the hub after enrollment. See Phlix\Hub\SubdomainClient and config/hub.php. |
PHLIX_TLS_ENABLED | 1 | When truthy enables TLS/HTTPS for the server's public hostname. Requires a subdomain to be allocated. See config/hub.php. |
PHLIX_DOMAIN | phlix.media | The base domain for server subdomains (e.g. abc12345.phlix.media). See config/hub.php. |
Relay tunnel
| Variable | Default | Description |
|---|---|---|
PHLIX_RELAY_ENABLED | 0 | When truthy (1, true, yes, on) enables the persistent WSS relay tunnel to the hub. Requires the server to be enrolled. See Phlix\Hub\RelayConfig and config/relay.php. |
PHLIX_RELAY_HUB_URL | wss://hub.example.com/api/v1/servers/{id}/relay | WebSocket URL of the hub relay endpoint. {id} is replaced with the server's UUID from enrollment. See Phlix\Hub\RelayConsumer and config/relay.php. |
PHLIX_RELAY_TUNNEL_HOSTNAME | empty | Public hostname assigned to this server's relay tunnel (e.g. my-server.phlix.media). See Phlix\Hub\RelayConfig and config/relay.php. |
PHLIX_RELAY_RECONNECT_DELAY | 5 | Seconds to wait before attempting to reconnect after the relay tunnel is disconnected. See Phlix\Hub\RelayConfig and config/relay.php. |
PHLIX_RELAY_PING_INTERVAL | 30 | Seconds between keep-alive ping frames sent over the relay tunnel. See Phlix\Hub\RelayConfig and config/relay.php. |
PHLIX_RELAY_PING_TIMEOUT | 10 | Seconds to wait for a pong response before considering the relay connection dead. See Phlix\Hub\RelayConfig and config/relay.php. |
Port forwarding / remote access
| Variable | Default | Description |
|---|---|---|
PHLIX_PORT_FORWARD_AUTO | 1 | When truthy (1, true, yes, on) enables automatic port forwarding via UPnP-IGD on startup. See Phlix\Network\PortForwardService and config/port-forward.php. |
PHLIX_EXTERNAL_PORT | 32400 | Port to use for automatic port forwarding. Both external and internal ports use this value by default. See Phlix\Network\PortForwardService and config/port-forward.php. |
PHLIX_EXTERNAL_HTTP_PORT | 8080 | External HTTP port for the web portal when accessed remotely. See config/port-forward.php. |
PHLIX_EXTERNAL_HTTPS_PORT | 8443 | External HTTPS port for the web portal when accessed remotely. See config/port-forward.php. |
PHLIX_UPNP_ENABLED | 1 | When truthy enables UPnP-IGD port mapping attempts. When falsy, only STUN-based external IP detection is used. See Phlix\Network\UpnpIgdClient and config/port-forward.php. |
PHLIX_STUN_SERVER | stun.l.google.com | STUN server hostname for discovering the server's public IP address. See Phlix\Network\StunClient and config/port-forward.php. |
PHLIX_STUN_PORT | 19302 | STUN server port. See Phlix\Network\StunClient and config/port-forward.php. |
Database (test only)
These are consumed by phpunit.xml only and have no effect on production.
| Variable | Default | Description |
|---|---|---|
APP_ENV | testing | Marks the runtime as a test environment. |
DB_HOST | 127.0.0.1 | MySQL host used by integration tests. |
DB_PORT | 3306 | MySQL port used by integration tests. |
DB_DATABASE | phlix_test | MySQL database name used by integration tests. |
DB_USER | root | MySQL username used by integration tests. |
DB_PASSWORD | empty | MySQL password used by integration tests. |
Server
| Variable | Default | Description |
|---|---|---|
PHLIX_HTTP_PORT | 32400 | HTTP port the server listens on. Overridden by config/server.php server.port at runtime. See config/server.php. |
PHLIX_PUBLIC_URL | unset | Public URL used in Hub relay and DLNA announcements. Must be set if the server is behind a reverse proxy. See Phlix\Server\Core\Application. |
PHLIX_LOG_LEVEL | info | Minimum log level for application logs written to .logs/app.log. Valid values (in order of verbosity): debug, info, notice, warning, error, critical, alert, emergency. See config/logger.php. |
Database
| Variable | Default | Description |
|---|---|---|
PHLIX_DATABASE_HOST | 127.0.0.1 | MySQL host; maps to config/database.php connections.mysql.host. |
PHLIX_DATABASE_PORT | 3306 | MySQL port; maps to config/database.php connections.mysql.port. |
PHLIX_DATABASE_NAME | phlix | Database name; maps to config/database.php connections.mysql.database. |
PHLIX_DATABASE_USER | phlix | Database username; maps to config/database.php connections.mysql.username. |
PHLIX_DATABASE_PASSWORD | empty | Database password. Alias for the DB_PASSWORD env var consumed by config/database.php. Prefer setting DB_PASSWORD to avoid confusion. |
Transcoding / Hardware acceleration
| Variable | Default | Description |
|---|---|---|
PHLIX_HWACCEL | none | Preferred hardware acceleration. Valid values: nvidia, vaapi, videotoolbox, qsv, amf, v4l2, none. Overridden by config/ffmpeg.php hwaccel.vendor_priority. See config/ffmpeg.php. |
Timezone
| Variable | Default | Description |
|---|---|---|
TZ | system TZ | PHP date_default_timezone_set() value. Controls timestamps in logs and EPG data. Set to your local timezone (e.g., America/New_York, Europe/London). |
The production database credentials live in
config/database.php(which readsDB_PASSWORDfrom the environment viagetenv('DB_PASSWORD')).