Back to Eliza

tunnel-proxy

packages/cloud-services/tunnel-proxy/README.md

2.0.11.2 KB
Original Source

tunnel-proxy

Railway service for public Eliza Cloud tunnel URLs.

The service joins the Headscale tailnet with tsnet as tag:eliza-proxy. Railway terminates public TLS for *.tunnel.elizacloud.ai, then this proxy maps the public host to the matching Headscale MagicDNS host:

text
eliza-<org>-<random>.tunnel.elizacloud.ai -> https://eliza-<org>-<random>.tunnel.eliza.local

Only Cloud-minted hostnames matching eliza-<orgpart>-<randomhex>-<expiry>-<signature> are proxied when TUNNEL_HOSTNAME_SIGNING_SECRET is set. Root traffic and arbitrary wildcard labels return 404, while /health and /ready remain public for Railway and DNS smoke checks.

Required Railway environment variables:

VariableValue
HEADSCALE_PUBLIC_URLhttps://headscale.elizacloud.ai
TUNNEL_PROXY_TS_AUTHKEYreusable Headscale preauth key tagged tag:eliza-proxy
TUNNEL_PROXY_HOSTtunnel.elizacloud.ai
TUNNEL_TAILNET_DOMAINtunnel.eliza.local
TUNNEL_HOSTNAME_SIGNING_SECRETshared HMAC secret also set as a Cloud Worker secret

Mount a Railway volume at /var/lib/tunnel-proxy so the tsnet node identity persists across restarts.