Custom Domains

2 min read

There's no shared *.teploy.app hosting — every app is served from your own server under whatever domain you set in teploy.yml. Caddy (installed by teploy setup) handles routing and automatic HTTPS.

Add a domain

Set domain: in teploy.yml:

app: myapp
domain: myapp.com
server: production

Then deploy:

teploy deploy

Caddy generates a route for the domain and requests a certificate automatically on first deploy.

DNS configuration

Point your domain at your server's IP:

Type: A
Name: @
Value: [your server's IP address]

Type: A (or CNAME)
Name: www
Value: [your server's IP address] (or @)

Find your server's IP in ~/.teploy/servers.yml, or run teploy server list.

DNS propagation

After updating DNS, propagation typically takes a few minutes to an hour depending on your registrar's TTL. teploy deploy validates DNS resolves to the server before routing traffic — use --skip-dns-check if your domain is proxied through something like Cloudflare (the A record won't point directly at the server IP in that case).

Non-public domains (LAN, bare IPs)

If domain: isn't a real, publicly resolvable hostname — a bare IP address, .local, or an RFC1918 private address — teploy serves it over plain HTTP instead of attempting (and hanging on) an ACME challenge that can't succeed. teploy validate flags this explicitly so it's not a silent surprise.

Want HTTPS anyway on a non-public domain (self-signed, browser will warn)? Opt in with:

tls: internal

This uses Caddy's local CA instead of Let's Encrypt.

Multiple domains

One app can serve multiple hostnames — comma-separate them in domain::

domain: myapp.com,www.myapp.com

Common setups:

  • myapp.com + www.myapp.com
  • app.mycompany.com (subdomain of a domain hosted elsewhere)

Wildcard domains

Caddy's stock Docker image (what teploy setup installs) only supports HTTP-01 and TLS-ALPN-01 ACME challenges — neither can issue a wildcard certificate, which requires a DNS-01 challenge and a provider-specific Caddy module. Wildcard domains aren't supported out of the box; if you need one, you'd need a custom Caddy build with the relevant DNS provider plugin (e.g. via xcaddy), which is outside what teploy setup provisions today.

Optional: Cloudflare

If you want CDN and DDoS protection in front of your server, you can route traffic through Cloudflare:

  1. Add your domain to Cloudflare
  2. Point Cloudflare to your server's IP
  3. Enable proxy (orange cloud)

See Cloudflare Setup for details.