BuyRDPs.
Host a Minecraft server on a VPS — voxel game world on a monitor beside a server rack

How to Host a Minecraft Server on a VPS: Java & Bedrock Setup

If you have ever tried to keep a Minecraft world alive for your friends, you know the pattern: somebody’s laptop hosts the world, that laptop goes to sleep, and the whole server dies with it. Realms fixes the uptime problem but takes away the plugins, the mods and the control. A managed game host gives you a panel but charges a premium for every gigabyte and decides which versions you are allowed to run. That is why more players are learning to host a Minecraft server on a VPS — a small virtual server you rent for a few dollars a month, where you pick the edition, the version, the plugins and the rules, and the world stays online whether your own computer is on or not.

It sounds harder than it is. If you can copy and paste commands into a terminal, you can have a Paper server running in about 30 minutes, and a Bedrock server takes even less. This guide walks through the whole thing on an Ubuntu VPS: which edition to run, how much RAM you actually need, what it costs in November 2026, the full setup step by step, and the backups and security habits that keep your world safe once your friends start building in it.

Why Host a Minecraft Server on a VPS Instead of Realms

Minecraft gives you three ways to play together, and they are not equal. Realms is the official option: Mojang hosts it, it just works, and it costs about $8 a month for ten players. The catch is that Realms runs vanilla only — no plugins, no mods, no custom server software, and you cannot change the server settings beyond what the Realms menu offers. For a lot of groups that is fine. For a group that wants plugins, it is a dead end.

A managed Minecraft host sits in the middle. You get a panel, one-click modpacks and support, but you pay for it: a decent 4 GB plan usually runs $12 to $20 a month, and the cheaper plans throttle you with shared CPU and slow disks. You also live inside their panel — if they do not offer the version or the plugin you want, you are stuck.

A VPS is the third way, and for anyone comfortable with a terminal it is the best value on the list:

  • You own the whole machine. Root access, any Java version, any server software — Paper, Purpur, Fabric, Forge, or plain vanilla.
  • It costs less per gigabyte. An 8 GB VPS from a budget provider runs $5 to $9 a month, which is what a managed host charges for 2 to 4 GB.
  • It never sleeps. The world stays online 24/7, and you can run other things on the same box — a Discord bot, a website, a backup script.
  • You can move it. Your world is a folder. Copy it to another VPS and you are back online in minutes, with no host lock-in.

The trade-off is honest: there is no panel holding your hand. You install Java yourself, you open the firewall port yourself, and when something breaks, the logs are yours to read. If that sounds like a chore, a managed host is the right call. If it sounds like control, keep reading — the setup is shorter than you think.

Java vs Bedrock: Pick Your Edition First

Minecraft comes in two editions that do not talk to each other. Java Edition is the original PC version; Bedrock is the version on phones, consoles and the Windows Store. Your players’ edition decides which server you install, so settle this before you buy anything.

Java EditionBedrock Edition
Who playsPC and Mac playersPhones, consoles, Windows Store players
Server softwareVanilla, Paper, Purpur, Fabric, ForgeBedrock Dedicated Server (BDS)
Plugins and modsThousands — this is Java’s whole advantageAdd-ons only, much smaller ecosystem
RAM neededMore — Java is a memory hogLess — BDS is lighter per player
PortTCP 25565UDP 19132 (and 19133 for IPv6)
Cross-playJava players only (Geyser plugin can bridge Bedrock in)All Bedrock platforms together

The short version: if your group plays on PC and wants plugins, run Java with Paper. If your group is on phones and consoles, run Bedrock. If your group is mixed, run Java with the GeyserMC plugin — it lets Bedrock players join a Java server, and it works well enough that plenty of public servers rely on it. This guide sets up Java with Paper first, because that is what most VPS owners run, and covers the Bedrock differences where they matter.

How Much VPS Do You Need for a Minecraft Server?

Minecraft is unusual among server software because it is mostly single-threaded. The main game loop — the “tick” that updates the world 20 times a second — runs on one CPU core. That means one fast core beats eight slow ones, and it is the single most misunderstood spec when people shop for a VPS for Minecraft. A plan page lists vCPU counts, not CPU models, so per-core speed is something you measure after you buy (the /spark profiler command, covered later, does exactly that) — but as a rule, the budget providers’ current AMD EPYC and Ryzen-based plans are fast enough, while older shared plans can stutter.

