port-buddy is a free, open source networking & connectivity project written in Java and released under Apache-2.0. It has 536 GitHub stars, 46 forks and 2 open issues, and was last pushed 18 hours ago. On this registry it ranks #82 of 83 tracked projects in Networking & Connectivity, with 5 head-to-head comparisons available.

What is port-buddy?

Port Buddy is an Apache-2.0 licensed, Java-based localhost tunneling tool that exposes local HTTP, TCP and UDP services to the public internet through a reverse tunnel created with a single command, and it is aimed at developers and operators who need a public endpoint for a local web app, database, SSH session or game server without configuring router port forwarding.

What it is

Port Buddy is a self-hostable tunneling system built as a multi-modular Java project. The repository is split into a cli module (a GraalVM-native command-line application on Java 25), a server module (Spring Boot 3.5.7 handling the API and tunnel management), a net-proxy module for high-performance TCP and UDP proxying, a Webflux-based gateway, a React dashboard written in TypeScript and TailwindCSS, a eureka service-discovery component, an ssl-service for automated certificate management, and a common module of shared DTOs and utilities. The README describes the project as a lightweight, high-performance ngrok alternative, and the topic list places it in the localhost-tunnel, reverse-proxy and port-forwarding corner of the networking tooling ecosystem.

The concrete problem it solves is the one that normally requires either router port forwarding or a hosted third-party tunnel: getting a service that only listens on localhost reachable from the public internet. Port Buddy replaces the router configuration step entirely, and it also stands in for a hosted tunneling service, because the server, proxy, gateway and certificate components are all published in the same repository and can be run by the operator. The README draws a specific contrast with standard tunneling tools on protocol coverage, describing native, zero-configuration support for HTTP/HTTPS, raw TCP and UDP out of the box rather than HTTP alone, which is what makes it usable for databases, SSH, VoIP and game traffic and not just webhooks.

Key capabilities

  • HTTP and HTTPS tunnels with auto-generated SSL certificates: portbuddy 3000 returns a public URL in the form https://my-web-site.portbuddy.dev.
  • Raw TCP port forwarding for services such as PostgreSQL, MySQL, SSH or custom TCP protocols, via portbuddy tcp 5432, returning an endpoint such as net-proxy-1.portbuddy.dev:43452.
  • Native UDP tunneling through portbuddy udp 19132, intended for game servers, VoIP services and IoT protocol debugging.
  • Custom and static domains through the -d, --domain= option, plus port reservation with -pr, --port-reservation= taking a host:port argument for TCP and UDP, so endpoints stay permanent across restarts.
  • Passcode protection for a tunnel with -pc, --passcode=, alongside verbose logging via -v.
  • WebSocket and Server-Sent Events support for real-time streaming, chat applications and live data connections.
  • A background daemon mode for running Port Buddy as a system service under systemd or Windows Task Scheduler, with the CLI also distributed as the container image amaktech/portbuddy:latest.

Who uses it and how

  • Web and API developers who need to test inbound webhooks or share a local application running on a port such as 3000, using the default HTTP mode.
  • Developers and DBAs who expose a local database or an SSH service for remote debugging with portbuddy tcp, avoiding inbound firewall rules on the local network.
  • Teams debugging UDP workloads such as IoT protocols, VoIP or self-hosted game servers, which the HTTP-only tools in this space do not cover.
  • Operators who run the whole stack on their own infrastructure: docker-compose up -d starts the server, gateway, net-proxy, Eureka and SSL services together with the React dashboard, and the CLI authenticates by mounting a token file at /root/.port-buddy/token.
  • Windows users who prefer a desktop interface can use the community-built PortBuddy GUI, listed in the README's community projects section.

Getting started

The shortest path is to install the Port Buddy CLI and run portbuddy 3000, portbuddy tcp 5432 or portbuddy udp 19132; alternatively pull amaktech/portbuddy:latest and mount the token at /root/.port-buddy/token. Self-hosters build with ./mvnw clean install and start the stack with docker-compose up -d.

How it compares

The README positions Port Buddy as an ngrok alternative rather than a companion tool, and the difference the facts support is one of licence and custody: Port Buddy is Apache-2.0 and ships its own server, gateway, net-proxy and ssl-service modules for self-hosting, so tunnels, tokens and static domain assignments stay on infrastructure the operator controls instead of terminating at a third-party endpoint. The cost model follows from that — the software itself is free under Apache-2.0, and the running cost is whatever infrastructure the operator already provisions for the compose stack.

When to use it — and when not to

