Skip to content

YAML and Env Var Config

The web UI is the primary way to manage DVR servers, but ChannelWatch also supports two file-based configuration paths for automated or headless deployments: a YAML config file and a family of environment variables. All three methods are fully equivalent — you can use any combination of them.

When ChannelWatch starts, it merges DVR server definitions from all three sources in this order:

  1. /config/dvrs.yaml — file-based config, loaded from the mounted config volume
  2. CW_DVR_<N>_* environment variables — inline config from the compose file or Kubernetes manifest
  3. Web UI — servers added or edited through the browser

Servers defined in YAML or env vars are merged with servers already saved in settings.json. A server from YAML that matches an existing web-UI entry (same host and port) updates the existing entry rather than creating a duplicate. Servers added through the web UI that are not in YAML or env vars are preserved as-is.

Create /config/dvrs.yaml in your mounted config directory:

dvrs:
- name: "Living Room"
host: "192.168.1.10"
port: 8089
enabled: true
- name: "Basement"
host: "192.168.1.20"
port: 8089
enabled: true
- name: "Office"
host: "192.168.1.30"
port: 8089
enabled: false
FieldTypeRequiredDefaultDescription
namestringNoHost addressDisplay name shown in notifications and the dashboard
hoststringYesIP address or hostname of the Channels DVR server
portintegerYesChannels DVR API port (typically 8089)
enabledbooleanNotrueSet to false to add the server in a disabled state
api_keystringNoPer-DVR API key (stored encrypted; see note below)

For compose-based deployments, you can define DVR servers using numbered environment variables. The <N> placeholder is a 1-based index (1, 2, 3, …).

environment:
CW_DVR_1_NAME: "Living Room"
CW_DVR_1_HOST: "192.168.1.10"
CW_DVR_1_PORT: "8089"
CW_DVR_2_NAME: "Basement"
CW_DVR_2_HOST: "192.168.1.20"
CW_DVR_2_PORT: "8089"
CW_DVR_3_NAME: "Office"
CW_DVR_3_HOST: "192.168.1.30"
CW_DVR_3_PORT: "8089"
CW_DVR_3_ENABLED: "false"
VariableRequiredDescription
CW_DVR_<N>_HOSTYesIP address or hostname of the Channels DVR server
CW_DVR_<N>_PORTYesChannels DVR API port
CW_DVR_<N>_NAMENoDisplay name (defaults to host address if omitted)
CW_DVR_<N>_ENABLEDNo"true" or "false" (defaults to "true")
CW_DVR_<N>_API_KEYNoPer-DVR API key

Indexes must be contiguous starting from 1. ChannelWatch stops scanning when it encounters a gap (e.g. if CW_DVR_3_HOST is missing, CW_DVR_4_HOST is ignored even if set).

Changes to dvrs.yaml are picked up on hot reload without restarting the container. Environment variable changes require a container restart because Docker does not support live env var updates.

To trigger a hot reload after editing dvrs.yaml, use the Reload Config button in Settings > Advanced, or send SIGHUP to the ChannelWatch process:

Terminal window
docker kill --signal=HUP channelwatch

See Hot Reload for the full list of settings that support live reload.

When deploying with the ChannelWatch Helm chart, DVR servers can be configured via the dvrs values key, which maps directly to the YAML format above. Sensitive values (API keys) should be stored in a Kubernetes Secret and referenced via valueFrom.secretKeyRef.

See the Helm chart’s values.yaml for the full schema.