Skip to main content

Dedicated servers

info

Since Release 1.2.5 / Snapshot 1.3 * you can create a dedicated server for Minecraft: Java Edition.

* - Actually from previous versions as well, but there is a problem: there is no direct download link from Mojang anymore. So you can search for previous versions from Betacraft, but we can't ensure the file integrity.
  1. Download the Server Jar of the version you want from Xyrios1.
    • Check the required Java version, since you can't use (for example) Java 8 if the server requires Java 21.
  2. Download the required Java version from Adoptium, make sure to filter by OS (like Windows), Architecture (like x64) and finally Version (like 21). Then download the one that is JRE (otherwise JDK) and its extension is .zip / .tar.gz 2
  3. Create a folder for your server and put inside the server.jar, also extract the Java .zip / .tar.gz file into that folder.
    • And rename the Java folder to something simple, in this guide we rename it to java_folder
  4. Open a command prompt or terminal here (or navigate to your server folder using the cd command) and execute the following Java command to start your Minecraft multiplayer server:
    java_folder/bin/java -Xmx1024M -Xms1024M -jar server.jar nogui 3
  5. The first run will generate an eula.txt file. Open this file with any text editor and change eula=false to eula=true to accept Minecraft's End User License Agreement.
  6. (Optional) Configure the server.properties file the way you want, especially the enforce-secure-profile and online-mode keys.
    • Restart the server (basically by executing the stop command and starting it again with step 4) after making changes to this file.
  7. Set up port forwarding to allow other players to connect to your server over the internet:
    1. Access your router's configuration page (usually at 192.168.0.1 or 192.168.1.1)
    2. Find port forwarding settings (may be under "Advanced," "Security," or "Gaming")
    3. Forward port 25565 (TCP) 4 to your computer's local IP address
    4. Players can connect using your public IP address (find it by searching "What is my IP" online) 5

Footnotes

  1. If you check the URL of the Server Jar you are about to download, you will see that it comes from Mojang's official server.

  2. Basically, the extractable version of Java compatible with your PC so you don't install anything.

  3. On Linux / macOS you may need to give it execute permissions first by typing chmod +x server.jar (and maybe 755 instead of +x).

  4. Basically the value of server-port in your server.properties

  5. Security Note: Only share your IP address with trusted friends. For public servers, consider using a dedicated hosting service instead of self-hosting.