Custom Domain Setup
Configure custom domains with automatic SSL certificates
Custom Domain Setup
This guide shows you how to set up custom domains for your services with automatic HTTPS via Let's Encrypt.
Prerequisites
- A running service in Senate
- A domain name you control
- DNS access to create records
Step 1: Configure DNS
Point your domain to your Senate server's IP address.
For a subdomain (recommended)
Create an A record:
app.yourdomain.com → YOUR_SERVER_IPFor a root domain
Create an A record for the root:
yourdomain.com → YOUR_SERVER_IPDNS changes can take up to 48 hours to propagate, though most resolve within minutes.
Step 2: Add Domain in Senate
- Navigate to your service
- Go to the Domains tab
- Click Add Domain
- Enter your domain configuration:
| Field | Description | Example |
|---|---|---|
| Host | Your domain name | app.yourdomain.com |
| Port | Container port to route to | 3000 |
| Path | URL path prefix (optional) | / or /api |
| Protocol | HTTP or HTTPS | https (recommended) |
- Click Save

Step 3: SSL Certificate
When you add an HTTPS domain, Senate automatically:
- Requests a certificate from Let's Encrypt
- Validates domain ownership via HTTP-01 challenge
- Configures Caddy with the certificate
- Sets up automatic renewal
SSL provisioning requires port 80 to be accessible for the HTTP-01 challenge, even for HTTPS-only domains.
Advanced Configuration
Multiple Domains
You can add multiple domains to a single service:
www.yourdomain.com→ Primary domainyourdomain.com→ Redirects to primaryapp.yourdomain.com→ Alternative domain
Path-Based Routing
Route different paths to different services:
yourdomain.com/ → frontend service
yourdomain.com/api/ → backend service
yourdomain.com/admin/ → admin serviceConfigure each path as a separate domain entry pointing to the appropriate service.
Gateway Status
Monitor your domain configuration in the machine's Gateway page:
- Go to Machines → Select your machine → Gateway
- View all configured routes
- Monitor upstream health

Troubleshooting
SSL certificate not provisioning
- Verify DNS is pointing to your server:
dig app.yourdomain.com - Ensure port 80 is open on your firewall
- Check Gateway status for errors
- Wait a few minutes for Let's Encrypt rate limits
Domain not accessible
- Verify the service is running (check Overview tab)
- Confirm the port matches your container's exposed port
- Check that the service container is healthy
- Review Gateway logs for routing errors
Next Steps
- Environment Variables - Configure your app's base URL
- Monitoring - Monitor domain traffic
- Gateway - Advanced routing configuration