elide orb

elide orb is the full network orchestrator. Where elide serve runs your application, elide orb runs your infrastructure: reverse proxy with load balancing, auto-HTTPS via ACME, Tailscale and WireGuard networking, private PKI with mTLS, gRPC proxy, L4 TCP relay, DERP relay, zero-downtime upgrades — all driven by a single PKL configuration file.

Requires an Elide Pro license. See elide.pro for details.

When to use orb vs serve

elide serve is for your application — static files, JS/TS handlers, CGI scripts. It covers the common case of putting a server in front of your code. elide orb is for your network. If you need to reverse-proxy traffic to backend pools, terminate TLS with auto-provisioned certificates, join a Tailscale network, bridge multiple overlay networks, or perform zero-downtime binary upgrades — that is elide orb territory.

Both commands share the same server engine. orb unlocks the premium configuration surface on top of it.

Prerequisites

  • PKL config: A configuration file amending elide:serve/ElideServer.pkl is required (--config).
  • Platform: Linux or macOS. Windows support is experimental.

---

Quick deploy

A reverse proxy fronting two backend servers, with a static SPA fallback:

pkl
amends "elide:serve/ElideServer.pkl"

servers {
  ["api.example.com"] {
    routes {
      new {
        match { path = "/v1/**" }
        handler = new ReverseProxy {
          upstreams { "backend-1:8080"; "backend-2:8080" }
          loadBalancing = "least_connections"
        }
      }
    }
    handler = new StaticFiles { root = "./dist"; spaFallback = true }
  }
}
bash
 elide orb --config server.pkl

Elide reads the config, binds listeners, provisions TLS certificates if configured, and starts serving.

Add Tailscale in one flag

bash
 elide orb --config server.pkl --tailscale

This binds to the node's Tailscale IP, provisions a Tailscale-issued TLS certificate (trusted by all tailnet devices), and registers MagicDNS.

Standalone Tailscale (no daemon)

Run as a self-contained Tailscale node — no tailscaled required. Elide embeds the TS2021 control plane, WireGuard data plane, and DERP relay client:

bash
 elide orb --config server.pkl --tailscale-direct --tailscale-auth-key tskey-auth-...

Auto-HTTPS with ACME

Provision and auto-renew TLS certificates via Let's Encrypt:

bash
 elide orb --config server.pkl --auto-https --domain example.com,www.example.com --acme-email admin@example.com

Or declare it entirely in PKL:

pkl
amends "elide:serve/ElideServer.pkl"

tls {
  acmeEmail = "admin@example.com"
}

servers {
  ["example.com"] {
    domains { "example.com"; "www.example.com" }
    handler = new StaticFiles { root = "./dist" }
  }
}

DERP relay co-hosting

Host a DERP relay alongside the HTTP server for Tailscale-compatible peer relay:

bash
 elide orb --config server.pkl --tailscale --derp

---

Capability matrix

Everything elide serve can do, elide orb can do. The reverse is not true.
Capabilityelide serveelide orb
Static files, JS/TS handlers, CGIYesYes
PKL configuration (—config)YesYes (required)
Admin APIYesYes
TUI / plain / JSON outputYesYes
Reactor + worker tuningYesYes
Reverse proxy, load balancingYes
L4 TCP relay, gRPC proxyYes
Auto-HTTPS (ACME)Yes
Tailscale (daemon, standalone, Funnel)Yes
WireGuard / multi-networkYes
DERP relay co-hostingYes
Private PKI, mTLSYes
Zero-downtime upgradesYes
WebRTC listenersYes
---

Capabilities

Every capability below is configured through the PKL file, CLI flags, or both — no code changes needed.

Reverse proxy and load balancing

Route requests to upstream pools with round-robin, least-connections, IP-hash, random, first-healthy, or cookie-based session affinity. Health checks, circuit breakers, WebSocket proxying, and header rewriting are all configurable per-route.

pkl
handler = new ReverseProxy {
  upstreams {
    new { address = "backend-1:8080"; weight = 2 }
    new { address = "backend-2:8080"; weight = 2 }
    new { address = "backend-3:8080"; backup = true }
  }
  loadBalancing = "least_connections"
  timeout = 30.s
  preserveHost = true
  websocket = true
}

See the configuration guide for full ReverseProxy patterns and the serve configuration reference for the complete PKL schema.

