Skip to main content
We recommend a wildcard DNS record and a wildcard TLS certificate for the OpenHands hostnames. Use cert-manager to issue and renew the certificate with the DNS-01 challenge.

Hostnames

OpenHands serves these hostnames, using openhands.example.com as the base domain (matching the Helm install): Every hostname sits one label below the base domain, so a DNS record and a certificate for *.openhands.example.com cover them all. Point the wildcard record at your ingress load balancer, for example with a CNAME to the load balancer’s hostname or a cloud DNS alias. If you already have records for the app, auth, or runtime-api hostnames, point them at the same load balancer. If you configure a hostname outside this pattern, such as the base domain itself, add a DNS record and a certificate name for it.

ExternalDNS

The wildcard record covers every OpenHands hostname, so you don’t need ExternalDNS. If you run ExternalDNS in the cluster, we recommend these settings:
Then exclude the sandbox resources from ExternalDNS before you start any sandboxes. We recommend excluding them by label. If that doesn’t fit your cluster, exclude them by annotation instead.

Exclude sandbox resources by label

Add this to your ExternalDNS Helm values:
If your values already set labelFilter, add !runtime_id to it as a comma-separated requirement. Run kubectl get ingress,service -A -l runtime_id and check that the output lists only sandbox resources. If other resources that need DNS records have the runtime_id label, exclude the sandboxes by annotation instead.

Exclude sandbox Ingresses by annotation

Add these annotations to your OpenHands Helm values. The example uses Traefik with a default wildcard certificate. Set kubernetes.io/ingress.class to your ingress class.
If your ExternalDNS uses a different annotation prefix, such as external-dns.alpha.kubernetes.io/, use that prefix instead. The annotation applies to sandbox Ingresses created after you upgrade. Sandboxes that are already running keep their existing Ingresses.

cert-manager

cert-manager issues and renews certificates from Let’s Encrypt. Use the DNS-01 challenge, the only one that can issue wildcard certificates.
1

Install cert-manager

Install it from its Helm chart, and grant it access to your DNS provider so it can solve DNS-01 challenges.
2

Create a ClusterIssuer

The solvers block is specific to your DNS provider. The Route 53 solver is shown here.
Start with the staging server (https://acme-staging-v02.api.letsencrypt.org/directory) while you get the setup working (generous rate limits), then switch to production.
3

Request a wildcard certificate

With Traefik, serve the wildcard certificate through the default TLSStore and use a TLS-enabled entry point for the OpenHands routes.

Manual Setup

If you don’t use cert-manager, obtain a certificate with a *.openhands.example.com SAN and load it into the ingress controller as a Kubernetes TLS Secret. Renew the certificate and update the Secret before the certificate expires. If you can’t use a wildcard certificate, obtain one with SANs for the app, auth, and runtime-api hostnames plus runtime.openhands.example.com, and set runtime-api.env.RUNTIME_ROUTING_MODE: "path" in your Helm values so sandboxes are served under runtime.openhands.example.com/<id> instead of their own hostnames.

Verify DNS and HTTPS

  1. Open https://app.openhands.example.com and check that the browser trusts the certificate.
  2. Start a new sandbox and check that its hostname serves trusted HTTPS.
  3. If you run ExternalDNS, wait for it to sync, then check that your DNS zone has no record for the new sandbox hostname.

Clean up stale sandbox records

With the upsert-only policy, ExternalDNS doesn’t delete the sandbox records it created before you excluded the sandboxes. To remove them:
  1. Export the zone’s records so you can restore them if needed.
  2. Delete the record and its ExternalDNS ownership TXT record for each sandbox that is no longer running.
  3. Keep the wildcard record, the app, auth, and runtime-api records, and any _acme-challenge records that cert-manager uses.
  4. Leave the ExternalDNS policy set to upsert-only, and repeat the checks in Verify DNS and HTTPS.

Next Steps

Installing Sysbox

Install the sandbox runtime on your sandbox nodes.

Install with Helm

Deploy OpenHands once the cluster is ready.