How to Set Up a Custom Domain for Your OpenClaw Instance
Configure a custom domain for your OpenClaw instance. DNS setup, TLS configuration, and tips for nacre.sh and self-hosted deployments.
Running OpenClaw at ai.yourcompany.com or agent.yourname.com adds a professional touch and makes the endpoint memorable. This guide covers custom domain setup for both nacre.sh managed instances and self-hosted deployments.
nacre.sh Custom Domain Setup
nacre.sh supports custom domains on Team, Agency, and Scale plans.
- In your nacre.sh dashboard, go to Instance > Settings > Custom Domain
- Enter your desired domain (e.g.,
agent.yourcompany.com) - nacre.sh provides a CNAME target like
instance-xyz.nacre.sh - In your DNS provider, add a CNAME record:
- Name:
agent(or whatever subdomain you want) - Value:
instance-xyz.nacre.sh - TTL: 300 (5 minutes for initial testing)
- Name:
- Click Verify Domain in nacre.sh
- TLS is provisioned automatically via Let's Encrypt — typically within 2 minutes
Self-Hosted Custom Domain Setup
Prerequisites
- Domain registered at any registrar (Namecheap, Cloudflare, etc.)
- OpenClaw running on a VPS with a public IP
- Nginx or Caddy as your reverse proxy
DNS Configuration
In your DNS provider, add an A record:
- Name:
@for root domain or subdomain likeagent - Value: Your VPS IP address
- TTL: 300 initially, increase to 3600 after confirming it works
Caddy (Simplest — Automatic TLS)
agent.yourdomain.com {
reverse_proxy localhost:3000
}
Restart Caddy — TLS is handled automatically. Nothing else required.
Nginx + Certbot
# Obtain certificate
sudo certbot --nginx -d agent.yourdomain.com
# Nginx config created automatically by certbot
# Restart nginx
sudo systemctl restart nginx
Cloudflare Proxy (Optional)
If your domain is managed by Cloudflare, you can proxy traffic through their network for DDoS protection and caching:
- Set your DNS record to Proxied (orange cloud) in Cloudflare
- In Cloudflare SSL/TLS, set mode to Full (Strict)
- Your origin server still needs a valid TLS certificate
Benefits: Cloudflare hides your VPS IP, adds DDoS protection, and provides a global CDN layer.
Frequently Asked Questions
Can I use a root domain (yourdomain.com) rather than a subdomain?
Yes for Cloudflare (using CNAME flattening) and for most DNS providers that support ALIAS/ANAME records. Standard CNAME records don't work at the root — use an A record pointing to your IP instead.
How long does DNS propagation take?
With TTL of 300 (5 minutes), most regions see the change within 5–15 minutes. Global propagation completes within 24 hours in rare cases.
nacre.sh
Run OpenClaw without the server headaches
Dedicated instance, automatic TLS, nightly backups, and 290+ LLM integrations. Live in under 90 seconds from $12/month.
Deploy your agent →