Port Forwarding vs a VPS: How to Make a Minecraft Server Public
To let friends join, you either port-forward your home router or run a VPS. Here's an honest comparison of both, with the tradeoffs.

To let friends outside your house join your Minecraft server, the traffic has to reach it. There are two routes: forward a port on your home router, or run the server on a VPS. This is an honest comparison so you can pick the right one.
Option 1: port forwarding at home
Port forwarding tells your router to send incoming connections on port 25565 to the PC running the server. On your router's admin page you'd create a rule:
- External port: 25565 (TCP)
- Internal IP: your PC's local address (e.g. 192.168.1.20)
- Internal port: 25565
Then open the port in your PC's firewall. On Linux:
sudo ufw allow 25565/tcp
It's free — but there are real downsides.
The problems with port forwarding
- Your PC must stay on. Turn it off and the server's gone. No 24/7 uptime.
- You expose your home IP. Anyone who joins sees your real address, which raises a DDoS and privacy risk.
- CGNAT breaks it entirely. Many ISPs put you behind Carrier-Grade NAT, so you don't have a public IP to forward at all. No amount of router config fixes this.
- Home upload is slow. Residential upload speeds are low, which hurts with several players.
- It ties up your PC and network while you play.

Option 2: a VPS
A VPS is a small always-on Linux server with its own public IP. You run the Minecraft server there instead of at home:
sudo apt update && sudo apt install -y openjdk-21-jdk
# set up the server (see the vanilla guide), then:
sudo ufw allow 25565/tcp
The upsides address every downside above: it's online 24/7 independent of your PC, has a real public IP (no CGNAT), sits on a datacentre connection with fast, stable bandwidth, and keeps your home IP private. You also get a stable address you can put a custom domain on.
The honest tradeoffs
Port forwarding is free and fine for a quick session with a couple of friends when your ISP allows it. A VPS costs a little but is the right call for anything you want online reliably — a persistent SMP with friends or a public server. For sizing, see how much RAM you'll need, and once it's running, set up backups.
Quick decision guide
- Just testing with one friend, no CGNAT: port forwarding is fine.
- Behind CGNAT: you effectively need a VPS (or a tunnel service).
- Want 24/7 uptime, privacy, and stable performance: VPS.
Tunnel services: the middle option
There's a third route worth mentioning honestly: tunnel services like playit.gg or ngrok. They give your home server a public address without touching your router, which neatly sidesteps CGNAT. The trade-offs: you rely on a third party, latency can be higher (traffic routes through their servers), and free tiers may have limits. They're a fine quick fix for a casual session, but for a persistent server they don't match a VPS on uptime, control, or performance — and your PC still has to stay on.
Securing a public VPS
Running a public server means running a public Linux box, so spend a few minutes hardening it. The essentials:
# a firewall that allows only what you need
sudo ufw default deny incoming
sudo ufw allow OpenSSH
sudo ufw allow 25565/tcp
sudo ufw enable
Beyond that: use SSH keys instead of passwords, keep the system updated (sudo apt update && sudo apt upgrade), and run the Minecraft server as a non-root user. Our guide on securing your first Linux VPS walks through the full checklist. A whitelist keeps unwanted players out of the game itself, and regular backups protect the world.
Which should you choose?
For a quick play session with a friend and no CGNAT, port forwarding is free and fine. Behind CGNAT, or for anything you want online reliably — a persistent SMP, a public server, a stable custom address — a VPS is the right tool. It's always on, has a real public IP, sits on fast datacentre bandwidth, and keeps your home network private.
What about performance and ping?
People sometimes assume home hosting means lower ping for local friends, and for a purely local group that can be true. But the moment anyone joins from further away, a VPS usually wins: datacentres sit on fast, well-peered networks, so ping is often *more consistent* across a spread-out group than a residential connection whose upload is shared with everyone else in the house. Home upload speed is the real bottleneck — a handful of players each receiving world updates can saturate a typical residential uplink, causing rubber-banding for everyone regardless of the server's CPU. A VPS on a datacentre link doesn't have that ceiling. If your group is geographically spread, you can also choose a server location central to everyone, as ping is about distance and routing, not raw power. For sizing the box itself, our RAM guide has the numbers, and once it's live, set up backups.
FAQ
Is port forwarding safe for a Minecraft server?
It works but exposes your home IP and requires opening a port to your network. A VPS isolates the server from your home network and hides your IP.
Why can't I port forward my Minecraft server?
The most common reason is CGNAT — your ISP doesn't give you a public IP. You can't forward a port you don't have. A VPS sidesteps this.
Do I need a VPS for a Minecraft server?
Not strictly, but for 24/7 uptime, better performance, and privacy it's the practical choice, especially if your PC can't stay on.
Does a VPS give better Minecraft performance than my PC?
For hosting, usually yes — datacentre bandwidth is faster and more stable than home upload, and the server isn't competing with your game or browser.
If you want a server that's always up without exposing your home network, that's exactly what a VPS is for. Nxeon's Minecraft server hosting gives you a public IP, fast bandwidth, and full root access.