Because Explita Tunnel is fully open source, you can host your own dedicated edge gateway cluster on any Linux VPS, Docker server, or Kubernetes environment.
Self-hosting gives your team:
Complete Data Sovereignty: All traffic passes exclusively through your own infrastructure.
Custom Branded Domains: Use *.tunnel.yourcompany.com instead of third-party domains.
No Shared Resource Contention: Full control over network throughput, concurrency limits, and rate limits.
Internal Network Bridging: Securely bridge local developer environments directly into private VPCs.
[!IMPORTANT]
The docker-compose.yml file must be located in the same directory where you cloned the repository (/opt/explita/tunnel). This ensures volumes: - .:/app properly mounts the compiled project files, dist/, and dependencies into the container.
[!NOTE]
We bind the gateway port to 127.0.0.1:39755 so that public ingress traffic is strictly routed through an edge reverse proxy (such as Caddy or Nginx) that handles TLS termination and wildcard certificates.
Explita Tunnel requires wildcard HTTPS (*.tunnel.yourdomain.com) so any dynamic subdomain requested by developers receives an automatic valid TLS certificate.
Caddy is the ideal edge proxy because it automates Let's Encrypt wildcard certificates via DNS-01 challenges (e.g. Cloudflare DNS plugin) without manual cron renew scripts.
# Replace with your Cloudflare API token or your DNS provider credentials*.tunnel.yourdomain.com, tunnel.yourdomain.com { tls { dns cloudflare {env.CLOUDFLARE_API_TOKEN} } # Proxy all HTTP, SSE, and WebSocket traffic to the local tunnel gateway reverse_proxy 127.0.0.1:39755 { # Preserve original client IP and host details header_up Host {host} header_up X-Real-IP {remote_host} header_up X-Forwarded-For {remote_host} header_up X-Forwarded-Proto {scheme} # Enable immediate streaming for Server-Sent Events (SSE) flush_interval -1 }}
[!IMPORTANT]
Because WebSocket connections upgrade via HTTP 101 Switching Protocols, Caddy automatically handles full-duplex WebSocket proxying without additional directive blocks.
By default, the gateway operates in open mode (anyone who can reach your gateway address can open a tunnel). You can secure your gateway using either lightweight pre-shared tokens or the full database plugin:
If you are running the gateway for personal use, a small team, or CI/CD pipelines and do not want to run a database, define one or more pre-shared static tokens in your gateway .env or Docker environment:
# Comma-separated list of valid access tokensAUTH_TOKENS="sec_token_alice,sec_token_bob,sec_token_ci"
When AUTH_TOKENS is defined:
The gateway automatically locks down and enforces authentication on all connections.
Any connection without a matching token is rejected immediately with WebSocket code 1008 ("Invalid token").
If you need passwordless 6-digit email OTP login, automated machine token issuance, and persistent developer accounts in PostgreSQL, attach the official plugin:
To configure your self-hosted gateway as the permanent default on a developer machine, set it globally in ~/.explita/config.json:
# Set your custom gateway globally using the eta binaryeta config set server wss://tunnel.yourdomain.com/_connect# Or using the unified explita binaryexplita config set tunnel.server wss://tunnel.yourdomain.com/_connect