
You set up port forwarding on your router. Nobody can connect. You call your ISP and they tell you that you are behind CGNAT. This means your router does not have a real public IP address. Multiple households share one public IP. Port forwarding is impossible.
FRP (Fast Reverse Proxy) solves this by creating a tunnel from your local machine to a cheap VPS that has a public IP. Players connect to the VPS, and FRP forwards the traffic to your local server.
What You Need
- Your local Minecraft server (running on your PC or a local machine)
- A cheap VPS with a public IP address (a 1 euro/month VPS with 512 MB RAM is enough, it just forwards traffic)
- FRP downloaded on both machines
How It Works
Player --> VPS (public IP, port 25565) --> FRP tunnel --> Your PC (local Minecraft server)
The VPS acts as a relay. It accepts incoming connections and forwards them through the FRP tunnel to your local server. Your local machine connects outbound to the VPS (which works even behind CGNAT, because outbound connections are not blocked).
Step 1: Set Up the VPS (Server Side)
SSH into your VPS:
ssh root@your-vps-ip
Download FRP:
wget https://github.com/fatedier/frp/releases/download/v0.61.1/frp_0.61.1_linux_amd64.tar.gz
tar -xzf frp_0.61.1_linux_amd64.tar.gz
cd frp_0.61.1_linux_amd64
Edit the server config frps.toml:
bindPort = 7000
auth.method = "token"
auth.token = "your_secure_password_here"
Port 7000 is the FRP control port. Use a strong token as your authentication password.
Start the FRP server:
./frps -c frps.toml
To run it permanently:
nohup ./frps -c frps.toml &
Or create a systemd service for proper management.
Step 2: Open Ports on the VPS
The VPS firewall needs two ports open:
- Port 7000 TCP: FRP control channel
- Port 25565 TCP: Minecraft Java (forwarded to your local server)
- Port 19132 UDP: Minecraft Bedrock (if using Geyser)
On Ubuntu/Debian:
sudo ufw allow 7000/tcp
sudo ufw allow 25565/tcp
sudo ufw allow 19132/udp
Step 3: Set Up Your Local Machine (Client Side)
Download FRP on your local machine (Windows, Mac, or Linux):
For Windows: download the windows_amd64 release from the FRP GitHub releases page.
Edit frpc.toml:
serverAddr = "your-vps-ip"
serverPort = 7000
auth.method = "token"
auth.token = "your_secure_password_here"
[[proxies]]
name = "minecraft-tcp"
type = "tcp"
localIP = "127.0.0.1"
localPort = 25565
remotePort = 25565
[[proxies]]
name = "minecraft-udp"
type = "udp"
localIP = "127.0.0.1"
localPort = 19132
remotePort = 19132
Start the FRP client:
Linux/Mac:
./frpc -c frpc.toml
Windows:
frpc.exe -c frpc.toml
You should see:
[frpc] proxy [minecraft-tcp] start proxy success
[frpc] proxy [minecraft-udp] start proxy success
Step 4: Connect
Players connect using your VPS IP address:
your-vps-ip:25565
Traffic flows: Player connects to VPS port 25565, FRP forwards it through the tunnel to your local machine port 25565 where Minecraft is running.
Performance Considerations
FRP adds latency because traffic makes an extra hop through the VPS. The added ping depends on the distance between your home and the VPS.
| VPS Location | Added Latency | |---|---| | Same country as you | 5-15 ms | | Same continent | 15-40 ms | | Different continent | 80-150 ms |
Pick a VPS geographically close to you to minimize added latency. If you are in the Netherlands, use a Dutch or German VPS.
When FRP Is Not Worth It
FRP adds complexity, a point of failure (the VPS), and latency. If your server grows beyond a few friends, consider switching to a proper hosted server where the Minecraft instance runs directly on hardware with a public IP.
A hosted server eliminates:
- CGNAT problems
- FRP setup and maintenance
- VPS costs
- Added latency from tunneling
Space-Node servers run in the Netherlands with public IPs, no tunneling required. If you have outgrown the FRP setup, check our plans here.
