Skip to content

Docker Compose: missing tls=true label when certificateType is "none" with HTTPS enabled #4018

Closed

Description

@luigigorlero

To Reproduce

When configuring a domain on a Docker Compose application with HTTPS enabled and certificateType set to None, Dokploy does not generate the tls=true Traefik label on the websecure router. This causes Traefik to not terminate TLS for that domain, resulting in a 404 for all HTTPS requests, even though the container is running correctly and the custom certificate is being properly used.

  1. Upload a custom certificate in Settings → Certificates
  2. Create a Docker Compose application
  3. Add a domain with: HTTPS: ON / Certificate: None
  4. Deploy the stack
  5. Access the domain over HTTPS

Current vs. Expected behavior

The generated Docker Compose labels should include:

traefik.http.routers.<router-name>-websecure.tls=true

but the websecure router is generated without any TLS label

Compare this with certificateType: letsencrypt, which correctly generates:

- traefik.http.routers.<router-name>-websecure.tls.certresolver=letsencrypt

Workaround

Manually add the missing label directly in docker-compose.yml:

labels:
  - traefik.http.routers.<router-name>-websecure.tls=true

Provide environment information

Operating System:
  OS: Ubuntu 24.04.4 LTS
  Arch: arm64
Dokploy version: 0.28.6
VPS Provider: Hetzner

Which area(s) are affected? (Select all that apply)

Docker Compose

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

Same server where Dokploy is installed

Additional context

No response

Will you send a PR to fix it?

No

Activity

  1. dosubot commented on Mar 17, 2026

    @dosubot

    Hi @luigigorlero! I'm Dosu and I’m helping the dokploy team.

    Thanks for the detailed report! I can confirm this is a bug in Dokploy's label generation.

    The issue is in packages/server/src/utils/docker/domain.ts - when certificateType="none", the code doesn't add any TLS labels:

    if (entrypoint === "websecure") {
        if (certificateType === "letsencrypt") {
            labels.push(`traefik.http.routers.${routerName}.tls.certresolver=letsencrypt`);
        } else if (certificateType === "custom" && customCertResolver) {
            labels.push(`traefik.http.routers.${routerName}.tls.certresolver=${customCertResolver}`);
        }
        // Missing: else if (certificateType === "none") { ... }
    }

    Interestingly, regular (non-compose) applications handle this case differently in packages/server/src/utils/traefik/domain.ts, though they set tls = undefined which isn't quite right either for the custom certificate use case.

    The fix would be adding:

    } else if (certificateType === "none") {
        labels.push(`traefik.http.routers.${routerName}.tls=true`);
    }

    This enables TLS without specifying a cert resolver, allowing Traefik to use the custom certificate you uploaded.

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about dokploy with Dosu Add Dosu to your team

  2. djleonskennedy commented on Mar 27, 2026

    @djleonskennedy

    This appears to be a high-severity issue. Do we have any forecast for when it will be fixed?

  3. luigigorlero commented on Mar 27, 2026

    @luigigorlero
    Author

    This appears to be a high-severity issue. Do we have any forecast for when it will be fixed?

    Is it ? It’s a Traefik misconfiguration that is workaroundable with a patch to your compose.

  4. added a commit that references this issue on Apr 8, 2026
    d9a0742
  5. added a commit that references this issue on Apr 14, 2026
    03be19f
  6. added a commit that references this issue on May 22, 2026
  7. added a commit that references this issue on May 30, 2026
  8. added a commit that references this issue on Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions