Skip to content

Extending Caddy Web Server Configuration

The VOR Stream Web UI is served through using the Caddy web server, with its base configuration generated from templates during deployment.

Custom Configuration

Although the main Caddyfile can be modified directly to add additional routes or pages, this approach is not recommended. Manual changes may be overwritten during subsequent Ansible deployments.

To safely extend the web server configuration, place custom Caddy configuration files under the VOR root in one of two directories, depending on what you're adding:

etc/caddy.d/sites.d     # additional site blocks (new listeners/ports)
etc/caddy.d/webui.d     # additional routes under the existing Web UI listener

Use sites.d for a self-contained host:port { ... } block that should run alongside the Web UI. Use webui.d for routes that should be reachable under the Web UI's existing host and port (e.g. handle /my-route/* { ... }).

Configuration Conflicts

Be aware that custom configuration files should not conflict with the existing Caddy configuration, such as by defining duplicate listeners or conflicting ports. Review the existing configuration before adding custom entries.

Route Matching Order

Files in webui.d are imported near the top of the Web UI's site block, so handle blocks they define are matched before the built-in catch-all handle /*. Wrap your routes in a handle block, since bare directives are subject to Caddy's automatic directive ordering rather than source order, which can produce surprising results.

Applying Configuration Changes

After adding or updating custom configuration files, the changes can be applied by restarting Caddy with the following command:

supervisorctl restart caddy