I'm trying to get Komodo working via Traefik - both running in Docker, but until now I get "gateway timeout".
Can someone provide some support or a hint to get this working working? I would appreciate the help.
Komodo is working fine if I access it directly on the Docker host IP or its Docker host fqdn. Komodo via http://192.168.x.a:9120 and http://:9120 is working.
I have traefik active in a macvlan, and assigned it its own IP address 192.168.x.b
In my DNS server I pointed komodo.web.domain.tld to the Traefik IP address 192.168.x.b I see that I get routed to Traefik (as for example the certificate provided via Traefik is recognized).
That seems to point that somehow Traefik is not able to route traffik to the komodo IP. Is that because Traefik is located on the macvlan and Komodo isn't?
If that (incorrect networking) is the reason, how to fix it?
- Should I add/use the macvlan subnet for komodo as well (that would be my preference), if I do so Komodo is not working (I assume it can't reach the Mondo DB). How could/should I make this work?
or
- Let Docker determine the Komodo IP addresses (172.26.0.4) as it does now and add a reference to the macvlan subnet that I use for Traefik and other services. If I do so, Komodo is again now working.
I'm a little lost what to do to make this work ![]()
I included some logging and the docker compose file with labels below:
I hope that someone can shine a light on this, so I can make Komodo accessible via Traefik. That would be nice.
Summary
{"level":"debug","time":"2025-11-15T14:57:38+01:00","caller":"github.com/traefik/traefik/v3/pkg/server/service/loadbalan
cer/wrr/wrr.go:176","message":"Service selected by WRR: http://172.26.0.4:9120"}
{"level":"debug","error":"dial tcp 172.26.0.4:9120: i/o timeout","time":"2025-11-15T14:58:08+01:00","caller":"github.com
/traefik/traefik/v3/pkg/proxy/httputil/proxy.go:121","message":"504 Gateway Timeout"}
{"level":"debug","time":"2025-11-15T14:58:09+01:00","caller":"github.com/traefik/traefik/v3/pkg/server/service/loadbalan
cer/wrr/wrr.go:176","message":"Service selected by WRR: http://172.26.0.4:9120"}
{"level":"debug","error":"dial tcp 172.26.0.4:9120: i/o timeout","time":"2025-11-15T14:58:39+01:00","caller":"github.com
/traefik/traefik/v3/pkg/proxy/httputil/proxy.go:121","message":"504 Gateway Timeout"}
Komodo Docker Compose file
# KOMODO COMPOSE - MONGO #
################################
## This compose file will deploy:
## 1. MongoDB
## 2. Komodo Core
## 3. Komodo Periphery
## Docker hub URLs:
## https://hub.docker.com/r/moghtech/komodo-core/tags
## https://hub.docker.com/r/moghtech/komodo-periphery
## https://hub.docker.com/_/mongo/tags
services:
mongo:
image: mongo
command: --quiet --wiredTigerCacheSizeGB 0.25
restart: unless-stopped
# ports:
# - 27017:27017
volumes:
- /srv/docker/swarm/stacks/mngt/komodo01/db:/data/db
- /srv/docker/swarm/stacks/mngt/komodo01/config:/data/configdb
environment:
MONGO_INITDB_ROOT_USERNAME: ${KOMODO_DB_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${KOMODO_DB_PASSWORD}
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
core:
image: ghcr.io/moghtech/komodo-core:${COMPOSE_KOMODO_IMAGE_TAG:-latest}
restart: unless-stopped
depends_on:
- mongo
ports:
- 9120:9120
env_file: /srv/docker/swarm/stacks/mngt/komodo01/komodo/compose.env
environment:
KOMODO_DATABASE_ADDRESS: mongo:27017
KOMODO_DATABASE_USERNAME: ${KOMODO_DB_USERNAME}
KOMODO_DATABASE_PASSWORD: ${KOMODO_DB_PASSWORD}
volumes:
## Store dated backups of the database - https://komo.do/docs/setup/backup
- ${COMPOSE_KOMODO_BACKUPS_PATH}:/backups
## Store sync files on server
# - /path/to/syncs:/syncs
## Optionally mount a custom core.config.toml
# - /path/to/core.config.toml:/config/config.toml
## Allows for systemd Periphery connection at
## "https://host.docker.internal:8120"
# extra_hosts:
# - host.docker.internal:host-gateway
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
traefik.enable: "true"
traefik.docker.network: "macvlan01"
# Regular access zone local/blue
traefik.http.routers.komodo.entrypoints: "http"
traefik.http.routers.komodo.rule: "Host(`komodo01.web.domain.tld`)"
traefik.http.routers.komodo.middlewares: "redirect-http-to-https-permanent@file"
# Protected zone local/blue
traefik.http.routers.komodo-secure.entrypoints: "https"
traefik.http.routers.komodo-secure.rule: "Host(`komodo01.web.domain.tld`)"
traefik.http.routers.komodo-secure.tls: "true"
traefik.http.routers.komodo-secure.service: "komodo01"
# Komodo service
traefik.http.services.komodo01.loadBalancer.server.port: "9120"
## Deploy Periphery container using this block,
## or deploy the Periphery binary with systemd using
## https://github.com/moghtech/komodo/tree/main/scripts
periphery:
image: ghcr.io/moghtech/komodo-periphery:${COMPOSE_KOMODO_IMAGE_TAG:-latest}
restart: unless-stopped
env_file: /srv/docker/swarm/stacks/mngt/komodo01/komodo/compose.env
volumes:
## Mount external docker socket
- /var/run/docker.sock:/var/run/docker.sock
## Allow Periphery to see processes outside of container
- /proc:/proc
## Specify the Periphery agent root directory.
## Must be the same inside and outside the container,
## or docker will get confused. See https://github.com/moghtech/komodo/discussions/180.
## Default: /etc/komodo.
- ${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}:${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
networks:
macvlan01:
external: true