Skip to content
CyberNex Logo
Back to Tutorials
VPS & Dedicated3 min readJuly 15, 2026

How to Create a Minecraft Server on an Linux VPS

Ganidu Sathishka
Support Engineer at CyberNex | 4+ years customer technical support

Step-by-Step Instructions

<ol><li>Update the system: sudo apt update && sudo apt upgrade -y.</li><li>Install Java: sudo apt install openjdk-17-jdk -y.</li><li>Create a directory and download the server jar: mkdir ~/minecraft-server && cd ~/minecraft-server, then wget the server.jar.</li><li>Run java -Xmx1024M -Xms1024M -jar server.jar nogui to generate config files.</li><li>Edit eula.txt with nano and set eula=true.</li><li>Re-run the java command to start the server.</li><li>Open the firewall: sudo ufw allow 25565 && sudo ufw enable.</li><li>Find your public IP with curl ifconfig.me and join via Multiplayer.</li></ol>

Code / Configuration

<pre><code>sudo apt update &amp;&amp; sudo apt upgrade -y sudo apt install openjdk-17-jdk -y mkdir ~/minecraft-server &amp;&amp; cd ~/minecraft-server wget https://piston-data.mojang.com/v1/objects/SERVER_JAR/server.jar java -Xmx1024M -Xms1024M -jar server.jar nogui # then set eula=true in eula.txt and run the java command again sudo ufw allow 25565 &amp;&amp; sudo ufw enable</code></pre>

Info

For a persistent server, create a systemd service so the server auto-restarts on boot and after crashes.

Related Hosting Services

Was this guide helpful?

Join our Discord for more guides and direct help from our engineering team.

How to Create a Minecraft Server on an Linux VPS | CyberNex