DocsMinecraft Server Ports and Port Forwarding Explained
Ask on Discord
Minecraft Server Ports and Port Forwarding Explained illustrated for the CraftLands Minecraft docs
MINECRAFT · SETTING
lborg
Docs Writer
Published August 6, 2026
UPDATED TODAY

Minecraft Server Ports and Port Forwarding Explained

Ports trip up a lot of people setting up their first server. This guide covers which ports Minecraft actually uses, how to forward them on your router, and why forwarding just won't work for some connections no matter what you try.

QUICK ANSWER

Java servers use port 25565 TCP, Bedrock uses 19132 UDP. Forward the right one on your router to your PC's local IP, then share your public IP or hostname with friends. If it won't work at all, you're probably behind CGNAT, and a hosted server sidesteps the whole issue.

Fact
Port 25565 isn't a random pick, it was chosen back in early Minecraft versions and just stuck as the default ever since, so almost every guide and tool assumes you're using it unless told otherwise.
Fact
Forwarding a port doesn't open your whole network up, it only opens that one specific port to that one specific device, everything else on your home network stays closed off.
Fact
A lot of routers reset custom port forwarding rules after a firmware update, which is why a server that worked fine for months can suddenly stop being reachable out of nowhere.

Default Ports: 25565 TCP Java, 19132 UDP Bedrock

Minecraft Java Edition runs on port 25565 by default, and it uses TCP. Bedrock Edition is different, it uses port 19132, and it runs over UDP instead. Mixing these up is probably the most common mistake people make, so keep in mind which version you're running before you touch your router settings.

Changing the Port in server.properties

Don't want to use the default port? You can change it. Open up server.properties and look for the server-port line, then just type in whatever port number you want to use instead. Save the file and restart the server for it to take effect. Just remember, if you change it here, you'll also need to forward that new port on your router, not 25565. Our server.properties guide covers the rest of the settings in that file too.

port-properties.webp

Forwarding on a Home Router, Step by Step

Every router looks a little different, but the process is mostly the same everywhere. Log into your router's admin page, usually by typing something like 192.168.1.1 into your browser. Find the section called port forwarding, sometimes it's under NAT or virtual server instead. Add a new rule pointing your Minecraft port, 25565 for Java or 19132 for Bedrock, to your computer's local IP address. Save it, and you're basically done. It sometimes takes a restart of the router for the rule to actually kick in.

Local IP vs Public IP vs Hostname

These three get mixed up a lot, so here's the quick version. Your local IP is the address your computer has inside your home network, usually starts with 192.168. Your public IP is the address your whole house shows to the internet, and that's what friends outside your home actually need to connect. A hostname is just a friendlier name that points to your public IP, so you don't have to remember a string of numbers, and it can update automatically if your IP changes.

CGNAT: Why Forwarding Fails for Some Connections Entirely

Sometimes port forwarding just won't work, no matter how carefully you follow the steps. That's usually CGNAT, short for carrier grade NAT. Basically, your ISP is sharing one public IP across a bunch of different homes, so you don't actually have your own public IP to forward a port to in the first place. Call your ISP and ask if you're behind CGNAT, some will give you a real public IP if you ask, others won't budge at all.

Dynamic IP and Why the Address Stops Working

Most home internet connections don't have a fixed public IP. It changes now and then, sometimes when your router restarts, sometimes just randomly from your ISP's side. That's annoying because it means the IP address you gave your friends can just stop working out of nowhere. A dynamic DNS service can fix this, it gives you a hostname that keeps pointing to your current IP even after it changes.

Security Considerations When Opening a Home Port

Opening a port on your router does expose your computer a bit more to the outside internet, so it's worth taking a few basic precautions. Keep your server software updated, use a whitelist so random strangers can't just wander in, and don't forward any other ports you don't actually need open. It's not something to stress over too much, just don't leave things wide open longer than necessary.

When a Hosted Server Removes the Problem

If all this port forwarding stuff sounds like a hassle, or you're stuck behind CGNAT with no way around it, a hosted server just skips the problem entirely. No router settings, no dynamic IP worries, players connect straight to an address that always works. Check out our hosting plans and pricing if running your own hardware isn't worth the headache. And once your server's up, our guide on joining a Minecraft server walks friends through the rest.

Do I need to forward a port if I'm only playing with people in my own house?

Nope. Port forwarding is only needed for players connecting from outside your home network. Everyone on the same wifi can join using your local IP.

Can I forward the same port for both Java and Bedrock?

No, they use different ports entirely, 25565 for Java and 19132 for Bedrock, so you'd need to forward both separately if you want both types of players joining.

Will port forwarding slow down my internet?

Not on its own, no. Forwarding a port just opens a doorway for traffic, it doesn't use any extra bandwidth by itself. Your connection only slows down if the server itself is using up a lot of your upload speed.

Start Your Minecraft Server Today

Pick a plan and your Minecraft server is online in about 30 seconds, with Paper plugins and Forge modpacks one click away in the panel. Full file access and SFTP are there when you go deeper, and automatic backups turn a broken config into a restore, not a rebuild.
VIEW MINECRAFT PLANS
Logo
Game server hosting made simple for everyone.
CraftLands Hosting S.R.L.Calea Moșilor 88, Sc. F, Ap. F1, Sector 3, 030152, București, RomaniaCUI 50929471 · VAT RO51171749Reg. Com. J2024043623000+40 755 361 220business@craftlands.host
© 2024 - 2026 CraftLands Host. All rights reserved.
Soluționarea Alternativă a Litigiilor (ANPC SAL): Romanian alternative consumer dispute resolution, opens in a new tab, page in Romanian