Veyra is a single-binary local reverse proxy control plane based on embedded Caddy. It manages domain mapping, reverse proxy rules, and dynamic config reloading for local development and self-hosted environments.
Veyra operates as a control plane that orchestrates Caddy as the data plane, exposing a clean command-line interface and configuration registry.
When exposing local web applications to the public internet using tunnels, absolute URLs, session cookies, and redirects can break due to domain and port mismatches.
Veyra acts as an ingress control plane to translate and bridge public and private domains cleanly. For example:
Internet -> public.example.com -> Tunnel -> Veyra -> local.example.test -> Local Application
Important
Tunnel Configuration: You must configure your tunnel service client (e.g., Pangolin, ngrok, or Cloudflare Tunnel) to forward incoming public traffic to Veyra's local port (default: HTTP 8080 or HTTPS 8443) rather than routing it directly to the local application's port. Veyra will then receive the requests and proxy them to the correct local target (local.example.test).
- Request Translation: Incoming requests for a public domain (
public.example.com) are dynamically translated into the internal target host (local.example.test). - Response URL Rewriting: Rewrites absolute URL references in response bodies (HTML, JS, CSS, JSON) from the backend host back to the client's public domain.
- Header & Cookie Mapping: Adjusts
Locationheaders for redirects, domain mappings inSet-Cookieheaders, and forwards standard proxy headers (X-Forwarded-Host,X-Forwarded-Port,X-Forwarded-Proto).
- Embedded Caddy: Bundled Caddy runtime within a single Go binary.
- BoltDB Registry: Persistent storage for all rules and proxy settings.
- Zero Downtime Hot Reload: Dynamic configuration updates via Caddy's Admin API.
- Wildcard Capture & Flatten: Flexible subdomain routing and capture backreferences.
- Minimalist CLI: Easy-to-use commands for rule and port management.
Starts the proxy control plane daemon (default HTTP: 8080, HTTPS: 8443, Admin: 2019).
veyra startMaps a public hostname to an internal target.
veyra add public.example.com https://local.example.testveyra remove public.example.comLists all registered routing rules.
veyra listveyra get public.example.comValidates rules format, detects conflicts, and checks adapted Caddyfile syntax.
veyra validateveyra reloadExports active Caddyfile, rules JSON, or full registry backup.
veyra export caddy
veyra export json rules.json
veyra export backup backup.jsonveyra import json rules.json
veyra import backup backup.jsonYou can pull the official multi-architecture Docker image from GitHub Container Registry (GHCR):
docker pull ghcr.io/korfra/veyra:latest
docker run -d -p 8080:8080 -p 8443:8443 -p 2019:2019 -v veyra_data:/data ghcr.io/korfra/veyra:latestConfigure a compose.yml to run Veyra:
services:
veyra:
image: ghcr.io/korfra/veyra:latest
ports:
- "8080:8080"
- "8443:8443"
- "2019:2019"
volumes:
- veyra-data:/data
restart: unless-stopped
volumes:
veyra-data:Launch Veyra with Docker Compose:
docker compose up -dThis project is licensed under MIT License.