DEV Community

ChenXX for MoonProxyHQ

Posted on

How to Put a Local Service on the Public Internet with FRP (Without Losing Your Mind Over Config Files)

The problem every self-hoster hits

You built something. A local API. A Minecraft world for your friends. A self-hosted dashboard. An ERP running on the office machine. It works great — on your LAN.

The moment you want someone outside to reach it, the fun begins:

Port forwarding? Good luck if you're behind CGNAT, a corporate firewall, or an ISP that doesn't give you a public IP.
VPN? Now every person who wants access has to install a client, join a network, and stay connected. Overkill for "let me show you this one page."
Cloud deploy? Now you're maintaining two environments, paying for a VPS you didn't need, and shipping data somewhere it doesn't have to live.

What most people actually want is simpler: take this one local port, give it a public address, done.

That's exactly what FRP does.

What FRP is

FRP (Fast Reverse Proxy) is an open-source tool by fatedier that exposes a local service behind a NAT or firewall to the public internet. It's battle-tested, written in Go, and has been the go-to answer in self-hosting communities for years.

The model is clean — two pieces:

frps (the server) — runs on a machine with a public IP (a $5 VPS is plenty).
frpc (the client) — runs on your local machine, the one with the service you want to expose.

The client opens an outbound tunnel to the server. The server listens on a public port and forwards traffic back through the tunnel. NAT and firewalls don't matter because the connection is initiated from inside.

[Visitor] → [frps on public VPS:7000] ⇄ tunnel ⇄ [frpc on your laptop] → [localhost:8080]
Enter fullscreen mode Exit fullscreen mode

That's the whole idea. It works for TCP, UDP, HTTP, HTTPS. People run Minecraft servers, remote desktops, internal dashboards, and dev previews through it every day.

The catch: config files

FRP works great. The friction isn't the protocol — it's the workflow.

To run frpc, you write a TOML config file:

serverAddr = "203.0.113.10"
serverPort = 7000
auth.token = "your-secret-key"

[[proxies]]
name = "my-web"
type = "tcp"
localIP = "127.0.0.1"
localPort = 8080
remotePort = 8080
Enter fullscreen mode Exit fullscreen mode

Then you launch it from a terminal. Change a port? Edit the file, restart the process. Add a second tunnel? Edit again, restart again. Want to know if it's actually working? Check the terminal output — or don't, because you closed that tab two hours ago.

This is fine if you live in the terminal. It's a wall for everyone else — a small-business owner running an ERP, a parent hosting Minecraft for their kid, a designer sharing a local mockup.

MoonProxy: a GUI for FRP

MoonProxy is an MIT-licensed desktop client for FRP. It wraps frpc in a GUI so you don't have to touch config files or terminals.

What it adds over plain frpc:

  • Form-based tunnel config — no toml/ini files. Add a tunnel like filling out a form.
  • One-click start/stop — a toggle button with real connection state, derived from frpc output (not an optimistic flag).
  • Endpoint health polling every 3s — catches a dead local service before your users do.
  • System tray resident — close the window, the tunnel keeps running. Launch at login, silent start.
  • Scheduled tunnels — set weekday + time window. Hot-reloaded, no restart.
  • Engine self-update — pulls new frpc from upstream FRP releases, SHA256-verifies, atomically swaps.

Built with Tauri v2 + Vue 3 + Rust + TypeScript. The frpc binary is bundled via Tauri sidecar — no separate FRP install. macOS (Apple Silicon + Intel) and Windows x64.

You bring your own frps (self-hosted VPS or a community node you trust). MoonProxy only manages the client side — it doesn't relay your traffic through any third-party infrastructure. Auth key stays with you.

It's independent of fatedier/frp — that project deserves all the credit for the protocol. This is just a GUI layer.

Getting started

  1. Download from moonproxy.app or GitHub Releases (DMG for macOS, EXE for Windows).
  2. On macOS first launch, right-click → Open, or run xattr -cr "/Applications/MoonProxy Desktop.app".
  3. Set up your frps on a VPS (plenty of community tutorials exist).
  4. Open MoonProxy, add a tunnel, click start.

That's it. Your local service now has a public address.

Project links

It's not trying to replace the CLI — if you're happy scripting frp, keep doing that. This is for folks who want a tray icon and a toggle instead of a terminal window.

Happy to answer questions in the comments!

Top comments (0)