RAM is the number that actually decides your plan. The rule Paper itself publishes: set your Java heap 1,000 to 1,500 MB below the machine’s total memory, because the heap is not the whole process — the operating system, the JVM overhead and the server’s off-heap memory need room too. A 2 GB VPS leaves you a 500 MB heap, which is not enough for a real world. Here is what works in practice:

PlayersWorldVPS RAMJava heap (-Xmx)Monthly cost
2–5 friendsVanilla or light Paper4 GB2.5 GB$5–$9
5–15 playersPaper + a few plugins8 GB6.5 GB$8–$15
15–30 playersPaper + plugins, pre-generated world16 GB10–12 GB$16–$25
30+ or a modpackHeavy modpack / network32 GB24 GB+$30+

Two things catch first-timers out. First, a modpack is not a plugin server: modpacks commonly need 6 to 8 GB of heap just to start, so a 4 GB VPS will not run one no matter how you tune it. Second, disk speed matters more than disk size. A Minecraft world is thousands of small region files, and a slow disk makes chunk loading stutter even with plenty of RAM — so pick NVMe storage, which every provider in the next section offers, and do not pay extra for a huge disk you will never fill. A typical world with a few months of play is 2 to 10 GB.

The Best VPS Plans for Minecraft in November 2026

Minecraft VPS plans compared — pricing dashboard on a laptop
8 GB is the sweet spot for most groups — check the renewal price before you buy.

Prices below were read from each provider’s own pricing page in mid-November 2026 (the same check behind our Hetzner sold-out guide). They move — Black Friday and Cyber Monday sales are live right now, and the RAM shortage pushing VPS prices up in 2026 has not gone away — so treat these as a snapshot and confirm the price on the order page before you buy.

ProviderPlanvCPU / RAM / diskPriceBest for
HostingerKVM 22 / 8 GB / 100 GB NVMe$8.79/mo, renews $14.99Best value for 5–15 players
OVHcloudVPS-12 vCores / 4 GB / 40 GB NVMeFrom $4.54/moCheapest start for 2–5 friends
ContaboCloud VPS 44 vCPU / 8 GB / 100 GB NVMe€4.40/moMost RAM per dollar in Europe
netcupVPS 500 G12.52 vCores / 4 GB / 64 GB SSD€8.26/moRock-solid uptime, EU locations
VultrCloud Compute2 / 4 GB / 80 GB NVMe$20/moHourly billing, 30+ locations
DigitalOceanBasic Droplet2 / 4 GiB / 80 GiB$24/moBest docs, hourly billing

Our pick for most groups is the 8 GB tier — Hostinger KVM 2 or Contabo Cloud VPS 4, both under $10 a month. Four gigabytes will run a small friends server, but the moment someone installs a chunk-loading farm or you add a second plugin, you will be upgrading, and an upgrade usually means a reboot and a resize. Starting at 8 GB skips that entirely. One warning: Hetzner’s cheap CX23 plan (€5.49) would have topped this table, but its cost-optimized cloud plans have shown as “currently unavailable” since June 2026, so do not plan around it.

Location matters as much as specs. Pick the data center closest to your players — a server in Frankfurt gives a Berlin player a 20 ms ping and a New York player 90 ms, and that difference is felt in every block break. If your group is split across continents, put the server near the majority and accept the lag for the rest; there is no location that is fast for everyone. Our VPS location guide walks through the trade-offs in detail.

Step 1: Spin Up the VPS and Connect Over SSH

Order the plan you picked with Ubuntu 24.04 LTS as the operating system. Ubuntu is the best-documented choice for Minecraft servers, and every command in this guide is tested against it. Once the provider emails you the root password or SSH key, connect from your own computer:

ssh root@YOUR_SERVER_IP

Accept the host key fingerprint on first connect, then update the system before you install anything. This takes a couple of minutes on a fresh VPS:

apt update && apt upgrade -y

