DGuard

How to find your Minecraft server IP and which address to give players

A Minecraft server has several addresses, and only one of them works for players on the internet — the public one. Here's how to find the internal and public IP on a home PC, on a game host and on a VPS, when the address needs a port, why 127.0.0.1 and 192.168.x.x fail for friends, and what to do if your ISP puts you behind CGNAT.

The DGuard team9 min read

In short: players on the internet need the public IP of the machine running the server, plus the port after a colon if it isn't 25565: 203.0.113.10:25570. On a game host the panel shows the address and port; on a VPS the public IP is in ip addr or the provider's panel. At home the public IP belongs to the router — you'll find it in the router settings or on any "what is my IP" site — and players can only use it once the port is forwarded. 127.0.0.1 and 192.168.x.x only work on your own computer and your own network.

Which address is for whom

AddressWhat it isWho can join with it
localhost, 127.0.0.1The loopback address — "this very computer". Per RFC 1122 such addresses must never appear outside the machineOnly you, from the same computer
192.168.x.x, 10.x.x.x, 172.16.x.x–172.31.x.xPrivate addresses of a home or office network (RFC 1918): unique only inside itDevices on the same network
100.64.x.x–100.127.x.xShared address space for CGNAT (RFC 6598): how an ISP numbers subscribers behind its own NATNobody from outside
Public IPThe address on the internet: your router's at home, the machine's on a VPS or game hostEveryone — if the port is open, and at home also forwarded
DomainA name that points to the public IPEveryone — same as the public IP
Ranges per RFC 1918, RFC 6598 and RFC 1122

The port goes after the address with a colon: 192.168.1.20:25570 or play.example.com:25570. On the default port 25565 you can leave it out. The port is set by server-port in server.properties; opening and forwarding it is covered in server IP and port.

A server on your home computer

  1. 1

    Find the internal IP

    On Windows run ipconfig in Command Prompt and look for the "IPv4 Address" line of your network adapter. On Linux run ip addr; the address follows inet. Players on your network use it, and so does the forwarding rule.

  2. 2

    Find the router's address

    The "Default Gateway" line in ipconfig is the router; its settings page opens at that address, often 192.168.0.1 or 192.168.1.1.

  3. 3

    Find the public IP

    In the router settings (the WAN or Internet section) or on any "what is my IP" site. If the router and the site show different addresses, you're behind ISP NAT — see the section below.

  4. 4

    Forward the port and share the public IP

    A router rule sends connections on port 25565 to the server's internal IP — the steps are in server IP and port. Give friends the public IP.

commands for the internal IP
# Windows — Command Prompt: the "IPv4 Address" and "Default Gateway" lines
ipconfig

# Linux: the address follows inet on the network interface (lo is 127.0.0.1)
ip addr
ip -4 addr        # IPv4 only

A server on a game host

On a game host the panel shows the address on the server's page: an IP or host name and a port. Give it to players in full, port included. If several servers share the host's IP, only the port tells yours apart, and without it a player lands somewhere else or nowhere. If the host assigned the port, don't change server-port yourself: the server would start listening on a port the host never opened.

To stop reading out numbers, connect your own domain — an address without a port needs an SRV record (below).

A server on a VPS

Run ip addr. If the network interface has an address outside the private ranges in the table above, that's your public IP. If there's only a private address, look up the public one in the provider's panel: on AWS EC2, for example, the machine gets a private address from its subnet while the public one is assigned separately — and, per the AWS documentation, changes after the machine is stopped unless you pin it as an Elastic IP.

The server should listen on every address of the machine: leave server-ip empty, as the Minecraft Wiki recommends. The startup log then says Starting Minecraft server on *:25565 — the asterisk means "all addresses". Open the port in the firewall, for example sudo ufw allow 25565/tcp — details in server IP and port.

Why friends can't join on 127.0.0.1 or 192.168…

  • Everyone has their own 127.0.0.1. It means "this computer": your friend's game looks for the server on their own PC.
  • 192.168.x.x exists only on your network. RFC 1918 lets any network use these addresses without coordination, so on your friend's network the same address is another device or nothing at all.
  • The public IP may not work from inside. Not every router can loop a connection back to its own public address. Join yourself with localhost or the internal IP, and test the public address from another network.

CGNAT: when your IP isn't really public

Some ISPs don't give the router a public address and keep subscribers behind their own NAT — carrier-grade NAT, or CGNAT. The signs: the WAN address in the router settings doesn't match the "what is my IP" site, falls in 100.64.0.0–100.127.255.255 or in one of the private ranges. Then a port forward on your router won't help: nothing from outside can reach the router.

  • Ask the ISP for a public IP — often a separate service.
  • Run a tunnel such as playit.gg: it gives the server a public address without port forwarding — more in a server for friends.
  • Move the server to a game host or a VPS — compared in hosting or VPS.

If the public IP is real but changes every few days, the Minecraft Wiki suggests dynamic DNS: the name stays the same while the record follows the new address.

A domain instead of an IP

A domain is easier to remember than digits and survives a move: switching machines means changing one DNS record. An A record points the name at the server's IP; if the port isn't 25565, add an SRV record _minecraft._tcp.<domain> and Java Edition reads the port from it. The SRV record generator builds both records, and the details, checks and Bedrock caveats are in a domain for your server.

How to check the address

Enter the address in the online server status check: it queries the server over the game's own protocol from our server — that is, from outside your network — and shows what the server list shows: online, version, MOTD, plus the IP, port and SRV record if there is one. If the server doesn't answer, work through connection errors.

A public address and the anticheat

Once the address reaches chats and server lists, cheaters arrive along with players. DGuard — the best anticheat for a modern Minecraft server — runs on Paper or Leaf 1.21–26.3 and catches cheats in combat, movement, building, inventory and packets. It needs no inbound ports — only outbound HTTPS to the DGuard site — and the key isn't tied to an IP or domain: when the address changes or the server moves, it travels with the plugins folder. DGuard is free up to 30 players online, with the same protection as the paid plans.

FAQ

How do I find my Minecraft server IP?

Players on the internet need the public IP: at home it's the router's (router settings or a "what is my IP" site), on a game host it's in the panel, on a VPS it's in ip addr or the provider's panel. The internal IP for your own network comes from ipconfig on Windows and ip addr on Linux.

Why can't my friends join on a 192.168 address?

It's a private address of your home network and doesn't work from outside. Friends need the public IP or a domain, and at home you also need port 25565 forwarded to the server's computer.

How do I write a server address with a port?

With a colon: 203.0.113.10:25570 or play.example.com:25570. The default port 25565 can be left out, and for a domain on another port you can set up an SRV record so no port is needed.

Where do I find the server IP on a game host?

In the host's panel on the server page: it shows the address and port. Give players the address with the port — on a shared host IP the port is the only thing that identifies your server.

What if my ISP uses CGNAT?

Port forwarding doesn't work behind ISP NAT. Ask the ISP for a public IP, run a tunnel such as playit.gg, or move the server to a game host or a VPS.

Sources

All sections

Run the best anticheat for modern Minecraft

DGuard catches all 47 kinds of cheats in our comparison — the closest rival, Intave, has 27. Full protection on every plan, free up to 30 players online.