pgrok: A Multi-Tenant HTTP/TCP Reverse Tunnel Solution via SSH
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
pgrok is a "poor man's ngrok" designed for small teams, offering a multi-tenant HTTP/TCP reverse tunnel solution through SSH remote port forwarding. It provides stable subdomains for every user, gated by your SSO through the OIDC protocol, making it a cost-effective alternative for exposing local development environments to the public internet.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
pgrok is an open-source, multi-tenant HTTP/TCP reverse tunnel solution that leverages SSH remote port forwarding. Billed as a "poor man's ngrok," it's specifically designed for small teams that need to expose their local development environments to the public internet. It stands out by offering stable subdomains for individual users, secured by your own Single Sign-On (SSO) provider via the OIDC protocol.
This project aims to provide a simpler, more controlled alternative to commercial services for internal team use, allowing developers, community managers, sales, and PMs to easily share their local work without deep server operations knowledge. It requires you to bring your own domain name and SSO provider, offering a tailored and cost-efficient solution.
Installation
Setting up pgrok involves configuring both a server component (pgrokd) and a client (pgrok).
Prerequisites:
- A domain name (e.g.,
example.com) - A server (VPS, dedicated) with a public IP address
- An SSO provider that supports OIDC (e.g., Google, Okta, GitLab)
- A PostgreSQL server
Server Setup (pgrokd):
- DNS Records: Add
Arecords for your domain and a wildcard subdomain (e.g.,example.comand*.example.com) pointing to your server's public IP. - Server Deployment: Set up
pgrokdusing a single binary, Docker, or Docker Compose. - Network Security: Allow inbound requests to port
2222(and10000-15000for TCP tunnels) on your server. - Reverse Proxy: Install and configure Caddy 2 to proxy requests to
pgrokd. - OIDC Client: Create an OIDC client in your SSO provider with the Redirect URI set to
http://example.com/-/oidc/callback.
Client Setup (pgrok):
- Obtain Token: Visit your
pgrokdinstance (e.g.,http://example.com), authenticate with SSO, and obtain your unique token and URL. - Download Client:
- For Homebrew:
brew install pgrok - For others, download from the Releases page.
- For Homebrew:
- Initialize Config: Run
pgrok init --remote-addr example.com:2222 --forward-addr http://localhost:3000 --token {YOUR_TOKEN}. - Launch Client: Execute
pgrokorpgrok httpto start the tunnel.
For detailed instructions and HTTPS setup, refer to the official pgrok documentation.
Examples
HTTP Tunneling:
pgrok http 8080
Raw TCP Tunnels:
pgrok tcp 5432
HTTP Dynamic Forwards:
Configure dynamic_forwards in your pgrok.yml to route specific paths to different local addresses:
dynamic_forwards: |
/api http://localhost:8080
/hook http://localhost:8080
This will forward requests to /api and /hook to http://localhost:8080, while other requests go to your forward_addr.
Vanilla SSH Client:
Since pgrok uses the standard SSH protocol, you can also use a vanilla SSH client:
- Obtain your token and URL from the
pgrokdweb interface. - Run
ssh -N -R 0::3000 example.com -p 2222and enter your token as the password.
Why Use pgrok?
pgrok addresses the common pain points of high costs associated with stable subdomains and SSO integration in other tunneling solutions. It's built for teams who value simplicity and efficiency, especially when exposing local services for testing, demos, or collaboration.
- Cost-Effective: Avoids the high enterprise tier costs of commercial alternatives by allowing you to use your existing infrastructure and SSO provider.
- Simplified UX: Offers a "Copy, paste, and run" experience, making it accessible even for team members without extensive server operations knowledge.
- Stable Subdomains & SSO: Provides consistent URLs for users, secured by your organization's SSO, which is crucial for internal team workflows.
- Flexibility: Supports both HTTP and raw TCP tunneling, with advanced features like dynamic HTTP forwards.
Links
- GitHub Repository: https://github.com/pgrok/pgrok
- Releases: https://github.com/pgrok/pgrok/releases
- Contributing Guide: https://github.com/pgrok/pgrok/blob/main/.github/contributing.md
Related repositories
Similar repositories that may be relevant next.

WebhookX: The Next-Generation Webhooks Gateway for Event Delivery
June 9, 2026
WebhookX is an open-source, cloud-native webhook gateway designed for robust and scalable event processing. It efficiently handles receiving, validating, transforming, and delivering events, ensuring reliable communication across distributed systems. This project provides a comprehensive solution for managing webhooks with advanced features like automatic retries, fan-out capabilities, and extensive plugin support.

Task: A Modern, Cross-Platform Build Tool for Streamlined Workflows
May 18, 2026
Task is an open-source, cross-platform build tool inspired by Make, designed to simplify and automate modern development workflows. It allows developers to define and run tasks using a simple YAML configuration, offering a powerful and intuitive alternative to traditional build systems. Written in Go, Task ensures fast execution and broad compatibility across various operating systems.

Micro: A Modern and Intuitive Terminal-Based Text Editor
May 7, 2026
Micro is a modern, intuitive, and feature-rich terminal-based text editor designed for ease of use and modern terminal capabilities. It comes as a single, static binary with no dependencies, making it incredibly easy to install and use right away. Aiming to be a successor to editors like Nano, Micro is ideal for anyone who prefers working in the terminal or editing files over SSH.
wush: Fast, Secure File Transfer and Shells over WireGuard
April 26, 2026
wush is a command-line tool designed for rapid and secure file transfers and shell access between computers. It leverages WireGuard for peer-to-peer connections, eliminating the need for trusted relay servers. This tool offers a robust and versatile solution for network communication.
Source repository
Open the original repository on GitHub.