Choose Port Buddy when TCP or UDP exposure is a requirement alongside HTTP, or when tunnel traffic must terminate on infrastructure you run; a self-hoster must operate a Java 25 and Spring Boot environment, Docker and Compose, Maven 3.9+, a Node.js toolchain for the web module, and the Eureka-based service discovery that ties the modules together. It is a poor fit for teams wanting a fully managed service with no operational surface, or for anyone who needs documented production hardening — the README covers installation and build steps but not deployment topology, scaling or the security model beyond the --passcode option, and with 537 stars, 46 forks and two open issues the project is small enough that support depends on the community and the code itself.

project readme (upstream, from github) — read inline

🚀 Port Buddy — Secure Localhost Tunneling (HTTP, TCP, UDP)

Official Website

License

Port Buddy is a lightweight, high-performance ngrok alternative designed to instantly expose your local development servers to the public internet. Unlike standard tools, Port Buddy features native, zero-configuration support for HTTP/HTTPS, raw TCP, and UDP protocols right out of the box.

Whether you need to test webhooks, expose a local database, debug an SSH connection, or host a local multiplayer game server, Port Buddy creates a secure reverse tunnel with a single command—no router port forwarding required.


✨ Key Features

  • 🌐 HTTP & HTTPS Tunnels: Easily share local web applications and APIs with auto-generated SSL certificates.
  • 🔌 Raw TCP Port Forwarding: Expose local databases (PostgreSQL, MySQL), SSH, or custom TCP services securely.
  • 🎮 Native UDP Support: Perfect for debugging IoT protocols, VoIP services, and hosting game servers (Minecraft, Rust, etc.).
  • 🔗 Custom & Static Domains: Say goodbye to random URLs. Keep your endpoints permanent even across restarts.
  • ⚡ WebSockets & SSE: Full support for real-time streaming, chat apps, and live data connections.
  • 🖥️ Background Daemon: Run Port Buddy as a system service (systemd or Windows Task Scheduler) for persistent tunneling.

⚡ Quick Start: How to Expose Local Ports

Install the Port Buddy CLI and start tunneling in seconds.

1. Expose Local Web Server (HTTP)

To expose a standard local web app running on port 3000:

portbuddy 3000

Outputs a public URL like: https://my-web-site.portbuddy.dev

2. Expose Local TCP Port (Databases, SSH)

To expose a local TCP service, such as a PostgreSQL database running on port 5432:

portbuddy tcp 5432

Outputs a public endpoint like: net-proxy-1.portbuddy.dev:43452

3. Expose Local UDP Port (Gaming, VoIP)

To share a local UDP game server or service running on port 19132:

portbuddy udp 19132

4. Run with Docker

You can also run the PortBuddy CLI inside a Docker container.

Pull the Image

If you haven't built it locally, you can use the official image (replace with actual image name if applicable):

docker pull amaktech/portbuddy:latest

Note: If you are developing locally, you can build the image using Dockerfile-cli.

Authentication with Docker

To use PortBuddy in Docker, you should mount your token file from your host machine to the container. The CLI expects the token at /root/.port-buddy/token.

🛠️ CLI Usage

Usage: portbuddy [options] [mode] [host:][port]

Modes:
  http (default), tcp, udp

Options:
  -d,  --domain=<domain>        Requested static subdomain (e.g. my-app)
  -pr, --port-reservation=<hp>  Use specific port reservation host:port for TCP/UDP
  -pc, --passcode=<passcode>    Protect tunnel with a passcode
  -v,  --verbose                Enable verbose logging
  -h,  --help                   Show help message
  -V,  --version                Show version info

🏗️ Architecture

PortBuddy is built as a multi-modular system:

  • cli: GraalVM-native command-line application (Java 25).
  • server: Spring Boot 3.5.7 API & Tunnel Management.
  • net-proxy: High-performance TCP/UDP proxy.
  • gateway: Webflux-based API Gateway.
  • web: React-based dashboard (TypeScript + TailwindCSS).
  • eureka: Service discovery.
  • ssl-service: Automated SSL certificate management.
  • common: Shared DTOs and utilities.

🛠️ Development

Prerequisites

  • Java 25
  • Docker & Docker Compose
  • Spring Boot 3
  • Maven 3.9+
  • Node.js & npm (for web module)

Build

To build the entire project:

./mvnw clean install

Run with Docker Compose

docker-compose up -d

📄 License

This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.

🤝 Community Projects

Projects built by the PortBuddy community:

  • PortBuddy GUI by Quack - A graphical user interface for PortBuddy on Windows.

Frequently asked questions

Is port-buddy free to use?

port-buddy is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does port-buddy do?

Expose local ports to the internet in seconds

What is port-buddy written in?

port-buddy is primarily written in Java. Its source is publicly available at https://github.com/amak-tech/port-buddy, and it has 536 GitHub stars.