Dokploy / Dokploy/dokploy

Traefik reload fails silently with "Error: Resource type not found" - Traefik never gets created

Open
#5,475 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage🔍
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

About the bug

Clicking "Reload" in the Web Server / Traefik panel does nothing - no Traefik
container or service is ever created, and the Dokploy server logs show:

reloadTraefik background: Error: Resource type not found

This happens repeatedly on every Reload click, with no other visible error
in the UI. The dashboard gives no indication that the reload failed.

To Reproduce

  1. Fresh Dokploy install on a Docker Swarm single-node VPS
  2. Traefik container/service is absent (e.g. after manually removing it,
    or after it never started on a fresh install) in my case I installed few open-source project and my VPS restarted for maintainace then the Traefik container was missing
  3. Go to Web Server panel → click Reload
  4. Check docker ps -a | grep traefik and docker service ls | grep traefik
    → nothing is created
  5. Check Dokploy server logs → see reloadTraefik background: Error: Resource type not found

Server logs

[wait-for-postgres] Postgres is reachable ✅
Migration complete
✅ initialization complete
Server Started on: http://0.0.0.0:3000
Default middlewares already exists
Network is already initialized
...
Error fetching update data: TypeError: fetch failed
[cause]: Error: getaddrinfo EAI_AGAIN hub.docker.com
reloadTraefik background: Error: Resource type not found
reloadTraefik background: Error: Resource type not found

Current vs. Expected behavior

Current behavior

Clicking "Reload" in the Web Server / Traefik panel does nothing — no Traefik
container or service is ever created. The dashboard gives no indication that
the reload failed. Checking docker ps -a | grep traefik and
docker service ls | grep traefik shows nothing was created.

The Dokploy server logs reveal the actual failure:

reloadTraefik background: Error: Resource type not found

This happens on every Reload click, with no visible error surfaced in the UI.
This occurred after Traefik went missing following a VPS restart for
maintenance (Traefik was not Swarm-managed/restart-persistent, so it did not
come back up on its own, and Reload could not recreate it either).

Expected Behaviour

Reload should detect that no Traefik container/service exists and create a
new one from scratch. At minimum, if the reload fails internally, the UI
should surface a clear error message instead of failing silently in the
background logs only.

Provide environment information
- Dokploy version: v0.30.6
- Deployment mode: Docker Swarm, single node
- OS: Ubuntu 24.04.3 LTS (GNU/Linux 6.8.0-79-generic x86_64)
- Install method: official install script
Which area(s) are affected? (Select all that apply)

Traefik, Remote server

Are you deploying the applications where Dokploy is installed or on a remote server?

Same server where Dokploy is installed

Additional context

Suspect this is related to the port-mapping / resource-type read that
reloadTraefik performs before reconciling Traefik's config — possibly
choking when no existing Traefik container/service is present to compare
against, or on a stale/unsupported port-mapping entry.

There's also a separate, likely-unrelated error in the same logs:
Error fetching update data: TypeError: fetch failed ... getaddrinfo EAI_AGAIN hub.docker.com. This looks like Dokploy's background
update-checker failing DNS resolution to hub.docker.com — flagging it here
for completeness, but I don't believe it's connected to the reload bug.

Workaround: Running Traefik manually via docker run (outside of
Dokploy's management) brings the web server back up:

docker run -d
--name dokploy-traefik
--restart always
--network dokploy-network
-v /etc/dokploy/traefik/traefik.yml:/etc/traefik/traefik.yml
-v /etc/dokploy/traefik/dynamic:/etc/dokploy/traefik/dynamic
-v /var/run/docker.sock:/var/run/docker.sock:ro
-p 80:80/tcp
-p 443:443/tcp
-p 443:443/udp
traefik:v3.6.1

This resolves the immediate 521 error, but since Traefik is no longer
managed by Dokploy, any new project's network has to be manually connected
with docker network connect <network> dokploy-traefik or it will 404
until that's done.

Will you send a PR to fix it?

Maybe, need help

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the reloadTraefik entry point and reproduce the failure on a Docker Swarm single-node installation where no Traefik service or container exists. Trace the Resource type not found error during Reload, then verify that Traefik is recreated or that a clear failure appears in the UI instead of only in background logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.