Custom Domain & SSL
Give your applications professional, branded URLs with automatic HTTPS.
How It Works
Slipway uses Caddy as its reverse proxy, which provides:
- Automatic HTTPS via Let's Encrypt
- Automatic certificate renewal
- HTTP/2 and HTTP/3 support
- WebSocket proxying (critical for Sails real-time features)
When you add a domain, Caddy automatically:
- Obtains an SSL certificate from Let's Encrypt
- Configures HTTPS redirection
- Sets up the reverse proxy to your app
Adding a Domain
Via CLI
slipway domain:add myapp example.comVia Dashboard
- Go to your project and select an environment
- Click the app name from the Apps list to go to the app detail page
- Click the ellipsis dropdown menu and select Custom domain
- Enter your domain name
- Click Add
DNS Configuration
Before adding a domain in Slipway, configure your DNS:
A Record (Recommended)
Point your domain directly to your Slipway server's IP:
| Type | Name | Value | TTL |
|---|---|---|---|
| A | @ | 203.0.113.50 | 300 |
| A | www | 203.0.113.50 | 300 |
CNAME Record
If your DNS provider doesn't support A records at the apex, use a CNAME:
| Type | Name | Value | TTL |
|---|---|---|---|
| CNAME | www | slipway.yourdomain.com | 300 |
Root Domain CNAME
Most DNS providers don't allow CNAME records on the root domain (e.g., example.com). Use an A record for the root, or check if your provider supports CNAME flattening (Cloudflare calls this "CNAME at apex").
SSL Certificates
Automatic Provisioning
SSL certificates are provisioned automatically when you add a domain. This typically takes 30-60 seconds.
$ slipway domain:add myapp example.com
Adding domain example.com to myapp...
✓ Domain added
✓ SSL certificate provisioned
✓ HTTPS enabled
Your app is now available at:
https://example.comCertificate Status
Check certificate status:
slipway domain:info myapp example.comOutput:
Domain: example.com
App: myapp
SSL: ✓ Valid
Issuer: Let's Encrypt
Expires: 2024-04-20
Auto-renew: EnabledCertificate Renewal
Certificates are renewed automatically 30 days before expiration. No action required.
Troubleshooting SSL
If SSL provisioning fails:
Verify DNS is correct:
bashdig example.com +short # Should return your server's IPCheck port 80 is accessible: Let's Encrypt validates via HTTP. Ensure port 80 is open.
Wait for DNS propagation: DNS changes can take up to 48 hours. Use DNS Checker to verify.
Check rate limits: Let's Encrypt has rate limits. If you've requested too many certificates, wait and try again.
Multiple Domains
You can add multiple domains to a single app:
slipway domain:add myapp example.com
slipway domain:add myapp www.example.com
slipway domain:add myapp app.example.comAll domains will point to the same application.
Primary Domain
The first domain added becomes the primary domain. To change it:
slipway domain:set-primary myapp www.example.comSubdomains
Wildcard Subdomains
For apps that need dynamic subdomains (e.g., tenant1.example.com, tenant2.example.com):
slipway domain:add myapp "*.example.com"DNS Wildcard Required
You'll need a wildcard DNS record:
| Type | Name | Value |
|---|---|---|
| A | * | 203.0.113.50 |
Specific Subdomains
slipway domain:add myapp api.example.com
slipway domain:add myapp admin.example.comRemoving Domains
slipway domain:remove myapp example.comThis removes the domain from routing but doesn't affect your DNS records. Update DNS separately.
Domain Verification
For security, Slipway verifies domain ownership before provisioning SSL:
- DNS Verification (automatic): Slipway checks if the domain points to your server
- HTTP Verification (automatic): Let's Encrypt verifies via HTTP challenge
Redirects
WWW to Non-WWW
Redirect www.example.com to example.com:
slipway domain:redirect www.example.com example.comNon-WWW to WWW
Redirect example.com to www.example.com:
slipway domain:redirect example.com www.example.comCustom Redirects
For other redirects, use environment variables in your Sails app or configure in config/routes.js.
Using Cloudflare
If you're using Cloudflare as a DNS proxy:
Recommended Settings
SSL/TLS Mode: Set to Full (Strict)
- Cloudflare → HTTPS → Your Server → HTTPS → App
Disable Cloudflare Proxy Initially:
- Set DNS to "DNS only" (gray cloud) first
- Once SSL is working, enable proxy (orange cloud)
Page Rules:
- Create a rule to always use HTTPS
Cloudflare + Slipway SSL
With Cloudflare proxy enabled, you get:
- Cloudflare's edge SSL (browser → Cloudflare)
- Slipway's origin SSL (Cloudflare → your server)
This is the most secure configuration.
Slipway Dashboard Domain
To add a custom domain for the Slipway dashboard itself:
1. Add DNS Record
Point your domain to your Slipway server:
| Type | Name | Value |
|---|---|---|
| A | slipway | 203.0.113.50 |
2. Update Slipway Configuration
SSH into your server and update the Slipway container:
docker stop slipway
docker run -d \
--name slipway \
--network slipway \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock \
-v slipway-data:/app/data \
-e NODE_ENV=production \
-e PORT=1337 \
-e SLIPWAY_URL="https://slipway.yourdomain.com" \
-e SLIPWAY_SECRET=$SLIPWAY_SECRET \
-l "caddy=slipway.yourdomain.com" \
-l "caddy.reverse_proxy={{upstreams 1337}}" \
ghcr.io/sailscastshq/slipway:latestThe Caddy labels tell the proxy to route slipway.yourdomain.com to the Slipway container.
3. Access via HTTPS
Your Slipway dashboard is now available at:
https://slipway.yourdomain.comBest Practices
1. Always Use HTTPS
Slipway enforces HTTPS by default. HTTP requests are automatically redirected.
2. Use Separate Domains for Environments
myapp.com → production
staging.myapp.com → staging
dev.myapp.com → development3. Set Up Both WWW and Non-WWW
Add both domains and set up a redirect:
slipway domain:add myapp example.com
slipway domain:add myapp www.example.com
slipway domain:redirect www.example.com example.com4. Monitor Certificate Expiration
While auto-renewal should work, monitor your certificates:
slipway domain:list myappTroubleshooting
"Domain Not Resolving"
- Check DNS propagation: https://dnschecker.org
- Verify A record points to correct IP
- Wait up to 48 hours for propagation
"SSL Certificate Error"
- Ensure port 80 is open (Let's Encrypt needs it)
- Check rate limits if you've made many requests
- Verify domain ownership
"502 Bad Gateway"
- Ensure your app is running:
slipway app:status myapp - Check app logs:
slipway logs myapp - Verify the app is listening on the correct port
"Mixed Content Warnings"
If your browser shows mixed content warnings:
- Ensure all assets use HTTPS URLs
- Update hardcoded HTTP URLs in your code
- Use protocol-relative URLs:
//example.com/asset.js
What's Next?
- Configure Environment Variables for your domains
- Set up Auto-Deploy for continuous deployment
- Learn about Database Services for your app