Custom Domains
Add custom domains to your Cluster functions with automatic TLS.
Custom Domains
Every function gets a default URL at https://{function-name}.clusterbase.dev. You can also add your own custom domains with automatic TLS via Let's Encrypt.
Add a Domain
ccp domains add example.com
# ✓ Domain example.com added to my-app
#
# DNS Add this A record in your DNS provider:
#
# Type: A
# Name: example.com
# Value: 34.xx.xx.xx
#
# › TLS certificate will be issued automaticallyAfter adding the A record in your DNS provider, Traefik will automatically provision a TLS certificate via Let's Encrypt.
List Domains
ccp domains list
# › Domains for my-app:
# • example.com
# • www.example.comRemove a Domain
ccp domains remove example.com
# Remove domain example.com? (y/N): y
# ✓ Domain example.com removedDomain Requirements
- Must include a TLD (e.g.,
example.com, not justexample) - No scheme (
https://), path (/), port (:), or spaces - Maximum 253 characters
Aliases
| Command | Alias |
|---|---|
ccp domains list | ccp domains ls |
ccp domains remove | ccp domains rm |
How It Works
When you add a domain, the API:
- Adds the domain to the function's domain list in PostgreSQL
- Creates a Traefik router rule for the domain pointing to the serverless runtime
- Traefik automatically provisions a Let's Encrypt TLS certificate
- Requests to your domain are routed to the function's active production deployment