How to make a Minecraft server on a Linux VPS, step by step
A complete walkthrough: pick a VPS and OS, install Java and the Paper server, accept the EULA, set up server.properties, open port 25565, keep it running with systemd, and connect with your friends.
Key takeaways
- A Minecraft Java server is a program you run yourself: install Java, download the Paper server, accept the EULA, edit
server.properties, open port25565, and friends connect to your IP. - Run it on a Linux VPS rather than a home PC. A VPS stays on around the clock and comes with one dedicated IPv4, so there is no port forwarding and no CGNAT to fight.
- Size it by players and mods: a small vanilla or Paper world fits T2 (4 GB); plugins and more players want T3 (8 GB); Forge or Fabric modpacks start at T4 (16 GB).
- Keep it alive with
systemdso the server starts on boot and restarts after a crash, and readjournalctlwhen something breaks.
On this page
- How to make a Minecraft server (the short version)
- What you need before you start
- Step 1: Choose a VPS and why single-thread speed matters
- Step 2: Install Java
- Step 3: Create a user and download Paper
- Step 4: Accept the EULA
- Step 5: Configure server.properties
- Step 6: Open the port in the firewall
- Step 7: Keep it running with systemd
- Step 8: Connect and invite your friends
- How much RAM and which tier
- Choose a location close to your players
- Common first errors and how to fix them
- Running your Minecraft server on a RyzenRDP VPS
- Where to go next
How to make a Minecraft server (the short version)
Rent a Linux VPS, install Java, and download the Paper server into its own folder. Run it once to
generate the files, set eula=true in eula.txt, then edit server.properties. Open TCP port
25565 in the firewall and start the server under systemd so it stays running. Friends connect
to your server's public IP. The rest of this guide does each step in full.
What you need before you start
- A Linux VPS with full root. We use Ubuntu 24.04 below; Debian 12 and AlmaLinux 9.6 work the same way with their own package names. Running a server from a home PC means port forwarding and, on many connections, CGNAT that blocks it entirely. A VPS has its own public dedicated IPv4, so neither problem comes up.
- Enough RAM for your server type — see the tier guidance below.
- An SSH client (the
sshcommand on macOS and Linux, or any client on Windows) to reach the VPS. - The latest Minecraft: Java Edition on every player's PC, matching the server version.
Everything here is the manual, do-it-yourself path, and it is worth knowing even if you later let the server run on managed hardware. If you want the hardware story first, see Ryzen VPS and the Gaming VPS overview.
Step 1: Choose a VPS and why single-thread speed matters
A Minecraft server advances the world in a main loop called a tick, 20 times per second, and that loop runs mostly on one core. When a tick takes too long, every player feels the lag no matter how many cores the machine has. That is why a processor built for high clock speeds, like AMD Ryzen, is a genuine advantage for a game server: each tick finishes sooner. Gen4 NVMe SSD storage keeps chunk loading and world saves from stalling the loop.
So for a smooth server, prioritize per-core speed over raw core count, and pick a location close to your players to keep ping low.
Step 2: Install Java
Connect to the VPS over SSH, then install a headless Java runtime. Current Minecraft versions (1.20.5 and newer, including 1.21) need Java 21:
sudo apt update
sudo apt install -y openjdk-21-jre-headless
java -version
java -version should report 21. If your distribution's repository does not carry the version you
need, install Temurin from the Adoptium apt repository instead (see the sources at the end). For
Minecraft 1.18 to 1.20.4 install openjdk-17-jre-headless; only very old versions need Java 8.
Step 3: Create a user and download Paper
Do not run the server as root. Make a dedicated system user and a folder for the server:
sudo adduser --system --group --home /home/minecraft minecraft
sudo -u minecraft mkdir -p /home/minecraft/server
cd /home/minecraft/server
Now download the Paper server jar. Paper is a performance-focused, open-source build of the Minecraft server that supports Bukkit and Spigot plugins. Open papermc.io/downloads/paper, copy the download link for your Minecraft version, and fetch it into the folder:
# Paste the download URL you copied from papermc.io for your version:
sudo -u minecraft wget -O server.jar "PASTE_PAPER_DOWNLOAD_URL_HERE"
Want plain Vanilla instead? Download the official server.jar from minecraft.net (source 1). For
a modpack, you will download a Fabric or Forge server instead of Paper; the remaining steps
are the same, and modpacks need more RAM (see Step 8).
Step 4: Accept the EULA
Run the server once. It stops immediately and writes an eula.txt file:
sudo -u minecraft java -Xms2G -Xmx2G -jar server.jar --nogui
You will see a message that you need to agree to the Minecraft End User License Agreement. Open it (source 2), then set the value to true:
sudo -u minecraft sed -i 's/eula=false/eula=true/' /home/minecraft/server/eula.txt
Step 5: Configure server.properties
The first run also generated server.properties. Edit it to set up your world. The lines that matter
most:
server-port=25565
motd=My RyzenRDP Minecraft server
max-players=20
gamemode=survival
difficulty=normal
online-mode=true
view-distance=10
simulation-distance=8
white-list=false
level-name=world
Keep online-mode=true so the server authenticates each player against Mojang. If connections lag
on a busy server, lower view-distance and simulation-distance before anything else, as both
multiply the work the server does per tick. Set white-list=true (and add names with the whitelist
command) for a private server.
Step 6: Open the port in the firewall
The Minecraft Java server listens on TCP 25565. Allow SSH first so you never lock yourself out, then allow Minecraft:
sudo ufw allow OpenSSH
sudo ufw allow 25565/tcp
sudo ufw enable
sudo ufw status
Because the VPS has its own dedicated IPv4, that is all the networking you need: no router rules, no port forwarding, no CGNAT. Friends connect straight to your public IP. DDoS protection is included at every RyzenRDP location, which matters because public Minecraft servers do draw attacks.
Step 7: Keep it running with systemd
Running the jar by hand stops the moment you close SSH. A systemd service keeps the server on, starts it at boot, and restarts it after a crash. Create the unit file:
sudo nano /etc/systemd/system/minecraft.service
[Unit]
Description=Minecraft Paper server
After=network-online.target
Wants=network-online.target
[Service]
User=minecraft
WorkingDirectory=/home/minecraft/server
ExecStart=/usr/bin/java -Xms3G -Xmx3G -jar server.jar --nogui
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Set -Xmx to roughly 1 to 2 GB below the VPS's total RAM (for example -Xmx3G on a 4 GB plan,
-Xmx6G on 8 GB) so the operating system keeps breathing room. Then enable and start it:
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft
sudo systemctl status minecraft
Read the live log any time with journalctl -u minecraft -f. To send server commands, run the console
with a terminal multiplexer such as screen or tmux, or add a plugin that exposes a web or RCON
console.
Step 8: Connect and invite your friends
In Minecraft: Java Edition, choose Multiplayer, then Add Server, and enter your VPS's public IP
address. Because you kept the default port, the IP alone is enough; if you changed server-port, use
your-ip:port. Share the same address with your friends and they connect from their own PCs.
How much RAM and which tier
Size the server by players and, above all, by whether you run mods. Shared vCPU scales the number of players and plugins you can run; per-core clock speed keeps the tick fast. These are starting points, not hard limits:
| Server type | Recommended tier | Why |
|---|---|---|
| Small vanilla or Paper, a few friends | T2 (4 vCPU, 4 GB RAM and 80 GB Gen4 NVMe SSD) | Light load; a fast single thread matters more than cores. |
| Paper with plugins, 10 to 20 players | T3 (6 vCPU, 8 GB RAM and 160 GB Gen4 NVMe SSD) | Headroom for plugins, bigger view distance and more players. |
| Forge or Fabric modpack | T4 (6 vCPU, 16 GB RAM and 250 GB Gen4 NVMe SSD) and up | Modpacks are RAM-hungry and single-thread bound; large packs want T5 or T6. |
Never size right to the edge: leave about 1 to 2 GB of RAM for the operating system, and give modpacks extra. See every tier and price on the pricing page.
Choose a location close to your players
Ping depends on distance, so pick the location nearest most of your players: Dallas or Houston are central for the United States, Los Angeles suits the West Coast, Germany and the Netherlands suit Europe, and Singapore suits Asia and Oceania.
Common first errors and how to fix them
- "You need to agree to the EULA in order to run the server." You missed Step 4. Set
eula=trueineula.txtand start again. - "Failed to bind to port" / "address already in use." The server is already running, or another
process holds 25565. Check with
sudo ss -tlnp | grep 25565, stop the other process, or changeserver-port. UnsupportedClassVersionErrorat startup. The installed Java is older than the version your Minecraft build needs. Install Java 21 for current versions and confirm withjava -version.- Friends cannot connect, but the server is up. Check, in order: the service is running
(
systemctl status minecraft), the firewall allows25565/tcp, your friends use the correct public IP, and nobody is blocked by the whitelist. If you setonline-mode=false, set it back totrue. - "Can't keep up! Is the server overloaded?" The tick is taking too long: too many players, mods
or too high a view distance for the CPU. Lower
view-distanceandsimulation-distance, raise-Xmx, or move to a higher tier with faster single-thread performance. - The server is killed or logs
OutOfMemoryError.-Xmxis set higher than the VPS has free. Lower it so the operating system keeps 1 to 2 GB.
Running your Minecraft server on a RyzenRDP VPS
Everything above runs on any Linux VPS with full root. A RyzenRDP VPS provisions within minutes on high-clock AMD Ryzen cores, which is exactly what a Minecraft tick loop wants, with Gen4 NVMe SSD for fast chunk loading, a 1 Gbps port, and one dedicated IPv4 so your friends connect straight to your address, no port forwarding. Pick a location near your players, size the right tier, and you have a stable, always-on home for your world. Plans start at $14.99/mo, and you can run a 24-hour trial for $4, credited to your first month.
Where to go next
- Run a Minecraft server on a VPS — the full rundown, including modpacks, backups and the VPS order path.
- Ryzen VPS — why high clock speed suits game servers, with every tier.
- Gaming VPS — hosting other game servers alongside Minecraft.
FAQ
How do I make a Minecraft server?
Rent a Linux VPS, install Java (OpenJDK 21 for current versions), download the Paper server jar into its own folder, run it once, set eula=true in eula.txt, edit server.properties, open port 25565 in the firewall, then start it under systemd so it stays running. Friends connect to your server's IP.
How much RAM does a Minecraft server need?
A small vanilla or Paper server for a handful of friends is comfortable on 4 GB (T2). Add plugins or more players and 8 GB (T3) gives you headroom. Forge and Fabric modpacks are memory-hungry and single-thread bound, so start at 16 GB (T4) and move up for large packs. Always leave about 1 to 2 GB for the operating system.
What port does a Minecraft Java server use?
TCP port 25565 by default. You can change it with server-port in server.properties, but if you keep the default, players can connect using just your IP address with no port after it.
Do I need to forward ports to host a Minecraft server?
Not on a VPS. A VPS has its own public, dedicated IPv4 address, so you only open the port in the server's own firewall and friends connect straight to it. Port forwarding and CGNAT headaches only come up when you try to host from a home connection behind a router.
Which Java version does Minecraft need?
Minecraft 1.20.5 and newer (including 1.21) need Java 21. Versions from 1.18 to 1.20.4 run on Java 17, and much older versions used Java 8. Installing the wrong one produces an UnsupportedClassVersionError at startup.
What is the difference between Vanilla, Paper, Spigot and Fabric?
Vanilla is Mojang's official server with no plugin support. Spigot and Paper add a plugin API; Paper is a performance-focused build of Spigot and is the common choice for survival and minigame servers. Fabric and Forge are mod loaders for client-side mods and modpacks, which are heavier on RAM and CPU.
How do I keep the server running after I log out of SSH?
Run it as a systemd service. systemd starts the server on boot, restarts it automatically if it crashes, and keeps it running after you disconnect. A terminal multiplexer like screen or tmux also works, but systemd is more reliable for an always-on server.
Can I run a cracked or offline-mode server?
No. Keep online-mode set to true so the server verifies each player against Mojang's authentication. Offline-mode and cracked setups are against the rules and we do not support them.
Are Minecraft servers a target for attacks, and is my server protected?
Public Minecraft servers do attract denial-of-service attacks. DDoS protection is included at every RyzenRDP location. You should still keep the server updated, use a whitelist for private servers, and never run plugins from sources you do not trust.
Sources
- Minecraft Help: Minecraft: Java Edition server download
- Minecraft: End User License Agreement
- Minecraft Help: How to set up and run your own Java Edition server
- PaperMC documentation, "Getting Started" (papermc.io/downloads/paper) — Paper build downloads, startup flags and the
--noguioption. - Eclipse Adoptium / OpenJDK — Temurin JDK 21 packages for Linux, when your distribution's repository does not carry the version you need.