DNS Providers and Automatic HTTPS
SHC supports automatic DNS record management and HTTPS certificate issuance via integration with DNS providers and Traefik’s ACME support.
Overview
Section titled “Overview”When deploying apps with --host, SHC can:
- Create DNS records pointing to your deployment
- Configure Traefik to issue HTTPS certificates via Let’s Encrypt
Configuration
Section titled “Configuration”DNS Provider Setup
Section titled “DNS Provider Setup”Configure DNS providers in your SHC config:
dns: providers: cloudflare: token: ref+vault://dns/cloudflare_token route53: region: us-east-1 access_key_id: ref+vault://dns/aws_access_key secret_access_key: ref+vault://dns/aws_secret_key # Optional: explicit default provider provider: cloudflareSupported Providers
Section titled “Supported Providers”| Provider | Config Key | Required Settings |
|---|---|---|
| Cloudflare | cloudflare | token |
| AWS Route53 | route53 | region |
| Hetzner | hetzner | token |
| PowerDNS | powerdns | api_key, endpoint |
| DigitalOcean | digitalocean | token |
| Google Cloud DNS | gcp | project_id |
| Azure DNS | azure | subscription_id, resource_group |
| Linode | linode | token |
| Vultr | vultr | api_key |
| Namecheap | namecheap | api_user, api_key, client_ip |
All providers support Traefik DNS-01 challenges automatically.
Provider Selection
Section titled “Provider Selection”If dns.provider is not set, SHC uses the first key in dns.providers.
CLI Usage
Section titled “CLI Usage”Basic Deployment with DNS
Section titled “Basic Deployment with DNS”# Create DNS record pointing to current nodeshc install nginx --host app.example.comEnable HTTPS (HTTP-01 Challenge)
Section titled “Enable HTTPS (HTTP-01 Challenge)”# HTTPS with HTTP-01 challenge (default)shc install nginx --host app.example.com --tlsEnable HTTPS (DNS-01 Challenge)
Section titled “Enable HTTPS (DNS-01 Challenge)”# HTTPS with DNS-01 challengeshc install nginx --host app.example.com --tls dnsOverride DNS Provider
Section titled “Override DNS Provider”# Use specific provider for this deploymentshc install nginx --host app.example.com --dns-provider route53DNS Cleanup on Uninstall
Section titled “DNS Cleanup on Uninstall”# Uninstall releases the deployment's managed-DNS records automaticallyshc uninstall myappTLS Modes
Section titled “TLS Modes”No TLS (HTTP only)
Section titled “No TLS (HTTP only)”Without --tls, the app is accessible only via HTTP.
HTTP-01 Challenge
Section titled “HTTP-01 Challenge”When using --tls (without additional arguments):
- Domain must resolve to the Traefik instance
- Port 80 must be accessible from the internet
- Traefik handles certificate issuance and renewal
DNS-01 Challenge
Section titled “DNS-01 Challenge”When using --tls dns:
- DNS provider credentials must be configured
- Works for internal/private networks
- Required for wildcard certificates
Record Types
Section titled “Record Types”SHC automatically selects the appropriate DNS record type:
| Target Type | Record Type |
|---|---|
| IPv4 address | A |
| IPv6 address | AAAA |
| Hostname | CNAME |
Scope Resolution
Section titled “Scope Resolution”DNS provider selection follows the same scoping rules as other SHC config:
--dns-providerCLI flag (highest priority)dns.providerat deployment scopedns.providerat environment scopedns.providerat stack scopedns.providerat tenant scopedns.providerat base scope- First key in
dns.providers(lowest priority)
Traefik Integration
Section titled “Traefik Integration”SHC manages Traefik’s ACME configuration automatically:
- Generates certificate resolver configuration
- Injects DNS provider credentials for DNS-01
- Updates Traefik when provider configuration changes
Traefik Sync Behavior
Section titled “Traefik Sync Behavior”- Sync is on-demand: only when providers change
- Only affected Traefik instances are updated
- All current providers are written on each sync
ACME Email
Section titled “ACME Email”Configure contact email for Let’s Encrypt notifications:
acme: email: admin@example.comStaging Certificates
Section titled “Staging Certificates”For testing, use Let’s Encrypt staging:
acme: staging: trueBest Practices
Section titled “Best Practices”- Use DNS-01 for internal services: Avoids exposing port 80
- Store credentials in Vault: Use
ref+vault://references - Set ACME email: Receive certificate expiration warnings
- Test with staging first: Avoid rate limits during development