Set Up a Custom Domain
This guide shows you how to connect a domain you own to a service deployed on Clank. Once configured, Clank automatically provisions an HTTPS certificate via Let’s Encrypt and routes traffic to your service.
Prerequisites
Section titled “Prerequisites”- A service deployed on Clank with a Public Direct endpoint mode. Custom domains require the server to be directly reachable by IP so Let’s Encrypt can complete HTTP-01 certificate validation.
- A domain name you control, with access to its DNS settings.
Step 1: Confirm your endpoint mode
Section titled “Step 1: Confirm your endpoint mode”Custom domains work with the Public Direct access mode, where your server has a public IP and accepts inbound traffic on ports 80 and 443.
Open your service in the dashboard and check the Endpoint settings. If the service is not set to Public Direct, change the access mode before proceeding.
Step 2: Add your domain
Section titled “Step 2: Add your domain”- Open the service in the dashboard.
- Go to Settings and find the Domains section.
- Click Add Domain.
- Enter your domain (e.g.,
app.example.com). - Clank displays two DNS records you need to create.
Step 3: Create DNS records
Section titled “Step 3: Create DNS records”Go to your DNS provider and create both of the following records:
A record — Points your domain to the server’s IP address.
| Type | Name | Value | TTL |
|---|---|---|---|
| A | app.example.com | 203.0.113.10 | 300 |
Replace 203.0.113.10 with the public IP of the server where your service is deployed. You can find this on the Servers page in the dashboard.
TXT record — Proves you own the domain.
| Type | Name | Value | TTL |
|---|---|---|---|
| TXT | _clank-challenge.app.example.com | clank-verify=abc123... | 300 |
The exact TXT record name and value are shown in the dashboard after you add the domain. Copy them exactly.
DNS provider examples
Section titled “DNS provider examples”Cloudflare: Go to your domain’s DNS settings, click Add Record, select the type (A or TXT), enter the name and value, and save. If using Cloudflare’s proxy (orange cloud), disable it for the A record so Let’s Encrypt HTTP-01 validation can reach your server directly.
Namecheap: Go to Domain List, click Manage next to your domain, then Advanced DNS. Click Add New Record for each entry.
Route 53: Open your hosted zone, click Create Record, choose the record type, and enter the name and value.
Step 4: Wait for verification
Section titled “Step 4: Wait for verification”After you create both DNS records, Clank automatically polls for them. Verification typically completes within a few minutes, but DNS propagation can take up to 48 hours depending on your provider and TTL settings.
You can check the verification status on the domain entry in your service settings. Once verified, the status changes to Active.
Step 5: HTTPS is provisioned automatically
Section titled “Step 5: HTTPS is provisioned automatically”Once the domain is verified, Clank configures Traefik to route traffic for your domain to the service and requests a Let’s Encrypt certificate using HTTP-01 validation. The certificate is issued and installed automatically. No manual action is needed.
Your service is now reachable at https://app.example.com.
Troubleshooting
Section titled “Troubleshooting”Domain stuck in “Pending” for more than an hour:
- Verify both DNS records are correct using a tool like
digor dnschecker.org:Terminal window dig A app.example.comdig TXT _clank-challenge.app.example.com - Confirm the A record points to the correct server IP.
- Confirm the TXT record name includes the
_clank-challenge.prefix. - If using Cloudflare, make sure the orange proxy cloud is disabled on the A record.
HTTPS certificate not issuing:
- Let’s Encrypt HTTP-01 requires ports 80 and 443 to be open on the server. Check your firewall rules.
- Ensure the A record is pointing to the correct server and that Traefik is running.
Next steps
Section titled “Next steps”- Manage Environment Variables — configure secrets and env vars for your services
- Troubleshoot Deployment Failures — diagnose common deployment problems