Self-hosted ngrok alternative. Expose your local services to the internet with custom domains, automatic HTTPS, and complete control over your infrastructure.
curl -fsSL https://raw.githubusercontent.com/abdullahob/ogrok/main/install.sh | bashogrok - secure tunnels to localhost Status: connected Forwarding: https://abc123.ogrok.dev → http://localhost:3000 Connections: 0
Built for developers who want reliable tunnels without the vendor lock-in.
Use your own domain names with automatic SSL certificate provisioning via Let's Encrypt.
Get random or custom subdomains on your base domain. Route traffic by hostname.
Let's Encrypt integration handles certificate issuance and renewal automatically.
Secure access control with configurable tokens. Limit tunnels per token.
Built-in request rate limiting at 100 req/s per tunnel with burst handling.
Monitor active tunnels and connections through the admin API endpoint.
Deploy with Docker and Docker Compose. Production-ready container images.
Real-time tunnel management with heartbeat monitoring and stale cleanup.
Run on your own infrastructure. No third-party dependencies. Full data sovereignty.
Install the client, point it at your server, and start tunneling.
Install script
Build from source
Configure and run the server
If you've used ngrok before, you already know how to use ogrok.
Expose a local port
Custom subdomain
Custom domain
Multiple services
Set your token once and forget about it. Works with environment variables, config files, or CLI flags.
Dual-plane architecture: WebSocket for control, HTTP for data.
Internet ogrok Server ogrok Client Local
Users Service
┌────────┐ ┌───────────────┐ ┌──────────────┐ ┌──────────┐
│ │ HTTP │ │ WS │ │ │ │
│ Client ├───────►│ Reverse │◄───►│ Tunnel │───►│ :3000 │
│ │◄───────┤ Proxy │ │ Client │◄───┤ │
│ │ │ │ │ │ │ │
└────────┘ └───────┬───────┘ └──────────────┘ └──────────┘
│
┌──────┴───────┐
│ Admin API │
│ :8080 │
│ /health │
│ /stats │
└──────────────┘WebSocket connection handles tunnel registration, heartbeat monitoring, and request/response forwarding between server and client.
HTTP reverse proxy routes incoming requests by hostname, applies rate limiting, and streams responses back to the original requester.
Production-ready security defaults. No configuration required for the basics.
Automatic HTTPS with Let's Encrypt. Secure WebSocket connections for the control plane.
Token-based authentication for tunnel registration. Configurable per-token limits.
100 req/s per tunnel with burst capacity. Prevents abuse without configuration.
Stale tunnel detection with 2-minute timeout. Graceful shutdown on server stop.
SystemD, Docker, or bare metal. Your infrastructure, your rules.
ogrok is free and open source. Run it on your own server and own your tunnel infrastructure.