Self-hosting a Minecraft server (and when the panel is worth more)
Updated: 12 August 2026 · Guide · VPS · Game server
A Minecraft server needs three things: Java in the right version, RAM according to the number of players, an open port. The rest is done quickly.
Install Java
sudo apt update sudo apt install openjdk-21-jre-headless
Java 21 fits current Minecraft versions (from 1.20.5); older server versions sometimes want Java 17. Which version belongs to which release is listed on the official Minecraft download page.
Server files
Create a directory of its own, put the server JAR in it (vanilla from minecraft.net, or Paper/Purpur for better performance and plugin support) and start it once:
mkdir ~/mc && cd ~/mc java -Xmx4G -Xms2G -jar server.jar nogui
The first start aborts and asks you to accept the EULA. Enter eula=true in the newly created eula.txt, then run the command above again.
Open the port, keep it running
sudo ufw allow 25565/tcp
For the server to survive a VPS reboot, it belongs in a systemd service rather than an open SSH session. Otherwise it dies the moment the connection drops.
Where it gets uncomfortable
Installing plugin updates by hand, readjusting RAM when it lags, timing backups yourself, and if the server crashes at three in the morning, only SSH and reading logs will help.
Exactly at that point our own game server panel takes the work off you: modpacks with one click in the Software tab, backups with one click or on a schedule, restart via the web interface, no SSH needed.
The systemd service, written out
Without this step the server is gone after every VPS reboot. The unit goes into /etc/systemd/system/minecraft.service:
[Unit] Description=Minecraft Server After=network.target [Service] User=<username> WorkingDirectory=/home/<username>/mc ExecStart=/usr/bin/java -Xms2G -Xmx4G -jar server.jar nogui Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target
sudo systemctl daemon-reload sudo systemctl enable --now minecraft sudo journalctl -u minecraft -f
Restart=on-failure is the part that counts at night: if the server crashes, systemd restarts it after ten seconds instead of the world staying offline until the next morning.
How much RAM really, and why -Xms belongs there
The two Java settings do different things: -Xmx is the upper limit, -Xms the memory reserved at start. Setting both isn't a ritual. If -Xms is too low, Java keeps enlarging the heap during operation, and exactly those enlargements are noticeable lag spikes.
As a guide: vanilla or Paper for a small group gets by with 2 to 4 GB, a medium modpack more like 6 to 8 GB, large packs more. The reserve is what matters: -Xmx must not equal the server's entire RAM, because the operating system and Java itself still need memory outside that value. On an 8 GB VPS, -Xmx6G is a sensible upper limit, not -Xmx8G.
The settings that actually change something
server.properties contains a few values that do more than all the others put together. view-distance is the most important: it determines how many map chunks the server calculates per player, and it scales quadratically. Going from 10 to 8 saves noticeable load without anyone noticing in game. simulation-distance separately controls how far out mobs and machines actually work.
view-distance=8 simulation-distance=6 max-players=10 online-mode=true
online-mode belongs on true. If it's false, the server no longer checks accounts. Then anyone can connect under any name, including an administrator's.
Backups that actually exist
A backup you're planning to make isn't one. A single cron entry is enough to start with and packs the world away every night:
0 4 * * * tar -czf /home/<username>/backups/world-$(date +\%F).tar.gz -C /home/<username>/mc world
Two things belong with it that are easily forgotten: delete old archives at some point, otherwise the disk fills up, and try once whether a backup can actually be restored. A backup that has never been tested is a guess.
Self-hosting or panel: the honest trade-off
Self-hosting is worth it if you run a VPS anyway, have several services on it and don't mind dealing with systemd and logs. You then have full control and only pay for the server.
Our ready-made game server takes exactly the parts off your hands that cause work above: you switch server software and version in the control panel instead of swapping files, you take backups with one click or schedule them, restart and console are in the browser, and there's no firewall rule to add. The difference isn't performance but responsibility, and for many people that's worth the extra cost as soon as the first night-time crash without SSH access has happened.
- Secure the VPS firstSSH key and firewall before the server runs
- Rent a Minecraft serverPaper preinstalled, switch software in the panel
- View all game serversThree sizes per game, Xeon Gold in Frankfurt
- Rather self-host: VPS plansFull root access, you do everything yourself
- Server running, but nobody can join?Five checks and all default ports
- Version, build and JAR file in the control panelWhat you're allowed to enter in the settings
- Startup flags generatorJava start command with Aikar's flags to match your RAM
- MOTD generator with colour previewBuild a server description with colour codes