Skip to content

[Bug]: Updating exposed port does not regenerate Traefik load-balancer port labelΒ #11074

Description

@miikka-rahikainen

Error Message and Logs

A public application remained unreachable with HTTP 502 after its exposed port was changed from the default 80 to the container's actual listening port 9000.

The application container itself was healthy and listening on 9000, but the effective Traefik label still targeted port 80:

traefik.http.services.<service>.loadbalancer.server.port=80

Updating the exposed-port setting and force-deploying did not reconcile the label to 9000. Correcting the routing label and force-deploying restored the public endpoint.

This may be related to #10546, but the symptom is different: in this case the load-balancer label existed and pointed to a stale port, rather than the HTTP service label being absent.

Steps to Reproduce

  1. Create an application whose container listens on port 9000.
  2. Assign a public domain while the application's exposed port is absent or still defaults to 80.
  3. Deploy and confirm the application container is healthy but the public domain returns 502.
  4. Change the exposed port to 9000 through the application settings/API.
  5. Force-deploy the application.
  6. Inspect the container's generated Traefik labels.

Expected Behavior

Changing the exposed port should invalidate and regenerate all related proxy labels. After deployment, Traefik should target port 9000 and the public domain should work.

Actual Behavior

The saved application setting showed the new exposed port, but Traefik continued routing to port 80. The healthy application remained unavailable until the routing label was corrected separately.

Example Repository URL

No response β€” reproduced with a managed MinIO application listening on port 9000.

Coolify Version

v4.1.2

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04; Docker 29.5.3

Additional Information

Suggested regression test:

  1. Generate labels for an application with exposed port 80.
  2. Update ports_exposes to 9000.
  3. Re-run configuration/deployment reconciliation.
  4. Assert that no generated Traefik service label still targets 80 and that the effective label targets 9000.

Observed during a production migration. No credentials, domains, resource UUIDs, or customer data are included in this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🌐️ APIIssues or PRs that relate to the Coolify API.🐞 Confirmed BugVerified issues that have been reproduced by the team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions