Requirements
Getting the hardware and software requirements right before you set up a Minecraft server prevents the performance problems you would otherwise run into later. The table below shows the recommended minimum resources by player count:
| Player Count | RAM | CPU | Disk | Bandwidth |
|---|---|---|---|---|
| 1-10 | 2 GB | 2 vCPU | 20 GB SSD | 100 Mbps |
| 10-30 | 4 GB | 2-4 vCPU | 40 GB SSD | 200 Mbps |
| 30-60 | 6-8 GB | 4 vCPU | 60 GB NVMe | 500 Mbps |
| 60-100 | 10-12 GB | 6 vCPU | 80 GB NVMe | 1 Gbps |
| 100+ | 16+ GB | 8+ vCPU | 120+ GB NVMe | 1 Gbps |
Choosing an Operating System
Linux distributions are recommended for a Minecraft server. A Windows server works too, but Linux should be preferred for performance and resource management.
| Distribution | Version | Note |
|---|---|---|
| Ubuntu | 22.04 / 24.04 LTS | The most widespread, broad community support |
| Debian | 12 (Bookworm) | Stable, minimal |
| Rocky Linux | 9 | RHEL-based, for enterprise environments |
| AlmaLinux | 9 | CentOS alternative |
Choosing a VPS
Shared hosting is not enough for a Minecraft server. You need at least a VPS (Virtual Private Server). What to look at when picking a VPS:
- Single-core CPU performance — Minecraft largely uses a single core, so a high clock speed matters
- NVMe SSD — Critical for chunk loading and world saving speed
- DDoS protection — Game servers are frequently targeted
- Location — Pick a datacenter close to your players (Europe for Turkey)
- On-demand scaling — You should be able to upgrade RAM/CPU as your needs grow
Our recommendation: start with a 4 GB RAM / 4 vCPU plan. It carries 30-50 players comfortably and can be upgraded when needed.
SSH Connection
You will connect to your VPS over the SSH (Secure Shell) protocol. This is remote terminal access that lets you run commands on the server.
Connecting from Windows
Windows 10/11 ships with a built-in OpenSSH client. Open Command Prompt or PowerShell:
ssh root@SERVER_IP_ADDRESSAlternatively you can use PuTTY: type the IP address into the Host Name field, leave Port at 22 and click Open.
Connecting from Mac / Linux
Open Terminal and run the SSH command directly:
ssh root@SERVER_IP_ADDRESSSSH Key Authentication (Recommended)
Using an SSH key pair instead of a password is both more secure and more practical:
# 1. Create a key on your local machine
ssh-keygen -t ed25519 -C "minecraft-server"
# 2. Copy the key to the server
ssh-copy-id root@SERVER_IP_ADDRESS
# 3. You can now connect without a password
ssh root@SERVER_IP_ADDRESSInstalling Java
A Minecraft server runs on Java. Which Java version you install depends on your Minecraft version:
| Minecraft Version | Java Required | Package Name (Ubuntu/Debian) |
|---|---|---|
| 1.20.5 and above | Java 21 | openjdk-21-jre-headless |
| 1.17.1 – 1.20.4 | Java 17 | openjdk-17-jre-headless |
| 1.16.5 and below | Java 8-16 | openjdk-16-jre-headless |
Ubuntu / Debian Installation
# Update the package list
sudo apt update && sudo apt upgrade -y
# Install Java 21
sudo apt install openjdk-21-jre-headless -y
# Verify the installation
java -versionExpected output: you should see a line such as openjdk version "21.x.x".
Multiple Java Versions
If more than one Java version is present on the server, you can pick the default:
sudo update-alternatives --config javaCreating a User
Running the Minecraft server as the root user is a serious security risk. If a hole is found in the server software, the attacker gains full access to the system.
# Create a new user named minecraft
sudo adduser minecraft
# Switch to the user
sudo su - minecraft
# Create the server directory
mkdir -p ~/server && cd ~/serverWe will do all the remaining steps as the minecraft user. For commands that need sudo, you can briefly switch to root and come back.
Choosing the Server Software
Minecraft server software comes in flavours that serve different purposes. Which one you pick depends on your needs:
| Software | Type | Plugin Support | Performance | Description |
|---|---|---|---|---|
| Vanilla | Official | None | Low | Mojang's official server, a plain experience |
| CraftBukkit | Modified | Bukkit API | Medium | The first plugin-capable server, no longer in use |
| Spigot | Modified | Bukkit + Spigot API | Good | The optimized version of CraftBukkit |
| Paper | Modified | Bukkit + Spigot + Paper API | Very Good | A Spigot fork, the most common choice |
| Purpur | Modified | All of the Paper API plus extras | Very Good | A Paper fork, extra configuration options |
| Fabric | Modded | Fabric Mods | Good | Lightweight mod loader, for technical players |
| Forge | Modded | Forge Mods | Medium | The standard for heavy modpacks |
Installing Paper
Paper is an optimized, Spigot-based Minecraft server software developed by the PaperMC team. It is compatible with thousands of Bukkit/Spigot plugins.
Downloading the Paper JAR
# Switch to the minecraft user
sudo su - minecraft
cd ~/server
# Download the latest Paper 1.21.4 build
wget https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/latest/downloads/paper-1.21.4.jarAccepting the EULA
The first time a Minecraft server is started, the Mojang EULA (End User License Agreement) has to be accepted:
# First launch — the EULA file and the configuration files are created
java -Xms2G -Xmx2G -jar paper-1.21.4.jar nogui
# The server will stop with an EULA error
# Edit the eula.txt file
echo "eula=true" > eula.txtDirectory Structure
After the first launch, the following files and folders are created in the server directory:
~/server/
├── paper-1.21.4.jar # Server JAR file
├── eula.txt # EULA acceptance file
├── server.properties # Main configuration
├── bukkit.yml # Bukkit settings
├── spigot.yml # Spigot settings
├── config/
│ ├── paper-global.yml # Paper global settings
│ └── paper-world-defaults.yml # World settings
├── plugins/ # Plugin folder
├── world/ # Overworld
├── world_nether/ # The Nether
├── world_the_end/ # The End
├── logs/ # Server logs
└── cache/ # Cache filesStartup Script
Instead of typing the long Java command every time, create a startup script. This script contains JVM parameters optimized with Aikar's Flags:
#!/bin/bash
# start.sh — Minecraft Paper Server Startup Script
JAR="paper-1.21.4.jar"
MIN_RAM="4G"
MAX_RAM="4G"
java -Xms${MIN_RAM} -Xmx${MAX_RAM} \
-XX:+UseG1GC \
-XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC \
-XX:+AlwaysPreTouch \
-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 ${JAR} --noguiMake the script executable:
chmod +x start.shscreen vs systemd Comparison
There are two common ways to run the server in the background:
| Feature | screen | systemd |
|---|---|---|
| Setup difficulty | Easy | Medium |
| Console access | screen -r minecraft | journalctl -u minecraft |
| Auto start | None (needs crontab) | Built in (enable) |
| Restart after a crash | None | Restart=on-failure |
| Log management | Manual | Automatic via journald |
| Recommended use | Testing / development | Production servers |
Running with screen
# Install screen (if it is not installed)
sudo apt install screen -y
# Create a new screen session and start the server
screen -S minecraft ./start.sh
# To leave screen: Ctrl+A then D
# To come back:
screen -r minecraft
# List active screen sessions
screen -lssystemd Service
With systemd your Minecraft server runs as a system service: it gives you automatic startup, restart after a crash and centralized log management.
Creating the Service File
# /etc/systemd/system/minecraft.service
[Unit]
Description=Minecraft Paper Server
After=network.target
Wants=network-online.target
[Service]
User=minecraft
Group=minecraft
WorkingDirectory=/home/minecraft/server
ExecStart=/home/minecraft/server/start.sh
ExecStop=/usr/bin/screen -S minecraft -X stuff "stop\n"
Restart=on-failure
RestartSec=10
StandardInput=null
StandardOutput=journal
StandardError=journal
SyslogIdentifier=minecraft
[Install]
WantedBy=multi-user.targetTo create this file:
sudo nano /etc/systemd/system/minecraft.serviceEnabling and Starting the Service
# Reload systemd
sudo systemctl daemon-reload
# Enable the service (so it starts automatically at boot)
sudo systemctl enable minecraft
# Start the service
sudo systemctl start minecraft
# Check the status
sudo systemctl status minecraftCommonly Used systemd Commands
| Command | Description |
|---|---|
| <code>systemctl start minecraft</code> | Start the server |
| <code>systemctl stop minecraft</code> | Stop the server |
| <code>systemctl restart minecraft</code> | Restart |
| <code>systemctl status minecraft</code> | Show status information |
| <code>journalctl -u minecraft -f</code> | Follow the log live |
| <code>journalctl -u minecraft --since '10 min ago'</code> | Logs from the last 10 minutes |
server.properties Settings
The server.properties file is the main configuration file of a Minecraft server. The settings that matter most for performance and gameplay are explained in detail below:
| Setting | Default | Recommended | Description |
|---|---|---|---|
| <code>server-port</code> | 25565 | 25565 | The TCP/UDP port the server listens on |
| <code>max-players</code> | 20 | 50 | Maximum number of concurrent players |
| <code>view-distance</code> | 10 | 7 | Chunk radius sent to the player (lower = less bandwidth) |
| <code>simulation-distance</code> | 10 | 5 | Chunk radius actively ticked (lower = less CPU) |
| <code>online-mode</code> | true | true | Mojang account verification (false = cracked) |
| <code>motd</code> | A Minecraft Server | Customize it | The description shown in the server list |
| <code>difficulty</code> | easy | normal | Game difficulty (peaceful/easy/normal/hard) |
| <code>gamemode</code> | survival | survival | Default game mode |
| <code>spawn-protection</code> | 16 | 16 | Protection radius around the spawn point (blocks) |
| <code>enable-command-block</code> | false | false | Command block use (off unless you need it) |
| <code>max-tick-time</code> | 60000 | 60000 | Watchdog timeout (ms) — server freeze detection |
| <code>network-compression-threshold</code> | 256 | 256 | Packet compression threshold (bytes) |
# Recommended server.properties configuration
server-port=25565
max-players=50
view-distance=7
simulation-distance=5
online-mode=true
difficulty=normal
gamemode=survival
motd=\u00a7b\u00a7lKEYDAL \u00a7fMinecraft Server
spawn-protection=16
enable-command-block=false
max-tick-time=60000
network-compression-threshold=256
white-list=false
enforce-whitelist=false
allow-flight=false
spawn-npcs=true
spawn-animals=true
spawn-monsters=true
pvp=trueFirewall Settings
For the security of your server you should only open the ports you actually need. A simple, effective firewall configuration with UFW (Uncomplicated Firewall):
# Install UFW (if it is not installed)
sudo apt install ufw -y
# SSH access (open this FIRST, without fail!)
sudo ufw allow 22/tcp
# Minecraft server port
sudo ufw allow 25565/tcp
# Enable the firewall
sudo ufw enable
# Check the status
sudo ufw status verboseRCON Port (Optional)
RCON gives you remote access to the server console. If you are going to use it:
# Open the RCON port (only from a specific IP)
sudo ufw allow from YOUR_LOCAL_IP_ADDRESS to any port 25575 proto tcp
# RCON settings in server.properties:
# enable-rcon=true
# rcon.port=25575
# rcon.password=A_STRONG_PASSWORDPort Summary
| Port | Protocol | Service | Status |
|---|---|---|---|
| 22 | TCP | SSH | Open (required) |
| 25565 | TCP/UDP | Minecraft | Open (required) |
| 25575 | TCP | RCON | Optional (restricted) |
| All other ports | — | — | Closed (default) |
First Connection Test
If the server is running and the firewall is configured, it is time to connect:
- Open Minecraft Java Edition
- Click Multiplayer > Add Server
- Type
SERVER_IP_ADDRESS:25565into the Server Address field (if the port is 25565, the:25565part is optional) - Click Done and then Join Server
Connection Problems and Fixes
| Problem | Possible Cause | Fix |
|---|---|---|
| Connection timed out | Firewall port closed | Check port 25565 with <code>ufw status</code> |
| Connection refused | The server is not running | Check <code>systemctl status minecraft</code> |
| io.netty.channel... error | Version mismatch | Your Minecraft client version must match the server version |
| Authentication failed | online-mode problem | Log in with a genuine Minecraft account |
| java.net.UnknownHostException | DNS could not resolve | Try the numeric IP directly instead of a hostname |
| Internal Exception | Corrupt packet / plugin error | Inspect the server logs (<code>logs/latest.log</code>) |
Checking from the Server Console
If the connection succeeded you will see the player join message in the server console. Basic console commands:
# Grant OP to a player
op PlayerName
# Whitelist management
whitelist add PlayerName
whitelist on
# Stop the server safely
stopNext Steps
Your server is running — congratulations! Now it is time for optimization and plugin installation. Continue with the guides below: