A Minecraft server is one of the few game workloads where single-thread CPU speed still decides performance, so renting a full dedicated box and configuring it properly beats any shared host for vanilla, modded, and large multiplayer servers. This walkthrough covers the full path: picking an OS, installing Java, downloading and configuring the server, running it as a service that survives crashes, opening the right ports, and sizing the hardware to your player count.
Before you start: what you need
- A dedicated server with at least 4 cores and 8 GB of RAM (more below).
- Ubuntu 22.04 or 24.04 LTS — the safest choice for Minecraft hosting.
- Java 21 for Minecraft 1.20.5+ (Temurin or OpenJDK builds both work).
- A static IPv4 address; your provider assigns one with the box.
- An SSH client; everything here happens from the command line.
Step 1 — create a dedicated user and install Java
Run the server as an unprivileged user, never root. Create a minecraft user, then install Java 21:
sudo adduser minecraft
sudo apt update && sudo apt install -y openjdk-21-jre-headless
java -versionConfirm the output reports Java 21. Older Java versions will refuse to start current server jars, and newer preview builds can introduce GC regressions, so pin the LTS release.
Step 2 — download the server jar
Download the official server jar from Mojang’s version manifest rather than random mirrors. For the latest release the URL pattern is:
wget https://piston-data.mojang.com/v1/objects/<hash>/server.jarThe hash changes per version — fetch it from the manifest at piston-meta.mojang.com (version_manifest_v2.json) or use a helper script that resolves it automatically. Create a world directory, accept the EULA in eula.txt (eula=true), and do a first run to generate server.properties:
mkdir /opt/minecraft && cd /opt/minecraft
java -Xmx2G -jar server.jar nogui # first run generates files, then exitsStep 3 — memory flags and start script
Java edition is garbage-collection bound, so JVM flags matter more than raw RAM. A solid start script for an 8–12 GB server:
java -Xms4G -Xmx8G -XX:+UseG1GC -XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC -jar server.jar noguiAikar’s flags are the community standard for 1.17+. Set Xmx to roughly half the machine’s RAM for a single server and leave headroom for the OS, world pre-generation, and backups. On a box with 32 GB you can comfortably run two or three servers by splitting the memory and pinning each to its own core set.
Step 4 — run it as a systemd service
A systemd unit gives you automatic restarts on crash and clean start/stop on boot. Create /etc/systemd/system/minecraft.service with the start script as ExecStart, set Restart=on-failure, and run systemctl enable minecraft. This is the difference between a server that is down at 3 a.m. and one your players never notice failing.
Step 5 — firewall and ports
Java edition uses TCP 25565 (plus UDP for the newer transfer/query features); Bedrock dedicated servers use UDP 19132. On Ubuntu, allow only what you need:
sudo ufw allow 25565/tcp
sudo ufw allow 19132/udpIf you run multiple servers on one box, give each its own port and bind them to different cores — a dedicated machine is exactly where multi-instance setups make sense.
Sizing by player count
These baselines assume vanilla or lightly modded Java edition with default view-distance. Modded packs multiply every number in the RAM column.
| Players | CPU | RAM | Notes |
|---|---|---|---|
| Up to 10 | 2–4 cores (high clock) | 4–6 GB | view-distance 8 |
| Up to 25 | 4–6 cores | 8–12 GB | pre-generate the world |
| Up to 50 | 6–8 cores | 16–24 GB | tune simulation-distance |
| 100+ / modded | 8+ cores | 32 GB+ | separate proxy or multi-instance |
Step 6 — pre-generate the world and tune
Chunk generation is the single biggest source of lag on a new server. Pre-generate a radius around spawn (plugins like Chunky make this a one-command job), then set view-distance and simulation-distance in server.properties to values your CPU can sustain. Watch the GC logs: if pauses exceed 200 ms regularly, raise Xmx or reduce view-distance.
Step 7 — backups
Copy the world folder on a schedule — a cron job with tar plus an off-server destination beats any plugin. Stop-and-copy is safest: with the systemd service, a short stop, rsync, and start loop keeps the world consistent without corrupted region files.
Bottom line
A Minecraft server on dedicated hardware is a solved problem: unprivileged user, current Java, tuned JVM flags, systemd supervision, correct ports, and pre-generated chunks. Do those five things and the hardware will outlast your player base’s interest. If you are still choosing a provider, compare dedicated server plans in our provider table and pick one with a current-generation CPU — single-thread speed is the spec that matters most for Minecraft.
Need dedicated hardware that can run this workload without breaking a sweat? InterServer’s dedicated server lineup offers current-generation CPUs, NVMe storage, and always-on DDoS protection — check InterServer dedicated servers here.



Leave a Reply
You must be logged in to post a comment.