How to Setup a Minecraft Server in 2026 (Step-by-Step)
A clear walkthrough for running your own Minecraft server on a VPS, from first login to inviting your friends.
Running your own Minecraft server means no player limits you did not choose, no resets you did not ask for, and full control over plugins, mods, and rules. It is also a great first project if you have never touched a server before, because the steps are simple and the payoff is immediate.
This guide assumes you are starting with a fresh VPS running Ubuntu. If you do not have one yet, you can spin one up in about a minute. For a small group, 4GB of RAM is plenty to start.
Step 1: Connect to your server
You will have an IP address and login details from your provider. From your own computer, open a terminal and connect over SSH:
ssh root@your-server-ip
On Windows, the built in terminal does this fine, or you can use a tool like PuTTY if you prefer a window to click around in.
Step 2: Install Java
Modern Minecraft needs Java 21. Install it along with screen, a small tool that lets the server keep running after you disconnect:
apt update && apt install openjdk-21-jre-headless screen -y
Check it worked:
java -version
You should see Java 21 reported back.
Step 3: Set up a folder and grab the server file
Keep things tidy by giving the server its own folder:
mkdir minecraft && cd minecraft
Now download the server jar. Get the download link for the latest release from the official Minecraft website, then pull it in with wget. It will look something like this:
wget https://piston-data.mojang.com/.../server.jar
Always grab the current link from the official site rather than trusting an old one, since the version changes regularly.
Step 4: First run and the EULA
Run the server once. It will stop immediately and create some files:
java -Xmx4G -Xms4G -jar server.jar nogui
The -Xmx4G tells it to use up to 4GB of RAM. Match that to your plan. It will complain that you need to accept the EULA, which is Mojang's terms of use. Open the file it created:
nano eula.txt
Change eula=false to eula=true, then save and exit. In nano that is Ctrl+O to save and Ctrl+X to quit.
Step 5: Start it for real
This time, start it inside a screen session so it survives you logging out:
screen -S minecraft
java -Xmx4G -Xms4G -jar server.jar nogui
The server will generate the world and start up. Once you see "Done" in the output, it is live. To leave it running and return to your normal terminal, press Ctrl+A then D. The server keeps going in the background. To jump back in later, type screen -r minecraft.
Step 6: Open the port
Minecraft uses port 25565. If you have a firewall on, allow it:
ufw allow 25565
For Virtualized, you may need to open this on your Firewall Manager
Step 7: Connect and invite people
In Minecraft, go to Multiplayer, Add Server, and enter your server's IP address. That same IP is what you give your friends. That is it. You are hosting.
Where to go next
Once the basics work, the fun starts. Swap the vanilla jar for Paper to get better performance and plugin support. Add plugins for permissions, protected areas, or minigames. Edit server.properties to set the difficulty, the max player count, whether it is survival or creative, and dozens of other options.
A couple of practical notes. Back up your world folder regularly, especially before you add mods or update versions, because that is when things occasionally break. And keep an eye on your RAM usage on busy nights. If the server starts to lag when it fills up, that is usually the sign to move to a plan with more memory, which you can do without losing your world.
Have fun. There is something genuinely satisfying about running a world that is entirely yours.