How to Create a Minecraft Java Server

A large stone castle build in Minecraft with lit windows at dusk

Minecraft: Java Edition is the original PC version of the game, and it remains the platform of choice for most multiplayer servers thanks to its enormous library of mods and plugins. Setting up a Java server is done entirely through files and a terminal (or a hosting panel, if you would rather skip that), and it is more approachable than it looks.

What you need

  • A PC or server with a recent Java runtime installed, such as Eclipse Temurin, a free and widely-used Java build.
  • The official server.jar file, downloaded from Minecraft's website for the version you want to run.
  • At least 1-2 GB of free RAM for a small server; more if you plan to run plugins or mods. Mojang publishes its own minimum hardware guidance if you want to double-check.

Step 1: Set up the server folder

Create a new, empty folder dedicated to the server. Do not put it inside your regular Minecraft install folder. Place server.jar inside it.

Step 2: Run the jar for the first time

Open a terminal in that folder and run:

java -Xmx2G -Xms1G -jar server.jar nogui

The -Xmx flag sets the maximum RAM the server can use, and -Xms sets the starting amount. If you are unsure what values to use, a Java arguments generator can build a complete, tuned startup command for you. The first run will fail and generate a few files, including eula.txt.

Step 3: Accept the EULA

Open eula.txt in a text editor and change:

eula=false

to:

eula=true

This confirms you accept Mojang's end-user license agreement, which is required before the server will start.

Step 4: Configure server.properties

Run the server again with the same command from Step 2. This time it will generate your world and a server.properties file, which controls almost everything about how the server behaves: difficulty, game mode, max players, whether PvP is enabled, the default view distance, and more. A server.properties generator is a faster way to build this file correctly than editing every line by hand, especially if you are not sure what each option does.

Step 5: Open the port (if self-hosting)

Java Edition uses port 25565 by default. If you are running the server from your own home network and want friends outside it to connect, you will need to forward that port on your router, or use a tunneling tool instead.

Step 6: Connect

In the Minecraft client, go to Multiplayer, Add Server, and enter your server's IP address (and port, if not the default). If everything is configured correctly, the server should appear online and ready to join.

Skipping the manual setup

Every step above, the jar, the EULA, the properties file, and the port, is handled automatically by a proper game hosting panel. If you would rather spend your time playing than editing configuration files, Tick Hosting's free plan gives you a ready-to-go Java server with a one-click version selector and a graphical file manager. Get started on Tick Hosting's pricing page.