Skip to content

DNS Configuration

Expose requires specific DNS records to route traffic correctly.

Required Records

Create these A records pointing to your VPS IP:

TypeNameValuePurpose
AapiYOUR_VPS_IPAPI server
A*.exposeYOUR_VPS_IPTunnel subdomains
A*.hostedYOUR_VPS_IPDeployment subdomains

Example Configurations

OVH

  1. Go to Web Cloud → Domain names → Your domain → DNS Zone
  2. Add records:
    • Type: A, Subdomain: api, Target: Your IP
    • Type: A, Subdomain: *.expose, Target: Your IP
    • Type: A, Subdomain: *.hosted, Target: Your IP

Cloudflare

  1. Go to DNS → Records
  2. Add A records (disable orange proxy cloud):
    • Name: api, IPv4: Your IP, Proxy: DNS only
    • Name: *.expose, IPv4: Your IP, Proxy: DNS only
    • Name: *.hosted, IPv4: Your IP, Proxy: DNS only

DigitalOcean

  1. Go to Networking → Domains → Your domain
  2. Create A records for each subdomain

Verify DNS

After creating records, verify they’re working:

Terminal window
# Check API domain
dig +short api.yourdomain.com
# Should return your VPS IP
# Check wildcard
dig +short test.expose.yourdomain.com
# Should return your VPS IP

DNS propagation usually takes 5-30 minutes, but can take up to 48 hours.

TLS Certificates

Expose uses wildcard TLS certificates via Let’s Encrypt DNS-01 challenge. This requires API access to your DNS provider.

OVH API Setup

  1. Go to https://eu.api.ovh.com/createToken/
  2. Create a token with these permissions:
    • GET /domain/zone/*
    • PUT /domain/zone/*
    • POST /domain/zone/*
    • DELETE /domain/zone/*
  3. Save the Application Key, Application Secret, and Consumer Key

Cloudflare API Setup

  1. Go to Profile → API Tokens
  2. Create token with Zone → DNS → Edit permissions
  3. Save the API Token

Troubleshooting

DNS Not Resolving

Terminal window
# Check if record exists
dig yourdomain.com ANY
# Check specific record
dig +trace api.yourdomain.com

Certificate Issues

If Let’s Encrypt can’t issue certificates:

  1. Verify DNS API credentials
  2. Check Traefik logs: docker logs traefik
  3. Ensure DNS records are correct
  4. Wait for full DNS propagation