- Internal DNS - Resolves service names to container IPs within the cluster
- Managed DNS - Provides
*.uncld.devdomains for public internet access
Internal DNS
Every Uncloud machine runs a built-in DNS server that resolves service names to container IP addresses. This allows containers to discover and communicate with each other across machines.Service name resolution
Services are accessible at<service-name>.internal:
Service ID resolution
You can also resolve services by their ID:Machine-specific resolution
Need to reach a service on a specific machine? Use the machine-specific DNS format:- Debugging specific machine issues
- Draining traffic from a machine before maintenance
- Sticky sessions or affinity requirements
Nearest mode
Want to prefer local containers? Use thenearest prefix:
DNS configuration
Containers automatically use the internal DNS server. Docker sets it up when containers join the Uncloud network. You can verify DNS configuration inside a container:10.210.X.1) as the nameserver.
Managed DNS (*.uncld.dev)
Uncloud provides free*.uncld.dev subdomains for your clusters through the Uncloud DNS service. This eliminates the need to configure your own DNS records for development and testing.
Reserving a domain
Reserve a unique subdomain for your cluster:web.xuw3xd.uncld.devapi.xuw3xd.uncld.devadmin.xuw3xd.uncld.dev
uc machine init, a domain is automatically reserved unless you use --no-dns.
Checking your domain
View your cluster’s reserved domain:Releasing a domain
Release your cluster’s domain when you no longer need it:Can I choose my domain name?
Can I choose my domain name?
No. Domains are randomly generated to ensure uniqueness and availability. This prevents domain squatting and makes the system fair for everyone.For custom domains, see the Custom Domain Setup section below.
DNS record updates
Uncloud automatically updates DNS records to point to machines running Caddy containers. This happens when:- You reserve a domain with
uc dns reserve - You deploy Caddy with
uc caddy deploy - You add a machine with
uc machine add
DNS propagation
Changes to*.uncld.dev records propagate quickly (usually within seconds) because the Uncloud DNS service uses low TTL values.
You can verify DNS resolution:
Custom domain setup
While*.uncld.dev domains are convenient for development, you’ll want to use your own domain for production.
Prerequisites
- A domain name you own (e.g.,
example.com) - Access to your domain’s DNS settings
- At least one machine with a public IP running Caddy
Step 1: Deploy your service
Deploy your service with your custom domain:compose.yaml:
Step 2: Create DNS records
Create A (for IPv4) or AAAA (for IPv6) records pointing to your machines’ public IPs: For a single machine:api.example.com, admin.example.com) to resolve to your machine.
Step 3: Wait for propagation
DNS changes can take anywhere from a few minutes to 48 hours to propagate globally, depending on your DNS provider and TTL settings. Check DNS propagation:Multiple domains for one service
You can expose a service on multiple domains:compose.yaml:
Apex domain (example.com)
To use your apex domain (withoutwww or other subdomain):
What if DNS doesn't resolve after 24 hours?
What if DNS doesn't resolve after 24 hours?
If your DNS records aren’t resolving after a day:
-
Verify the DNS record in your provider’s dashboard
- Make sure you created an A record (not CNAME)
- Double-check the IP address is correct
- Verify there are no typos in the domain name
-
Check DNS propagation
Use Google’s DNS (
8.8.8.8) or Cloudflare’s (1.1.1.1) to check global propagation -
Clear your local DNS cache
- Contact your DNS provider Some providers have additional verification steps or restrictions on certain record types
DNS best practices
Use managed DNS for development
The free*.uncld.dev domains are perfect for:
- Development environments
- Testing deployments
- Preview branches
- Internal tools that don’t need a custom domain
Use custom domains for production
For production workloads:- Use your own domain name
- Configure proper TTL values (3600 seconds is a good default)
- Set up multiple A records for high availability
- Consider using a CDN like Cloudflare for DDoS protection
Monitor DNS health
Regularly check that your DNS records point to reachable machines:DNS command reference
| Command | Description |
|---|---|
uc dns reserve | Reserve a *.uncld.dev subdomain for your cluster |
uc dns show | Display your cluster’s reserved domain |
uc dns release | Release your cluster’s domain |
uc dns reserve --endpoint URL | Use a custom Uncloud DNS API endpoint |
Next steps
Caddy Proxy
Configure HTTPS and reverse proxy
Troubleshooting
Debug DNS and connectivity issues
