Skip to main content
← All Guides
Server / Networking

Make Your Minecraft Server Public

A fresh server only answers from your own machine. To let friends join from anywhere you bind it to every interface, forward port 25565 through your router, and hand out a public IP, or a clean domain like play.yourserver.net.

server console, play.yourserver.net
~/mc-server $ nano server.properties
server-ip=0.0.0.0 # bind all interfaces
server-port=25565 # forward this in your router
[Server] Done (4.812s)! Listening on 0.0.0.0:25565
[Net] checking external reachability
[Net] public IP 203.0.113.42:25565, OPEN
[Connect] Alex[/198.51.100.7] logged in
Alex joined the game
~/mc-server $ say welcome to play.yourserver.net
[Server] [Server] welcome to play.yourserver.net
The short version
  1. 1
    Bind to all interfaces
    In server.properties set server-ip=0.0.0.0 (leave it blank for default) so the server listens on every network adapter, not just localhost.
  2. 2
    Open the port
    Keep server-port=25565. Java uses TCP 25565; Bedrock uses UDP 19132. Allow that port through your OS firewall.
  3. 3
    Forward it on your router
    Log into your router and forward the port (TCP 25565) to your PC's local IP, e.g. 192.168.1.x. This lets outside traffic reach the server.
  4. 4
    Find your public IP
    Search 'what is my IP' to get your public address, e.g. 203.0.113.42. Friends connect with publicip:25565 (port can be dropped for 25565).
  5. 5
    Point a domain at it
    Add an A record for play.yourserver.net to your public IP (or a SRV record for a custom port) so players type a clean name instead of digits.

What you need

Public IP address
server.properties
Router port forward
Custom domain

Quick answers

?

Why can friends on my Wi-Fi join but nobody outside can?

LAN works because traffic never leaves your network. Outside players need port 25565 forwarded on your router to your PC's local IP, plus a firewall allow rule.
?

What port do I forward?

Java Edition: TCP 25565. Bedrock: UDP 19132. Forward the matching protocol to your machine's local (192.168.x.x) address.
?

How do friends connect?

Multiplayer, Add Server, enter your public IP. For 25565 just the IP works; for another port use ip:port. With a domain they type play.yourserver.net.
?

My IP keeps changing. What do I do?

Most home connections have a dynamic IP. Use a dynamic-DNS service (No-IP, DuckDNS) or a domain with an updater so the name always resolves to your current IP.
?

Is exposing my home IP safe?

It reveals your address and depends on your router being correctly locked down. A hosted server keeps your home network private and gives you a stable address.
?

Do I even need port forwarding?

Only when hosting from home. A managed host runs the server on a public machine with the port already open, so you just hand out the IP or domain.

More guides on this site

Guides that go with this one

How to Host a LAN World in Minecraft
Open any singleplayer world to LAN so friends on the same network can join. Set game mode, allow cheats,...
How to Port Forward a Minecraft Server
Open port 25565 on your router and point it at your server's local IP so friends can join over the...
How to Make a Minecraft Server (Java, 2025)
Set up your own Minecraft Java server from scratch: install Java, run the Paper jar, accept the EULA,...
How to Set Up a Custom Domain for Your Server
Learn how to connect a custom domain to your Minecraft server so players can join using a memorable...
SRV Records for Minecraft Servers Explained
Learn what SRV records are, how they work with Minecraft Java Edition, and how to set them up so players...
Minecraft Port Forwarding Guide, Every Router Brand
How to port forward for Minecraft on every major router brand. Covers Netgear, TP-Link, ASUS, Linksys,...
Hosting
Managed Hosting
Skip the setup: a managed server online in minutes.
Database
Command Reference
Syntax, arguments and examples for every command.
Database
Item Database
Every item with its stats, IDs, recipes and uses.
Guides
More Server & Admin guides
Run a server: setup, hosting, permissions, worlds and crossplay.