Skip to content

Webhook config set in Docker labels are ignored #467

@julian-heng

Description

@julian-heng

Problem

Webhook configs are only working through config file, and not through Docker Labels.

Expectation

Defining the Webhook config on the Ofelia service using Docker Labels should initialise the Webhook notification and send the notification successfully.

Actual

The Webhook notification did not initialise and no notification gets sent.

Details

Following the example in the Docker Label section under the webhook documentation.

Docker Image: ghcr.io/netresearch/ofelia:latest

Using the following docker compose definition:

services:
  ofelia:
    image: ghcr.io/netresearch/ofelia:latest
    container_name: ofelia-webhook
    command: daemon --docker-events
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    labels:
      ofelia.webhook.discord-webhook.preset: discord
      ofelia.webhook.discord-webhook.id: "${OFELIA_DISCORD_WEBHOOK_ID}"
      ofelia.webhook.discord-webhook.secret: "${OFELIA_DISCORD_WEBHOOK_SECRET}"
      ofelia.webhook.discord-webhook.trigger: always

I get the following log output:

ofelia-webhook  | time=2026-02-15 06:06:24 level=warning msg=Could not load config file "/etc/ofelia/config.ini": failed to load config file "/etc/ofelia/config.ini": open /etc/ofelia/config.ini: no such file or directory
ofelia-webhook  |   → Check file exists and is readable: ls -l "/etc/ofelia/config.ini"
ofelia-webhook  |   → Verify file path is correct
ofelia-webhook  |   → Check file permissions (should be readable)
ofelia-webhook  | time=2026-02-15 06:06:24 level=info msg=Starting scheduler...
ofelia-webhook  | time=2026-02-15 06:06:24 level=info msg=✅ Scheduler started with 0 job(s)
ofelia-webhook  | time=2026-02-15 06:06:24 level=info msg=pprof server disabled
ofelia-webhook  | time=2026-02-15 06:06:24 level=info msg=web server disabled
ofelia-webhook  | time=2026-02-15 06:06:24 level=info msg=🚀 Ofelia is now running. Press Ctrl+C to stop.

Note that there is no mention of a webhook initialised.

Switching to using a config.ini file with the following contents:

[webhook "discord-webhook"]
preset = discord
id = ${OFELIA_DISCORD_WEBHOOK_ID}
secret = ${OFELIA_DISCORD_WEBHOOK_SECRET}
trigger = always

and updating the docker compose definition

services:
  ofelia:
    image: ghcr.io/netresearch/ofelia:latest
    container_name: ofelia-webhook
    command: daemon --docker-events
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./config.ini:/etc/ofelia/config.ini

I get the following log output with the webhook initialised:

ofelia-webhook  | time=2026-02-15 06:07:10 level=info msg=Webhook notification system initialized with 1 webhooks
ofelia-webhook  | time=2026-02-15 06:07:10 level=info msg=Starting scheduler...
ofelia-webhook  | time=2026-02-15 06:07:10 level=info msg=✅ Scheduler started with 0 job(s)
ofelia-webhook  | time=2026-02-15 06:07:10 level=info msg=pprof server disabled
ofelia-webhook  | time=2026-02-15 06:07:10 level=info msg=web server disabled
ofelia-webhook  | time=2026-02-15 06:07:10 level=info msg=🚀 Ofelia is now running. Press Ctrl+C to stop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased:v0.20.0Included in v0.20.0 release

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions