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 runs | Why the IP changes | Fix |
|---|---|---|
| Your own PC | Your 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 |
| Aternos | Each start can land on a different machine | Use the yourname.aternos.me address, not the numbers |
| A paid host with a raw IP:port | The host moved your server to another machine | Your own domain with an SRV record, or a host whose address doesn't depend on the machine |
| Packyard | It doesn't change | yourserver.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:
- The public IP is what friends outside your house type. Your ISP owns it and can change it whenever it likes. When it changes, friends get "Can't connect to server" until you send them the new one.
- The local IP (usually
192.168.x.x) is your PC's address inside your home network. When it changes, your port forward still points at the old address, so nobody outside can join, even with the right public IP.
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:
- 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).
- 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.
- 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:
- Add an A record, for example
mc.example.com→203.0.113.10. - 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, namemc) - Priority
0, weight5, port25612 - Target:
mc.example.com(a hostname, not an IP)
- Name:
- 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.
- No port: Java players type just the name.
- No port forwarding, and your home IP stays private.
- You pick the name when you order and can rename it yourself in the panel (your server → Address). The old name keeps working for 7 days so players have time to switch, then it's released.
- Your own domain isn't supported yet; every server uses a
play.packyard.caname.
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.