Your own Minecraft server means your world, your rules, no third-party mods and no lag from an overcrowded free host. What many people do not realise is how short the path is on a VPS. This guide takes you from an empty server to a world your friends can play on: Java, Paper, autostart, whitelist and backups included.
What you need
You need a Linux server (this guide uses Debian/Ubuntu) with root access, the Minecraft Java Edition on the client machines — and, above all, suitable resources. Minecraft is a special case: its game logic runs essentially in a single thread. So clock speed matters more than core count, and being a Java application, the game is fairly hungry for memory on top.
| Players (Vanilla/Paper) | Server RAM | CPU recommendation |
|---|---|---|
| 1–5 | 4 GB | 2–3 cores, high clock |
| 5–10 | 6–8 GB | 3–4 cores, high clock |
| 10–20 | 8–12 GB | 4 cores, high clock |
| Modpacks | 8 GB and up, rather more | clock speed counts double |
These are starting points; for a general approach to estimating your needs, see the server sizing guide.
Step 1: Prepare the system and install Java
Bring the system up to date and create a dedicated user — a game server has no business running as root:
sudo apt update && sudo apt upgrade -y
sudo adduser minecraft
Current Minecraft versions require Java 21. Install the slim headless variant and check the version:
sudo apt install -y openjdk-21-jre-headless
java -version
If it reports openjdk version "21...", your foundation is ready. (Only for older Minecraft versions up to 1.20.4 does Java 17 suffice.)
Step 2: Download Paper and accept the EULA
For server software, Paper is the recommendation: compatible with vanilla clients, noticeably faster, and the basis for plugins should you want to expand later. Switch to the new user, create a directory and download the current Paper build — copy the download link from the official PaperMC downloads page:
sudo su - minecraft
mkdir server && cd server
wget -O paper.jar "<download link from papermc.io>"
Now start the server once. The first run aborts deliberately and creates the file eula.txt, because Mojang requires you to accept the end-user licence explicitly. Open it afterwards and set eula=true:
java -Xms3G -Xmx3G -jar paper.jar --nogui
nano eula.txt
About those Java flags: -Xms and -Xmx define the heap size and should be set to the same value. Leave the operating system around 1 GB of headroom — on a 4 GB server, 3G is the right choice.
Step 3: Basic configuration and first start
After the EULA run, the central configuration file server.properties sits in your directory. Three settings deserve your attention immediately:
white-list=true— only invited players get in. An open server will be found by scanners; it is a question of when, not whether.online-mode=true— leave this on. It verifies accounts against Mojang's servers; without it, anyone can log in under any name, including yours.motd=...— the greeting your server shows in the server list.
Then open the Minecraft port in the firewall (in a second session, as a sudo-capable user):
sudo ufw allow 25565/tcp
Now start the server again with the java command from step 2. In the server console, add yourself to the whitelist and make yourself an operator:
whitelist add YourPlayerName
op YourPlayerName
Time for the big moment: in the Minecraft client, go to "Multiplayer", enter the server IP and join. Once that works, stop the server cleanly with the console command stop — next up is permanent operation. (Nicer than a bare IP address: with your own domain and an A record, players connect via mc.yourdomain.com; an SRV record _minecraft._tcp is only needed for a non-standard port.)
Step 4: Permanent operation with systemd
So the server comes back by itself after a reboot or a crash, set it up as a systemd service. As a sudo user, create the file /etc/systemd/system/minecraft.service:
[Unit]
Description=Minecraft Server (Paper)
After=network.target
[Service]
User=minecraft
WorkingDirectory=/home/minecraft/server
ExecStart=/usr/bin/java -Xms3G -Xmx3G -jar paper.jar --nogui
Restart=on-failure
[Install]
WantedBy=multi-user.target
Then enable and start it:
sudo systemctl enable --now minecraft
sudo systemctl status minecraft
From now on you issue administrative commands comfortably in-game as an operator (/whitelist add ..., /gamemode ...). If you also want the server console, start the process in a screen or tmux session instead, or enable RCON — for everyday use with a small group, the systemd route is the most robust.
Step 5: Backups and performance in daily operation
Your world lives in the world folder (plus world_nether and world_the_end) — and it is gone for good if something goes wrong. A nightly archive via cron job is mandatory; this one runs at 4 a.m. and dates each file:
crontab -e
# add as a line:
0 4 * * * tar -czf /home/minecraft/backups/world-$(date +\%F).tar.gz -C /home/minecraft/server world world_nether world_the_end
Create the backups folder beforehand, check occasionally that the archives really appear — and restore one once as a test. The nightly slot is deliberate, by the way: an archive created while players are busy building can end up inconsistent. Before every server or Paper update the same rule applies: back up first, then update.
If things get choppy as player numbers grow, the effective levers in order are: lower view-distance in server.properties (the default is 10, and 7–8 saves noticeably), match the RAM flags to your player count, and add the optimised Java startup parameters known as "Aikar's flags". If none of that helps, the CPU's single-thread performance is the limit — and only a host with a higher clock speed fixes that.
Rule of thumb: a Minecraft server scales almost entirely through CPU clock speed and RAM, not core count. Two fast cores beat eight slow ones.
Conclusion
Install Java, set up Paper, accept the EULA and set a whitelist, hand operation to systemd, automate backups — that is all there is to a stable Minecraft server of your own. From here on, the world and its rules are yours. Because the tick loop hangs on a single thread, clock speed is what to look for when picking a server: that is exactly what the Ryzen 9 line with its high boost clock and 3D V-Cache is built for.