How to Host a Minecraft Server on a VPS

Why Your Home PC Makes a Terrible Server
Running a Minecraft server on your gaming rig works - for about twenty minutes. Then someone in your house starts a video call, your internet hiccups, everyone gets kicked, and suddenly you're the least popular person in the friend group.
There's also a real security issue: when you share the server IP with players, you're handing out your home IP address. Most players are fine. But all it takes is one annoyed person to ruin your week.
Then there's the biggest problem. The server is only up when your computer is on. The moment you shut down to go to bed, everyone gets booted. That's not how a server should work.
Why a VPS is the Better Move
A VPS (Virtual Private Server) is a small cloud computer you rent by the month. It runs 24/7, has its own static IP that has nothing to do with your house, and costs about as much as a fast food meal each month.
Your players can join whenever they want, even while you're sleeping, at school, or doing something that doesn't involve a computer. The VPS handles everything while you're away - it's basically a server that actually acts like one.
The other big win is the static IP. No more "the IP changed again" messages to your friends every few weeks. One address, forever (or at least until you cancel the plan).
One thing worth knowing upfront: the CPU on a VPS is shared. You get virtual cores, not a dedicated chip sitting in a rack waiting for you. For a small group that's completely fine - but it does put a ceiling on how many players you can host before things start to stutter. More on that below.
Picking a Provider
There are a lot of VPS providers out there. DigitalOcean, Hetzner, and Vultr are all solid choices. For a genuinely cheap starting point, OVHcloud is worth a look - their entry-level VPS plans are some of the most affordable around, and they have data centers in both North America and Europe.
Here's a rough guide on RAM and how many players you can realistically host on a VPS:
- 2 GB - up to about 5-8 players, vanilla only, no mods
- 4 GB - up to about 15 players, handles light plugins without much trouble
- 8 GB - up to about 25-30 players, works for most plugin setups
Keep in mind that RAM is only part of the equation. The shared CPU on a VPS will usually become the bottleneck before you run out of memory - especially if players are all exploring new chunks at the same time, which is the single most demanding thing a Minecraft server has to deal with.
This guide uses Ubuntu, which most providers offer. The commands are the same on Debian if that's what you pick.
When a VPS Is Not Enough
A VPS is the right place to start. It's cheap, takes ten minutes to set up, and works perfectly for a small group. But it has a hard ceiling, and it's worth knowing where that ceiling is before you invite 40 people and wonder why everything is lagging.
The problem is the CPU. On a VPS, your virtual cores are carved out of a physical chip that is also running other customers' machines. You share it whether you like it or not. Minecraft's main world simulation thread is still largely single-threaded - more cores don't help as much as you might expect - and a throttled virtual core hits that limitation faster than a real one.
When you outgrow a VPS, the next step is a dedicated server. You rent an entire physical machine. No sharing, no neighbors hogging the CPU during peak hours. Providers like OVHcloud offer bare metal dedicated servers alongside their VPS plans, and the price difference is smaller than most people expect once you're past the entry-level VPS tier.
Here's a rough idea of what different dedicated server CPUs can handle on vanilla Minecraft:
| CPU | Cores | Clock Speed | Approx. Players (vanilla) |
|---|---|---|---|
| Intel Xeon-E 2136 | 6c / 12t | 3.3 GHz base, 4.5 GHz boost | ~20-40 |
| Intel Xeon-E 2288G | 8c / 16t | 3.7 GHz base, 5.0 GHz boost | ~30-50 |
| AMD EPYC 4244P | 6c / 12t | 3.8 GHz base, 5.1 GHz boost | ~30-50 |
| Intel Xeon Gold 6426Y | 16c / 32t | 2.5 GHz base, 4.1 GHz boost | ~40-70 |
| AMD Ryzen 7 9700X | 8c / 16t | 3.8 GHz base, 5.5 GHz boost | ~50-80 |
A few things to keep in mind with these numbers. First, they're vanilla estimates - modded servers will be lower, sometimes significantly. Second, using an optimized server JAR like Paper or Purpur can push these numbers up noticeably. Third, Minecraft's world thread cares more about single-core clock speed than core count, which is why the Ryzen 9700X sits at the top of this list despite not having the most cores. The Xeon Gold's 16 cores are more useful on heavily modded servers where parallel tasks matter more.
None of this is a reason to buy a dedicated server on day one. Start with a VPS, see how it goes, and upgrade when your player count actually demands it.
What You'll Need
- A VPS running Ubuntu (set up through your provider's dashboard)
- The IP address and root password your provider gives you
- About 20 minutes
Step 1 - Connect to Your Server
Once your VPS is spun up, your provider will give you an IP address and a root password (or let you set an SSH key). Open a terminal and connect:
ssh root@YOUR_SERVER_IP
Swap in your actual IP address. On Windows, use Windows Terminal or PuTTY. On Mac and Linux, the terminal app works fine out of the box.
You're now inside your server. It feels weirdly powerful for something that cost less than a sandwich.
Step 2 - Update Everything and Install the Basics
First things first - get the server's package list up to date and install a few tools you'll need:
sudo apt update
sudo apt full-upgrade -y
sudo apt install screen nano wget -y
screen is the important one. It lets you run the Minecraft server in the background so it stays alive even after you disconnect from SSH. Without it, closing your terminal kills the server. With it, the server just keeps going.
Now install Java. Minecraft 1.21 needs Java 21 or newer:
sudo apt install openjdk-21-jdk -y
Check it installed correctly:
java -version
You should see a line starting with openjdk 21. If you do, you're good to go.
Step 3 - Create a Dedicated Minecraft User
Don't run the server as root. If something in the server software ever goes wrong, running it as root means it has access to everything on the machine. A dedicated user limits the damage - think of it as giving the server its own house key instead of a master key to the building.
sudo adduser minecraft --disabled-password
Press Enter through all the optional prompts. Then switch to that user:
sudo su - minecraft
Step 4 - Download the Minecraft Server
Create a folder for the server files:
mkdir ~/server && cd ~/server
Go to minecraft.net/en-us/download/server and copy the download link for the latest server .jar. Then pull it down directly to your VPS:
wget -O server.jar https://PASTE_THE_DOWNLOAD_URL_HERE
Always grab the link from the official site. The URL changes with every Minecraft version, so a link from a forum post six months ago will get you something outdated.
Step 5 - Accept the EULA
Run the server once so it can generate its files:
java -jar server.jar nogui
It will immediately stop and tell you to accept the End User License Agreement. Fair enough - Mojang wants you to pinky-promise before it does anything. Accept it:
echo "eula=true" > eula.txt
You only ever have to do this once.
Step 6 - Start the Server
Open a screen session so the server runs in the background:
screen -S minecraft
Then launch the server. This gives it 1 GB of RAM to work with:
java -Xms1024M -Xmx1024M -jar server.jar nogui
-Xms sets the starting RAM and -Xmx sets the maximum. If your VPS has 4 GB, you can safely bump these to 2048M for a smoother experience with more players.
The first launch takes a couple of minutes while it generates the world. When you see Done! in the console, the server is ready.
Step 7 - Detach and Disconnect
Press Ctrl + A, then D to detach from the screen session. The server keeps running in the background even after you close your terminal and go live your life.
When you need to check on the server or run commands, SSH back in and reattach:
screen -r minecraft
Step 8 - Connect from Minecraft
Open Minecraft Java Edition, go to Multiplayer, and add a new server. Enter your VPS IP address. No port is needed - Minecraft defaults to port 25565, which the server is already using.
If you can't connect, check your VPS provider's firewall settings. Most providers have a control panel where you can open specific ports. Make sure port 25565 (TCP) is allowed.
One Thing to Know About Reboots
If your VPS ever reboots - for a provider maintenance window or an update - the server won't restart automatically. You'll need to SSH in and start it again with the screen command from Step 6.
Setting up automatic restarts using a systemd service is worth doing once you are comfortable with the basics. That's a short follow-up guide on its own, but for now just know it's possible and not that complicated.
That's All It Takes
Your server is running 24/7, reachable anywhere, and has nothing to do with your home internet. Players can join while you are offline, the IP will not change on them, and you're not burning electricity on your gaming rig around the clock.
The whole setup costs less per month than most people spend on Minecraft DLC. Probably the best value in Minecraft server hosting you will find without building your own rack, which I don't recommend unless you already own a rack.
Keep your pumpkin lit and your diamonds close. - MrPumpkin
MrPumpkin has been terrorizing Minecraft servers since 2012, and yes, he did run one of his own. His natural habitat is Factions PvP, though he'll happily spend three hours configuring a server plugin just to make one thing work 2% better. If you need to know how to set up a modpack, tune server performance, or figure out why your Forge installation is broken, MrPumpkin is your guy.
“Keep your pumpkin lit and your diamonds close.”