derper

by QuenchWorks

Helm chartv0.0.1App 1.104.7BSD-3-ClauseVerified publisher

derper: Tailscale's DERP relay for tailnets (Tailscale or Headscale), relaying traffic between nodes that cannot connect directly, with STUN, TLS on 443 as nonroot. Hardened by QuenchWorks: built from source, CVE-gated, cosign-signed and pinned by digest.

About this chart

Quenchworks derper

Hardened derper, Tailscale's DERP relay: when two tailnet nodes cannot reach each other directly, they relay their (end-to-end encrypted) WireGuard traffic through a DERP server, and use its STUN service for NAT traversal. Run your own region for Tailscale or for Headscale. The image is built from the Tailscale source; it runs as uid 1001 and is CVE-gated at build, cosign-signed and pinned by digest.

Install

helm install derp oci://ghcr.io/quenchworks/charts/derper --set hostname=derp.example.com \
  --set service.type=LoadBalancer \
  --set tls.certManager.enabled=true --set tls.certManager.issuerRef.name=letsencrypt \
  --set 'tls.certManager.dnsNames={derp.example.com}'

derper serves TLS only on port 443. The chart lets the nonroot user bind it with the safe sysctl net.ipv4.ip_unprivileged_port_start=0 (in podSecurityContext) instead of running as root. Expose 443/tcp and 3478/udp (a LoadBalancer Service is the usual way), point DNS for hostname at it, then add the region to your DERP map (Tailscale ACLs or Headscale's derp.paths).

Configuration

KeyDefaultWhat it does
hostnamerequiredThe relay's DNS name (clients connect with this SNI)
stun.enabledtrueSTUN on 3478/udp
verifyClientsfalseRelay only for your tailnet's nodes (needs a tailscaled sidecar)
extraArgs[]More derper flags
tlsenabledCertificate source: existing Secret, cert-manager, or a Helm-made CA (testing only)
service.typeClusterIPUse LoadBalancer to reach it from the internet

Verify the image

cosign verify ghcr.io/quenchworks/images/derper \
  --certificate-identity-regexp 'https://github.com/quenchworks/.+' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Deploy derper with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has derper on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartderper is pinned at v0.0.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply