Skip to main content

Configuration via file

You can run cruma-tunnel-ui from a config file instead of passing flags. The CLI accepts YAML, JSON, or TOML and will validate the structure before starting the tunnel.

Minimum fields to set:

  • tunnel_id (optional; defaults to ANON)
  • tunnel_secret (from your beta invite)
  • targets (list of entries with kind, destination, and optional hostnames)
    • kind: http, https, tcp, or raw
    • destination: backend address/port (e.g., 127.0.0.1:3000 or example.com:443)
    • hostnames: shortnames or full domains that should map to this target

Example YAML:

tunnel_id: "demo-tunnel"
tunnel_secret: "beta-secret-123"

targets:
- destination: "example.com:443"
kind: https
hostnames:
- "api"
- "api.dev.yourdomain.com"
- destination: "127.0.0.1:3000"
kind: http
hostnames:
- "react-dev"
- "react.dev.yourdomain.com"

Run it with:

cruma-tunnel-ui config ./cruma.yaml