We recommend a VPS with at least 1 GB of RAM for a smooth experience. Check Resource Limits to see your current allocation. You also need port 25565 open before players can connect — see Networking.
Install Java
1
Update packages
Refresh your package lists to make sure you install the latest available versions:
2
Install Java 17
Minecraft 1.17 and later require Java 17. Install the headless JRE (no desktop environment needed on a VPS):
3
Verify the installation
Confirm Java is installed and check the version:You should see output similar to
openjdk version "17.x.x".Download and Run the Minecraft Server
1
Create a dedicated folder
Keep all server files in one place:
2
Download the server JAR
Mojang updates the server JAR regularly, so you need to grab the current download link yourself:For example, the command will look similar to:where
- Visit the Minecraft server download page in your browser.
- Right-click the minecraft_server.X.X.X.jar download button and copy the link address.
- Back on your VPS, use
wgetwith that copied URL:
<hash> is the unique identifier for the version you downloaded.3
Accept the EULA
Minecraft requires you to accept the End User License Agreement before the server will start:
4
Start the server for the first time
Launch the server with modest memory limits suitable for a free-tier VPS. This first run generates the world and all default config files:
5
Stop the server
Once the world has finished generating and you see the
Done message in the console, type stop and press Enter to shut it down cleanly before moving on to the next section.Keep It Running with screen
Closing your SSH session normally kills any processes running in it.screen lets the server keep running in the background.
1
Install screen
2
Start a named screen session
minecraft.3
Launch the server inside screen
4
Detach from screen
Press Ctrl + A, then D to detach. The server continues running in the background and your SSH session is free.
5
Reattach later
When you need to access the server console again — to run commands, check logs, or stop the server — reattach with:
Configure the Server
All core server settings live in~/minecraft/server.properties. Open the file with a text editor and adjust the values to suit your needs:
After editing
server.properties, restart the server for your changes to take effect.
Remember to open port 25565 TCP in the Networking panel. Players connect to
YOUR_SERVER_IP:25565 — if the port is closed, they’ll see a connection timeout.