While you are here, do the two things every new VPS needs before it touches the internet with a game port open. Our new VPS setup checklist covers the full list, but the minimum for today is: create a non-root user for the server, and switch SSH to key-only login. The Minecraft server itself should never run as root — a compromised game server running as root owns the whole machine, while one running as an unprivileged user is contained.

adduser minecraft
usermod -aG sudo minecraft
su - minecraft

From here on, run the server commands as the minecraft user, and use sudo only for the system-level steps (installing Java, opening the firewall). Keep the terminal open — everything else happens in this same session.

Step 2: Install the Right Java (25 vs 21)

Installing Java and Paper for a Minecraft server on a VPS in a terminal
Install the Java version your Minecraft release needs.

Here is the detail that breaks most outdated guides: Minecraft’s Java requirement changed. Versions 1.20.5 through 1.21.x run on Java 21, but Minecraft 26.1 and newer require Java 25. If you install the wrong one, the server refuses to start with a version error that does not explain itself well. Check which version you plan to run, then install the matching Java:

sudo apt install openjdk-25-jre-headless -y   # Minecraft 26.1 and newer
sudo apt install openjdk-21-jre-headless -y   # Minecraft 1.20.5 to 1.21.x

Verify the install before going further — this one check saves a confusing failure five steps later:

java -version

You should see openjdk version "25..." (or 21, for the older releases). If the VPS has more than one Java installed, sudo update-alternatives --config java lets you pick which one the java command uses. The -headless package is deliberate: a server has no screen, so there is no reason to install the graphical libraries the full JRE drags in.

Step 3: Download Paper and Accept the EULA

Paper is a high-performance fork of the vanilla server that runs the same game with the same client, but faster — it fixes laggy chunk handling, adds a plugin API, and ships with the spark profiler built in. For a VPS server there is no reason to run plain vanilla when Paper is a drop-in replacement. Download it from the official PaperMC site (papermc.io/downloads/paper) — pick the Minecraft version you want, download the jar, and upload it to your server. The simplest way is to download it straight onto the VPS with wget using the link from the download page, into a folder of its own:

mkdir -p ~/minecraft && cd ~/minecraft
wget -O paper.jar "PASTE_THE_DOWNLOAD_LINK_FROM_PAPERMC_HERE"

Paper’s old v2 download API was retired in 2026, so do not trust a script that builds the URL from an API call — grab the link from the download page itself. If you would rather run pure vanilla, Mojang publishes the official server jar on its download page; the steps below are identical, just with server.jar instead of paper.jar.

Before the first start, accept the EULA. Run the server once — it will create its files and then stop, complaining that you have not agreed to the license:

java -Xms2G -Xmx4G -jar paper.jar nogui

Then open the file it created and set the one line that matters:

sed -i 's/eula=false/eula=true/' eula.txt
cat eula.txt

Read the EULA before you agree to it — it is Mojang’s license, and running a public server means you are bound by it. Two practical points from it: do not charge players for gameplay advantages, and do not redistribute Mojang’s game files. A friends server with no shop is comfortably inside the rules.

Step 4: First Run and server.properties Tuning

Start the server again and let it generate the world. The first boot takes a minute or two while it creates the spawn area:

java -Xms4G -Xmx4G -jar paper.jar nogui

The two flags set the heap: -Xms is the starting size, -Xmx the maximum. Mojang’s own example uses 4 GB for both, and Paper’s rule from the sizing table applies — keep the heap 1 to 1.5 GB below the VPS’s total RAM. On an 8 GB VPS, -Xms6G -Xmx6G is the right pair. Once the console shows Done! For help, type "help", stop it with stop and tune the settings file it generated, server.properties. The defaults are safe but not tuned for a VPS:

view-distance=8
simulation-distance=6
max-players=20
online-mode=true
motd=Your Server Name Here
spawn-protection=16

What these do, in plain terms: view-distance is how far players can see in chunks — 10 is the default, and dropping it to 8 cuts chunk-loading work by a third, which is the single biggest performance win on a small VPS. simulation-distance is how far away the game simulates things like crops and mobs; 6 is plenty for a friends server. Leave online-mode=true — turning it off lets cracked (unpaid) clients join, which gets your server listed as a piracy haven and, worse, lets anyone log in as any username, including yours. spawn-protection stops non-operators from breaking blocks near spawn; set it to 0 only if you trust everyone.

