URL Patterns

PatternProtocolExample
{app-id}.{cluster}.phala.networkHTTP/HTTPS to port 80 (default)abc123.dstack-prod5.phala.network
{app-id}-{port}.{cluster}.phala.networkHTTP/HTTPS (TLS termination)deadbeef111111111111111111111111-8080.dstack-prod5.phala.network
{app-id}-{port}g.{cluster}.phala.networkgRPC/HTTP2deadbeef111111111111111111111111-50051g.dstack-prod5.phala.network
{app-id}s.{cluster}.phala.networkTLS passthrough to port 443 (default)abc123s.dstack-prod5.phala.network
{app-id}-{port}s.{cluster}.phala.networkTLS passthroughdeadbeef111111111111111111111111-5432s.dstack-prod5.phala.network
{app-id}-22.{cluster}.phala.networkSSH tunneldeadbeef111111111111111111111111-22.dstack-prod5.phala.network
Default Port Behaviors:
  • No port specified = routes to port 80 for HTTP or port 443 for TLS passthrough
  • All external connections use port 443 regardless of internal port
  • {app-id} is auto-generated on deployment
  • {port} matches your container’s exposed port
  • {cluster} is regional (us, eu, asia)

Auto-populated Environment Variables

You can use these variables in your docker-compose file:
VariableValueExample
DSTACK_APP_IDApplication identifierabc123def456
DSTACK_GATEWAY_DOMAINRegional domainus.phala.network

Environment Variables

The variables you can change to config networking features.

SSH Access

VariableTypePurpose
DSTACK_ROOT_PASSWORDstringRoot password (dev images only)
DSTACK_ROOT_PUBLIC_KEYstringSSH public key (dev images only)

Custom Domains

VariableRequiredTypePurpose
DOMAINYesstringCustom domain name
TARGET_ENDPOINTYesstringhttp://service:port or grpc://service:port
GATEWAY_DOMAINYesstring_.${DSTACK_GATEWAY_DOMAIN}
CERTBOT_EMAILYesstringLet’s Encrypt email
SET_CAANobooleanEnable CAA records (default: false)
DNS_PROVIDERNostring`cloudflarelinodenamecheap` (auto-detected)

DNS Provider Credentials

ProviderVariablesRequired Permissions
CloudflareCLOUDFLARE_API_TOKENZone:Read, DNS:Edit
LinodeLINODE_API_TOKENDomains:Read/Write
NamecheapNAMECHEAP_USERNAME, NAMECHEAP_API_KEY, NAMECHEAP_CLIENT_IPAPI enabled

Protocol Support

ProtocolDefault ModeTLS Passthrough ModeEgress Traffic
HTTP/1.1
HTTP/2✅ (with g suffix)
WebSocket
TCP✅ (with s suffix)
UDP⚠️ (NAT travesal)N/A

Docker Images

ComponentImageHash
Custom domainskvin/dstack-ingresssha256:2cc3bc50d71faa4d313084237b0f5d1d25963024f2484c7a6414aed075883cdd

Rate Limits

DNS Providers

ProviderAPI LimitsCertificate Speed
Cloudflare1200 req/5min1-2 minutes
Linode800 req/hour2-5 minutes
Namecheap50 req/hour5-15 minutes

Let’s Encrypt

LimitRate
Certificates per domain50/week
Duplicate certificates5/week
Failed validations5/hour per hostname