[Bug]: Invalid YAML indentation generated in /etc/dokploy/traefik/dynamic/dokploy.yml breaks Traefik v3 file provider (404 on all domains)

Open Beginner friendly
#6,197 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, typescript, yaml
Domain
backend, devops

Research direction

Start by locating the code that generates /etc/dokploy/traefik/dynamic/dokploy.yml and inspect how it writes the servers list and nests routers under http. Reproduce the issue using the reported Dokploy and Traefik versions, then verify the generated YAML loads in Traefik and deployed domains return HTTP 200.

Written by the indexing model from the issue text.

Description

needs-triage🔍
To Reproduce
  1. Install Dokploy (v0.31.7) on a fresh VPS (reproduced on both Debian and Ubuntu LTS, with Traefik v3.8.0).
  2. Deploy an application (e.g., an Nginx / Hello World app) and configure a domain (such as a sslip.io domain).
  3. Inspect /etc/dokploy/traefik/dynamic/dokploy.yml and check the dokploy-traefik container logs.
  4. Attempt to access the configured domain via HTTP or curl and observe that Traefik fails to load dynamic file configs and returns 404 page not found.
Current vs. Expected behavior
Current Behavior

Dokploy generates /etc/dokploy/traefik/dynamic/dokploy.yml with an unindented list item (- url: http://dokploy:3000 at column 0 under servers:) or routers: at the root level on reload/restart. Traefik v3.8.0 rejects the dynamic file configuration (ERR Error while building configuration... collecting file configs: /etc/dokploy/traefik/dynamic/dokploy.yml: routers cannot be a standalone element (type map[string]*dynamic.Router)) and does not register dynamic routers, resulting in 404 page not found across domains.

Expected Behavior

Dokploy should generate valid YAML in /etc/dokploy/traefik/dynamic/dokploy.yml with proper indentation under servers: (- url: http://dokploy:3000 indented under loadBalancer.servers) and keep routers properly nested under http:, allowing Traefik to load dynamic routers cleanly and return HTTP 200 for deployed applications.

Provide environment information
Operating System:
  OS: Ubuntu LTS (also tested on Debian)
  Arch: x86_64
Dokploy version: v0.31.7
VPS Provider: Contabo
What applications/services are you trying to deploy?
  Nginx / Hello World demo app, Next.js / web apps, database
Which area(s) are affected? (Select all that apply)

Traefik

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

Same server where Dokploy is installed

Additional context

Reproduced on a fresh Contabo VPS after reinstalling from Debian to Ubuntu LTS with traefik:v3.8.0 and Dokploy v0.31.7 (dokploy-traefik connected to dokploy-network). Before upgrading to v0.31.7 (on v0.31.6), routing worked without this issue. Manually fixing the indentation of - url: http://dokploy:3000 in /etc/dokploy/traefik/dynamic/dokploy.yml immediately restored the dynamic routers in Traefik (router-1@file) and returned HTTP 200.

Generated /etc/dokploy/traefik/dynamic/dokploy.yml:

http:
  routers: {}
  services:
    dokploy-service-app:
      loadBalancer:
        servers:
- url: http://dokploy:3000
        passHostHeader: true

### Will you send a PR to fix it?

Yes
Dominant language
TypeScript
Stars
38.8k
Forks
3.2k
Avg merge
1d 8h
Merged PRs (30d)
117

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from Dokploy/dokploy

All issues in Dokploy/dokploy

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.