Allow per-domain additional Traefik router configuration (merge-based)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
What problem will this feature address?
When adding a custom domain to a Dokploy application, the generated Traefik configuration does not support storing and persisting per-domain advanced router configurations.
Currently:
- Domain middleware can only store middleware names (via
middlewares: text[]) - Router-level config properties (TLS, authentication, etc.) cannot be stored
- Any manual edits to Traefik configuration are overwritten on domain updates
- This affects both Standalone Applications (#3333) and Docker Compose deployments (#4243)
Use Case
Users with advanced Traefik needs want to:
- Configure TLS passthrough per domain
- Add custom authentication rules to specific routes
- Set custom TLS options (e.g., mutual TLS, pinned certificates)
- Persist these settings through domain updates without manual re-configuration
Current Limitations
- Domain schema stores only middleware names, not full router configuration
manageDomain()function always regenerates full config with no merge capability- Advanced router properties (TLS, authentication) have no storage mechanism
- Updates to domain settings trigger full config regeneration, losing custom settings
Related Issues
- #3333 - Custom Traefik labels lost after redeployment (Standalone Apps)
- #4243 - Compose patches overwritten by domain injection
- #3374 - Add configurable middlewares for domains (✅ MERGED)
Describe the solution you'd like
Proposed Solution
- Add storage for custom router config per domain
- Add UI for advanced Traefik configuration (textarea/YAML editor in domain settings)
- Implement merge logic to combine auto-generated config with user-provided custom config
- Preserve custom config during domain updates
Benefits
- Advanced Traefik users gain full flexibility
- Custom configurations persist through domain updates
- Backward compatible with existing domains
- Aligns with existing middleware customization feature
Impact
- Users can configure TLS passthrough, authentication, and other router-level properties per domain
- No loss of configuration on domain updates
- Enable more complex Traefik routing scenarios without manual file editing
Describe alternatives you've considered
Additional context
No response
Will you send a PR to implement it?
Maybe, need help
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the domain schema, manageDomain(), and the domain settings UI; the issue identifies these areas but no file paths or tests. Determine how generated Traefik configuration is produced for standalone and Compose deployments, then define storage and merge behavior for per-domain router configuration. Done means custom router settings, including TLS and authentication options, persist through domain updates without breaking existing domains.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- backend, devops, frontend, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100