Overview
Domains in Dokploy provide:- Custom domain routing to applications and compose services
- Automatic SSL certificate management with Let’s Encrypt
- Path-based routing and URL rewriting
- HTTP to HTTPS redirects
- Multiple domains per application
- Service name routing for compose deployments
Custom Domains
Point your own domains to applications and services.
Auto SSL
Automatic SSL certificate generation and renewal with Let’s Encrypt.
Path Routing
Route different paths to different services or applications.
Preview Domains
Automatically generated domains for preview deployments.
Domain Types
Dokploy supports three types of domain configurations:Application Domains
Route traffic to standalone applications:Compose Service Domains
Route traffic to specific services in a compose deployment:Preview Deployment Domains
Automatic domains for pull request preview deployments:Domain Configuration
Basic Settings
The domain or subdomain (e.g.,
app.example.com, api.mysite.org)The port your application listens on inside the container
The URL path to match (e.g.,
/, /api, /v1/users)Enable HTTPS for this domain
SSL Certificates
Certificate type:
none, letsencrypt, or custom- Let's Encrypt
- Custom Resolver
- No Certificate
Automatic certificate generation and renewal:Requirements:
- Domain must point to your server’s IP address
- Port 80 and 443 must be accessible
- Valid email configured in Dokploy settings
Let’s Encrypt certificates are automatically renewed before expiration.
Path-Based Routing
Basic Path Routing
Route different paths to different applications:Internal Path Mapping
The path to forward to the application (useful for path rewriting)
Remove the matched path before forwarding to the application
Example: Path Stripping
Traefik.me Domains
Dokploy can automatically generate.traefik.me domains for testing:
Generating Traefik.me Domains
Traefik.me is a free service that provides wildcard DNS resolution to any IP address. It’s perfect for testing before configuring real domains.
{appName}.{ip-address}.traefik.meresolves to{ip-address}- No DNS configuration needed
- Works immediately
- Supports HTTPS with Let’s Encrypt
Managing Domains
Creating a Domain
Updating a Domain
- Updates the Traefik configuration
- Regenerates SSL certificates if needed
- Applies the new routing rules
Deleting a Domain
- The domain configuration
- Traefik routing rules
- SSL certificates (if not used by other domains)
Domain Validation
Validate that a domain is correctly configured:- DNS resolution
- IP address matches server
- Port accessibility
- SSL certificate validity
Multiple Domains per Application
Applications can have multiple domains configured:Compose Service Routing
For Docker Compose deployments, route different domains to different services:Advanced Routing
Redirects
Configure URL redirects at the application level:Headers
Traefik automatically adds common security headers. You can customize these through Traefik configuration.Load Balancing
For applications with multiple replicas, Traefik automatically load balances traffic using round-robin.DNS Configuration
To use custom domains, configure your DNS:A Record
Point your domain to your server’s IP address:CNAME Record
For subdomains:Wildcard DNS
For preview deployments or dynamic subdomains:SSL/TLS Configuration
Let’s Encrypt Limits
Let’s Encrypt has rate limits:- 50 certificates per registered domain per week
- 5 duplicate certificates per week
- 300 new orders per account per 3 hours
Certificate Storage
Certificates are stored in:Database Schema
Domains are stored with the following structure:Traefik Integration
Dokploy uses Traefik for reverse proxy functionality. When you create or update a domain:- Dokploy generates Traefik configuration
- Configuration is written to
/etc/dokploy/traefik/applications/{appName}.yml - Traefik automatically reloads the configuration
- If HTTPS is enabled, Traefik requests a certificate from Let’s Encrypt
- Traffic starts routing to your application
Traefik Configuration Example
Troubleshooting
Domain Not Working
-
Check DNS: Verify the domain resolves to your server’s IP
-
Check Port Access: Ensure ports 80 and 443 are open
-
Check Traefik Logs:
-
Verify Application is Running:
SSL Certificate Issues
- Check Let’s Encrypt Logs in Traefik container
- Verify DNS is correctly configured
- Check Rate Limits - you may have hit Let’s Encrypt limits
- Try Staging Certificates first for testing
Path Routing Issues
- Verify path order - more specific paths should be configured first
- Check stripPath setting - ensure it matches your application’s expectations
- Review application logs - see what paths are being received
Best Practices
Use HTTPS for Production
Use HTTPS for Production
Always enable HTTPS for production applications. Let’s Encrypt provides free certificates with automatic renewal.
Configure www Redirects
Configure www Redirects
Decide whether to use www or non-www and configure redirects accordingly to avoid duplicate content.
Test with Traefik.me First
Test with Traefik.me First
Use traefik.me domains for initial testing before configuring real domains.
Monitor Certificate Expiry
Monitor Certificate Expiry
While renewal is automatic, monitor certificate expiry dates to catch any renewal failures.
Use Wildcard DNS for Previews
Use Wildcard DNS for Previews
Configure wildcard DNS (*.preview.example.com) for preview deployment domains.
Next Steps
Applications
Learn more about deploying applications
Docker Compose
Configure domains for compose services