Tailscale and WireGuard networking

Three Tailscale modes: local daemon, Tailscale Funnel, and standalone direct mode. Raw WireGuard tunnels for non-Tailscale peers. Multiple named networks can coexist — a production tailnet alongside a staging one, or a WireGuard VPN alongside a Tailscale network.

See Tailscale integration for deployment patterns and configuration.

Multi-network orchestration

Define independent network attachments in a single config. Each network has its own data plane, routing rules, and identity:

pkl
networks {
  ["production"] {
    tailscale { direct = true; authKey = env("TS_PROD_KEY") }
    tunnel { bridgeInbound = true }
  }
  ["office-vpn"] {
    wireguard { configFile = "./wg-office.conf" }
    tunnel { bridgeOutbound = true }
  }
}

L4 relay and gRPC proxy

TCP-level relay for raw throughput. gRPC proxying with HTTP/2 multiplexing. Both operate alongside HTTP routing on the same listeners.

Auto-HTTPS and private PKI

ACME certificate provisioning via HTTP-01, TLS-ALPN-01, and DNS-01 challenges. Wildcard certificates via DNS-01 with Cloudflare or webhook providers. On-demand TLS for dynamic hostname provisioning. Private CA and mTLS for internal services via elide cert.

DERP relay

Co-host a DERP (Designated Encrypted Relay for Packets) relay alongside the HTTP server. The relay operates independently and shuts down gracefully on exit. Useful for self-hosted Tailscale infrastructure or air-gapped environments where public DERP relays are unreachable.

Admin API

A separate HTTP server (isolated from the main pipeline) with health/readiness probes, live configuration view, route table, middleware summary, cache statistics, and an HTMX dashboard. Configurable via --admin-port, --admin-socket, or PKL. When bound to a non-loopback address without an explicit --admin-token, a random bearer token is auto-generated and printed to stderr.

Zero-downtime upgrades

Self-re-exec with inherited file descriptors. On upgrade signal, Elide downloads the new binary via a secure update mechanism, drains in-flight connections (GOAWAY on HTTP/2, WebSocket close frames, 30-second request drain), hands off listener file descriptors via the sidecar, then re-execs with --claim-fds to take over without dropping a single connection.

Middleware pipeline

All middleware from elide serve is available: compression, rate limiting, CORS, basic auth, Tailscale identity auth, header manipulation, path rewriting, request ID injection, access logging, and body size limits.

---

CLI reference

elide orb [OPTIONS]
FlagDefaultDescription
-c, —confignonePKL configuration file (required). Must amend elide:serve/ElideServer.pkl.
—tailscalefalseBind to the node's Tailscale IP via the local daemon. Provisions TLS cert and MagicDNS. Unix only.
—funnelfalseExpose to the public internet via Tailscale Funnel. Implies —tailscale.
—tailscale-directfalseStandalone Tailscale node — no daemon. Requires —tailscale-auth-key.
—tailscale-auth-keynonePre-auth key for standalone mode. Also reads TAILSCALE_AUTH_KEY env var.
—tunfalseCreate a TUN device for system-wide tunnel routing. Requires root or CAP_NET_ADMIN.
—auto-httpsnoneEnable automatic HTTPS via ACME (Let's Encrypt).
—domainnoneDomain(s) for ACME certificates. Comma-separated.
—acme-emailnoneACME contact email for expiry warnings.
—acme-stagingfalseUse Let's Encrypt staging CA. Certificates will not be browser-trusted.
—dns-challengenoneDNS-01 challenge provider: cloudflare or webhook. Required for wildcards.
—derpfalseCo-host a DERP relay alongside the HTTP server.
—derp-port3340DERP relay port. Binds 0.0.0.0.
—admin-portnoneAdmin API TCP port.
—admin-host127.0.0.1Admin API bind address.
—admin-socketnoneAdmin API Unix socket. Takes precedence over —admin-port.
—admin-tokennoneAdmin API bearer token. Auto-generated when binding non-loopback without explicit token.
—no-tuifalseDisable interactive TUI. Recommended for containers and log aggregation.
—jsonfalseStructured JSON output.
---
CommandPurposeLicense
elide orbFull network orchestrator (this page)Pro
elide fwdForward proxy with MITM, access control, L4 relayPro
elide tunWireGuard tunnel, Tailscale connectivity, DERP relayPro

See also