
Setting up a Minecraft server often involves troubleshooting startup stops, network blocks, and authentication rules. This intermediate guide explains how to resolve Exit Code 0, fix player connection problems, and manage the online-mode setting.
When you search for exit code 0 hosting minecraft, it helps to know what the number actually means. In standard software, an exit code of 0 indicates that a process closed normally without an unhandled operating system crash. On a Minecraft server, however, seeing Exit Code 0 right after startup means the server intentionally shut itself down because a required condition was not met, or a mod/plugin triggered a clean stop.
Follow these steps to find and fix the cause:
eula.txt and immediately stops with Exit Code 0. Open eula.txt, change the value to eula=true, save the file, and restart./tools/ram-calculator/ to estimate how much memory your loaded chunks, players, mods, and plugins need. You can also use the start script generator to apply proper Aikar flags (a widely used set of G1GC JVM flags for Paper servers).logs/latest.log. A missing dependency will force a clean shutdown that outputs Exit Code 0.A common frustration for server administrators is: "Why did my Minecraft server start but friends can't join?" When the console says the server is running, the issue is usually a network block or a default configuration rule rather than a server crash.
First, check the new defaults in server.properties. In Minecraft 26.3, the default configuration sets white-list=true (along with view-distance=10, simulation-distance=10, max-players=20, spawn-protection=16, pause-when-empty-seconds=60, and difficulty=easy). Because the whitelist is enabled by default, anyone not on the list is rejected at login. Either set white-list=false and restart, or add your friends using the console command whitelist add <username> (or build a file with the whitelist generator).
Second, verify that the server is actually reachable from outside your network using a server status checker. If you use a free host, remember that free hosts usually stop the server when nobody is online or queue starts, so the server may have gone back to sleep before your friends connected.
When players see a connection timed out message or search for network error hosting minecraft, packets are failing to travel between the client and the server. How you fix this depends on where you host and which edition you run:
25565 by default. Bedrock Dedicated Server (such as version 1.26.66.1) listens on UDP port 19132 (and 19133 for IPv6). If a shared host assigns you a custom port, your friends must include it when connecting (for example, IP:PORT).playit.gg, a tunnel that lets you host at home without port forwarding.In server.properties (which you can customize with the server.properties generator), the setting online-mode=true is enabled by default. When set to true, the server checks every connecting player against the authentication servers to verify that they own a legitimate account and that their username matches their unique account ID (UUID).
To change this setting, open server.properties in a text editor, find the line, and adjust it:
online-mode=trueSave the file and restart the server for the change to take effect. Note that there is one valid technical reason to set online-mode=false: running a server network. When you use Velocity or BungeeCord to join several servers into a network, the front proxy handles authentication in online mode, while the backend Paper or Spigot servers must be set to online-mode=false to accept forwarded connections from the proxy.
Server owners frequently ask: "Is it safe to set online-mode=false for TLauncher players?" In short, disabling online mode on a public or standalone server creates severe security problems.
When you set online-mode=false:
ops.json. If an unverified user logs in using an operator's username, the server grants them full operator permissions, allowing them to destroy the world or ban players.online-mode=true.If you run a proxy network (Velocity or BungeeCord) where backend servers must use online-mode=false, you must block direct external connections to those backend ports with a firewall and use the proxy's built-in forwarding secret so players cannot bypass the proxy.
No. Setting online-mode=false disables account verification. Any player can connect using any username, meaning someone can log in with the username of an admin listed in ops.json and take full control of the server. It also causes skin issues and mismatches player UUIDs.
In recent versions like Minecraft 26.3, white-list=true is enabled by default in server.properties, which blocks anyone not added to the whitelist. Other common causes include closed firewall ports (TCP 25565 for Java, UDP 19132 for Bedrock), missing port forwarding when hosting at home, or giving friends your local IP instead of your public IP.
Exit Code 0 means the server process closed cleanly rather than crashing. This usually happens on first start when eula=true has not been set in eula.txt, when the wrong Java version is selected for your Minecraft release, or when a plugin or mod stops the server due to a missing dependency.
Use Java 8 for versions up to 1.16.5, Java 16 for 1.17, Java 17 for 1.18 to 1.20.4, Java 21 starting from 1.20.5, and Java 25 for the newest releases such as Minecraft 26.3.