One more file worth editing now: bukkit.yml (Paper creates it on first run) has a spawn-limits section for monsters, animals and ambient mobs. The defaults are fine for most servers, but if you ever see mob lag, halving the monster limit is the first knob to turn.

Step 5: Keep It Online with a systemd Service

Right now the server dies the moment you close your terminal. A systemd service fixes that: it starts the server at boot, restarts it if it crashes, and gives you clean start, stop and status commands. Create the service file as root:

sudo nano /etc/systemd/system/minecraft.service
[Unit]
Description=Minecraft Paper Server
After=network.target

[Service]
User=minecraft
WorkingDirectory=/home/minecraft/minecraft
ExecStart=/usr/bin/java -Xms6G -Xmx6G -jar paper.jar nogui
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Adjust the -Xms/-Xmx values to your VPS size and the WorkingDirectory to wherever your jar lives. Then enable and start it:

sudo systemctl daemon-reload
sudo systemctl enable minecraft
sudo systemctl start minecraft
sudo systemctl status minecraft

From now on, the console lives in the journal: sudo journalctl -u minecraft -f shows it live, and sudo systemctl restart minecraft restarts the server after any config change. To run a console command — say, making yourself an operator — use sudo systemctl stop minecraft, run the server once by hand, type op YourUsername, stop it, and start the service again. Or simpler: edit ops.json directly while the server is stopped.

Step 6: Open the Firewall — Port 25565 Only

A Minecraft server needs exactly one port open to the world: TCP 25565 for Java Edition. Everything else stays closed. If you are also running Bedrock, add UDP 19132. Using UFW, the whole job is two commands:

sudo ufw allow 22/tcp
sudo ufw allow 25565/tcp
sudo ufw enable

Open SSH (22) first or you will lock yourself out of your own server — UFW warns you about exactly this when you enable it, and the warning is worth heeding. Verify the result with sudo ufw status verbose: you should see 22 and 25565 and nothing else. If your provider has its own cloud firewall (Hetzner, OVHcloud, Vultr and DigitalOcean all do), open the same port there too — a VPS with two firewalls needs the port open in both, and a server that works from the VPS but not from your PC is almost always the cloud firewall.

Two things you should never open: RCON (port 25575) and the query port (25565 UDP). RCON is a remote console with a password that too many admins leave as the default, and exposing it is how servers get taken over. If you need remote console access, use SSH — you already have it.

Step 7: Invite Friends and Point a Domain at It

Your friends connect with your VPS’s public IP address. In Minecraft, go to Multiplayer, Add Server, and enter the IP — that is it, no port needed, because 25565 is the default. Test it yourself first from your own PC before you send the IP to anyone: if you can join, the firewall and the service are both working.

An IP address is ugly to share and it changes if you ever move VPS. A domain is better: buy a cheap domain (or use a free subdomain from your DNS provider), add an A record pointing at the server IP, and give your friends play.yourdomain.com instead of a string of numbers. If you ever run the server on a non-default port, an SRV record lets players connect without typing the port:

_minecraft._tcp.play  SRV  0 5 25565  play.yourdomain.com.

Set server-ip= (blank) in server.properties unless you have a specific reason to bind to one address — a blank value listens on all interfaces, which is what you want on a VPS with a single public IP. And before you invite the whole Discord server, add a whitelist: whitelist=true in server.properties, then add names with whitelist add PlayerName in the console. A public IP with an open Minecraft port gets scanned within hours, and a whitelist is the difference between your friends joining and a stranger griefing your spawn.

Plugins, Mods, and Performance Tuning

Paper’s plugin ecosystem is the reason most people pick Java, and a small set of well-chosen plugins transforms a bare server into a proper community world. Start with the essentials, not a 40-plugin pack — every plugin costs RAM and tick time, and a server that lags with 30 plugins usually lags because of three of them.

  • EssentialsX — homes, warps, kits and teleport commands. The baseline for any friends server.
  • LuckPerms — permissions. Lets you give moderators powers without handing them operator status.
  • CoreProtect — logs every block change, so when somebody griefs a build you can roll it back with one command.
  • WorldEdit / WorldGuard — build fast, then protect regions (spawn, shops, event areas) from breaking.
  • GeyserMC — only if you have Bedrock players. Lets phones and consoles join your Java server.

