What the error looks like
**** FAILED TO BIND TO PORT!
The exception was: java.net.BindException: Address already in use
Perhaps a server is already running on that port?A server listens on port 25565 unless server-port in server.properties says otherwise, and a port can belong to only one program at a time. If something already holds it, the server gets java.net.BindException: Address already in use and prints the banner above. On Windows the last line ends in Address already in use: bind.
Another server is already running
Another server, still running: a second java.exe or javaw.exe in the taskbar, usually from an earlier session. Find what holds the port and stop it:
- Windows:
netstat -ano | findstr :25565lists it, and the last column of theLISTENINGline is the PID (say,8412); Task Manager > Details matches that to the process you can end. - Linux and macOS:
lsof -i :25565names the owner (on Linuxss -ltnp | grep 25565does too), andkill <pid>stops it.
Nothing listed? Reboot. A crashed program can leave the port wedged.
server-ip is filled in
Next, open server.properties and find the server-ip line. For most setups it should be blank:
server-ip=A filled-in address that isn't this computer's own, say your public one such as 203.0.113.7, is something the server can never bind to. Leave it blank and it listens on every address the machine has.
Use a different port
Sometimes another program legitimately needs 25565. Change server-port in server.properties to something else, like 25566, and restart. Players then add the port to the address, as in example.com:25566. On a hosting panel the port is handed to you, so don't touch it; ask support if it fails.
It isn't your router
Forwarding and firewalls aren't it. The Windows Defender prompt that pops up the first time java.exe listens, and the 25565 rule on your router, both control who can connect from outside, and this error fires at startup, before anyone has tried. Get the server running first. Friends still can't join? Then forward 25565 (TCP) to the server's local address, which is a separate job.
Questions
What port does a Minecraft server use?
25565, unless you've changed it. The setting is server-port in server.properties.
Do I need to forward a port to fix this error?
No. The problem is on the machine running the server. Forwarding only decides whether people outside your network can get in.
Why does it say Address already in use when nothing else is running?
A crashed server or a stray Java process may still be holding it. Look with netstat or lsof, or just restart the computer.
Keep reading
- How to find your Minecraft logsFind latest.log and crash reports for the Minecraft client, servers and launchers like Prism and Modrinth App. Paths for Windows, macOS and Linux.
- How to share a log file without leaking private detailsLog files can hold your IP address, your Windows username and even login tokens. This is what to look for and how to share a log without exposing it.