PACKYARDStart your server

Minecraft Server IP Keeps Changing? Why, and 4 Fixes

Published

Short answer: stop giving players an IP. Give them a name that points at whatever IP the server has right now. How you get that name depends on where the server runs:

Where your server runsWhy the IP changesFix
Your own PCYour ISP gives your router a new public IP (after a reboot, an outage, or just over time)Dynamic DNS (DDNS) hostname, plus a reserved local IP for the port forward
AternosEach start can land on a different machineUse the yourname.aternos.me address, not the numbers
A paid host with a raw IP:portThe host moved your server to another machineYour own domain with an SRV record, or a host whose address doesn't depend on the machine
PackyardIt doesn't changeyourserver.play.packyard.ca stays the same through restarts and hardware moves

Everything below is for Minecraft Java Edition. Bedrock is covered at the end, because some of these fixes don't work there.

First, which IP is changing?

There are two different "IPs", and they break in different ways:

To see which one moved: on Windows run ipconfig and compare the IPv4 address with the one in your router's port forwarding rule. For the public IP, search "what is my IP" and compare it with what your friends are typing. If the router's own WAN IP doesn't match your public IP, or starts with 100.64 to 100.127, you're behind CGNAT, and no DNS trick will make a home server reachable (see port forwarding and CGNAT).

Fix 1: home server, lock the local IP

In your router, find DHCP reservation (sometimes "static lease" or "address reservation") and reserve your PC's current local IP. Then the forwarding rule for TCP 25565 always points at the right machine. Our port forwarding guide walks through the rule itself and how to test it from outside.

Fix 2: home server, use a DDNS hostname for the public IP

Most home connections have a dynamic public IP. A static one is usually a paid business add-on, so the normal fix is dynamic DNS:

  1. Make a free hostname with a DDNS provider (No-IP, Duck DNS, Dynu and others; many routers have a DDNS page with a few providers built in).
  2. Turn on updates, either in the router's DDNS settings or with the provider's small update app on the PC. Whenever your public IP changes, the hostname is updated to match.
  3. Give friends the hostname (for example myworld.duckdns.org) instead of the IP. On the default port 25565 they don't add a port.

The catch: after the IP changes there's a short gap while the update goes through and the old answer expires from DNS caches. And everyone who connects still connects to your home IP, so anyone in the server list can see it.

Fix 3: Aternos, use the aternos.me address

Aternos staff explain it on their forum: each time your server starts it can run on a different machine, so the numeric IP changes. The fixed part is the yourname.aternos.me address on your server page, which follows your server. Share that, not the numbers. If you're running into this along with queues and stops, our comparison of Aternos and paid hosting covers when free stops being enough.

Fix 4: paid host, your own domain with an SRV record

If your host gives you something like 203.0.113.10:25612, the IP and port belong to the machine. When the host moves you, both can change. If you own a domain, you can hide that behind one name:

  1. Add an A record, for example mc.example.com → 203.0.113.10.
  2. Add an SRV record so players don't need the port:
    • Name: _minecraft._tcp.mc (some DNS panels split this into service _minecraft, protocol _tcp, name mc)
    • Priority 0, weight 5, port 25612
    • Target: mc.example.com (a hostname, not an IP)
  3. Players join mc.example.com. Java looks up the SRV record and finds the port by itself.

If the host moves your server, you update two records instead of telling every player. On port 25565 you only need the A record. Test it with our server status tool once DNS has updated.

Or use a host where the address belongs to the server

On Packyard, every Minecraft server gets a permanent address like yourserver.play.packyard.ca. Players never connect to the machine the server runs on. They connect to our edge, which reads the name they typed and forwards them over a private tunnel to wherever the server runs right now. A restart doesn't change the address, and moving the server to other hardware only changes the route behind the edge. How that's built, including what broke along the way, is in permanent Minecraft server addresses with a WireGuard edge.

Plans are $1.50 per GB of RAM a month, from $5 for 3 GB (USD plus applicable taxes), with daily backups and backups you make yourself in the panel. Available in the US and Canada (not Quebec); servers run in US West.

Get a Minecraft server with an address that never changes, from $5

Bedrock players

Bedrock Edition doesn't use SRV records, so Fix 4 can't hide a port there, and Aternos staff note that the aternos.me trick doesn't cover Bedrock either. A DDNS or A-record hostname still works, but Bedrock players type the port separately (default UDP 19132). Packyard is Java Edition only.

Packyard is not an official Minecraft product and is not affiliated with Mojang, Microsoft or Aternos.

FAQ

Why does my Minecraft server IP change every time I restart my router?

Most ISPs hand out a dynamic public IP, and a router restart is the most common moment it gets a new one. Use a DDNS hostname so friends always type the same name.

Can I get a static IP for a Minecraft server at home?

Sometimes, from your ISP, usually as a paid add-on or on a business plan. DDNS does the same job for free on most connections. Neither helps if you're behind CGNAT.

Does the server's port change too?

At home, only if you change server-port in server.properties. On a paid host with IP:port addresses, a move to another machine can change both. An SRV record hides the port from players.

Do I need an SRV record if my server uses port 25565?

No. On the default port an A record (or a CNAME to your host's name) is enough, because Java tries 25565 when no port is given.

Will players lose their server list entry when the IP changes?

The entry stays, but it points at the old IP and shows as offline. If they saved a hostname instead, it keeps working once DNS updates.

Is it safe to give friends my home IP?

It works, but everyone you share it with can see it, and it can be passed on. A host or tunnel keeps your home IP out of the server list.

More guides and posts on the Packyard blog.