Install a plugin by dropping its jar into the plugins folder and restarting the server — that is the whole process. For mods (as opposed to plugins), you need a modded server instead of Paper: Fabric for lightweight modding, Forge for big modpacks. A modded server is a different install with a different jar, and modpacks need far more RAM — budget 6 to 8 GB of heap for the pack alone, which is why the sizing table puts modpacks at 32 GB.

When the server starts lagging, measure before you guess. Paper ships the spark profiler: run /spark profiler start --timeout 600 at your busiest hour, wait ten minutes, then read the report it links. It tells you exactly which plugin or game mechanic is eating tick time. The two tuning moves that fix most lag are the ones already covered: lower view-distance to 6–8, and pre-generate your world with a plugin like Chunky so exploring players never force the server to generate new chunks on the fly. The famous Aikar’s flags — a set of JVM tuning flags for the Java garbage collector — are worth adding to your start command once the server is stable:

java -Xms6G -Xmx6G -XX:+UseG1GC -XX:+ParallelRefProcEnabled \
  -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions \
  -XX:+DisableExplicitGC -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 \
  -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 \
  -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 \
  -XX:G1MixedGCLiveThresholdPercent=90 \
  -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 \
  -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 \
  -jar paper.jar nogui

Those flags are Paper’s documented recommendation for the G1 garbage collector, and they smooth out the micro-stutters that make a server feel laggy even when the tick rate looks fine. Put them in your systemd unit’s ExecStart line once you are happy with the basics.

Backups and Security: The Two Habits That Save You

A Minecraft world is the one file on your VPS that cannot be re-downloaded. Everything else — Java, Paper, plugins — you can reinstall in minutes. Your world, with months of your friends’ builds in it, exists in exactly one place. So back it up, automatically, from day one. The simplest version is a cron job that stops the server, copies the world folder, and starts it again:

0 4 * * * systemctl stop minecraft && tar -czf /home/minecraft/backups/world-$(date +\%F).tar.gz -C /home/minecraft/minecraft world && systemctl start minecraft

That runs at 4 AM daily, when nobody is playing. Keep the last seven days on the VPS and copy the newest backup off the server — to your own PC, to an object-storage bucket, anywhere that is not the same disk. A backup on the same VPS does not save you from a deleted VPS. Our VPS security guide covers the rest of the checklist, but the Minecraft-specific version is short:

  • SSH keys only, no password login. Bots hammer port 22 all day; a key is not guessable.
  • Install fail2ban. It bans IPs after a few failed logins, which stops the background noise.
  • Whitelist the server. An open server with no whitelist will be griefed — it is a matter of when, not if.
  • Keep Paper and Java updated. Paper ships security fixes regularly; a systemctl stop, replace the jar, systemctl start is the whole update.
  • Never expose RCON or the query port. SSH is your remote console; RCON is a liability.
  • Do not run the server as root. The minecraft user from Step 1 exists for exactly this reason.

What a Minecraft VPS Costs Per Month

The honest total for a typical friends server is smaller than most people expect, because the only recurring cost is the VPS itself. Here is the math for the 8 GB setup this guide recommends:

ItemMonthly costNotes
VPS (8 GB, Hostinger KVM 2)$8.79Sale price; renews at $14.99
VPS (8 GB, Contabo Cloud VPS 4)€4.40 (~$5)Flat rate, no renewal jump
Domain (optional)~$1A .com amortised over the year
Paper, Java, plugins$0All free and open source
Backups (off-server storage)$0–$2Free tier of most object storage covers a world
Total$5–$16Split between 5 friends: $1–$3 each

Compare that with Realms at $8 a month for vanilla-only, or a managed host at $12 to $20 for the same 8 GB. The VPS wins on price and on control, and the gap widens the longer you run the server — managed hosts charge per gigabyte forever, while a VPS price is flat. Watch the renewal price, though: Hostinger’s $8.79 is a sale price that renews at $14.99, which is why our Black Friday guide keeps warning about renewal traps. Contabo’s €4.40 has no renewal jump, which is one reason it tops the value table.

