Skip to content

feat(domain): add ability to enable/disable domains#4476

Open
jasael wants to merge 1 commit into
Dokploy:canaryfrom
jasael:feat/toggle-domains
Open

feat(domain): add ability to enable/disable domains#4476
jasael wants to merge 1 commit into
Dokploy:canaryfrom
jasael:feat/toggle-domains

Conversation

@jasael
Copy link
Copy Markdown
Contributor

@jasael jasael commented May 23, 2026

What is this PR about?

This PR introduces the ability to temporarily enable or disable configured domains in Dokploy.

When a domain is disabled, its routing is removed from the Traefik proxy and its labels are skipped in Docker Compose deployments, all without deleting the domain record from the database.

This logic is fully integrated into the domain lifecycle:

  • Toggle switch: Instantly enables or disables routing.
  • Creation: Correctly configures Traefik or Compose deployments (defaulting to enabled).
  • Edition: Automatically updates and regenerates Traefik/Compose dynamic configurations, preserving the current enabled/disabled state.
  • Deletion: Cleans up and removes routing configurations.

Additionally, this PR fixes local development .sslip.io domain generation to use 127.0.0.1 instead of an empty string, so that generated domains resolve properly in local development environments.

Checklist

Before submitting this PR, please make sure that:

  • You created a dedicated branch based on the canary branch.
  • You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
  • You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.

Issues related (if applicable)

closes #4237

Screenshots (if applicable)

- Added 'enabled' field to domain table schema and migrations.
- Updated Traefik configuration logic to dynamically remove domain routing when disabled without deleting the database record.
- Skipped injection of Traefik docker labels in Docker Compose when the domain is disabled, and triggered auto-reload/rebuild.
- Modified frontend UI with a toggle switch in the domains table to enable/disable domains.
- Fixed sslip.io development domain generator to use 127.0.0.1 instead of empty string so local domains resolve in dev environments.
@jasael jasael requested a review from Siumauricio as a code owner May 23, 2026 08:56
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels May 23, 2026
@jasael
Copy link
Copy Markdown
Contributor Author

jasael commented May 23, 2026

This video shows how to enable and disable domains in both standard applications and Compose-based applications and templates.

video_test.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add toggle to enable/disable specific domains

1 participant