Troubleshooting: 6 Errors and the Fix

Almost every first-time setup hits one of these. They all look scary in the console and they all have a one-line fix:

ErrorWhat it meansFix
UnsupportedClassVersionErrorWrong Java version for your Minecraft releaseInstall Java 25 for 26.1+, Java 21 for 1.20.5–1.21.x
Failed to bind to portSomething already uses port 25565Another server is running — stop it, or change server-port
OutOfMemoryError: Java heap spaceHeap is bigger than the VPS RAM, or too small for the worldSet -Xmx 1–1.5 GB below total RAM; upgrade the VPS if needed
Friends see “Can’t connect to server”Firewall is blocking the portOpen 25565/tcp in UFW and the provider’s cloud firewall
You are not whitelisted on this serverWhitelist is on and the name is not listedConsole: whitelist add PlayerName
Server starts then stops instantlyUsually the EULA, or a bad server.properties lineCheck eula.txt is true; read the last lines of logs/latest.log

When nothing in the table matches, the log is the answer: logs/latest.log in your server folder records everything, and the last 20 lines before a crash almost always name the cause. Paste the error into Paper’s Discord or forum with your Java version and Paper build number, and you will usually have an answer within the hour — the Paper community is one of the most helpful in self-hosting.

FAQ

How long does it take to host a Minecraft server on a VPS?

About 30 minutes the first time: ten to order the VPS, ten to install Java and Paper, ten to tune the settings and open the firewall. The second server you set up takes ten minutes, because you already know the commands.

Can I host a Minecraft server on a free VPS?

Technically yes — Oracle’s Always Free tier gives you a small ARM instance that can run a 2–3 player Paper server — but it is a poor fit. The free tier is oversubscribed, the instance can be reclaimed, and 1 GB of RAM is below Paper’s own sizing rule. Our free VPS guide explains the catches; for a real friends server, the $5–$9 paid plans in this guide are the honest minimum.

Do I need a domain to host a Minecraft server?

No. Your friends can join with the VPS IP address directly. A domain is a convenience — easier to share, and it survives moving to a new VPS — but it is not required.

How many players can a 4 GB VPS handle?

Two to five players on vanilla or light Paper, comfortably. Past that, chunk loading and plugins start fighting for the same 2.5 GB heap. If your group is growing, an 8 GB plan costs only a few dollars more and removes the ceiling.

Can Bedrock players join my Java server?

Yes, with the GeyserMC plugin on Paper. Bedrock players connect to your Java server with their phone or console client and play in the same world. It works well for building and survival; some Java-only mechanics (like off-hand shields behaving identically) differ slightly.

Is it legal to host a Minecraft server on a VPS?

Yes — running a server for yourself and your friends is what the game is designed for, and you agree to Mojang’s EULA when you set eula=true. What the EULA forbids is selling gameplay advantages (pay-to-win shops) and charging for access to Mojang’s game itself.

Will my VPS provider mind me running a game server?

No. Running a game server is a normal, allowed use of a VPS — it is a long-running application on a machine you rent, exactly like a website or an API. The only thing providers care about is abuse: do not use the server for DDoS attacks, crypto mining or spam, and do not run a public server with no whitelist and then complain about the traffic.

The Bottom Line

Learning to host a Minecraft server on a VPS is one of the best-value skills in self-hosting: for $5 to $9 a month you get a world that never sleeps, plugins your friends will actually notice, and a server you can move anywhere. The setup is 30 minutes of copy-paste commands, and the ongoing work is a daily backup and an occasional Paper update.

Start with the 8 GB tier — Hostinger KVM 2 or Contabo Cloud VPS 4 — install Java 25 (or 21 for the older releases), run Paper, open port 25565, and whitelist your friends before you share the IP. Do the backup cron job on day one, not “later”, because the only Minecraft disaster that cannot be fixed is a lost world. And when your group outgrows the plan, upgrading a VPS is a reboot, not a rebuild — your world is a folder, and it goes where you go.

Leave a Comment

Your email address will not be published. Required fields are marked *