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 CountRAMCPUDiskBandwidth
1-102 GB2 vCPU20 GB SSD100 Mbps
10-304 GB2-4 vCPU40 GB SSD200 Mbps
30-606-8 GB4 vCPU60 GB NVMe500 Mbps
60-10010-12 GB6 vCPU80 GB NVMe1 Gbps
100+16+ GB8+ vCPU120+ GB NVMe1 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.

DistributionVersionNote
Ubuntu22.04 / 24.04 LTSThe most widespread, broad community support
Debian12 (Bookworm)Stable, minimal
Rocky Linux9RHEL-based, for enterprise environments
AlmaLinux9CentOS 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_ADDRESS

Alternatively 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_ADDRESS

SSH Key Authentication (Recommended)

Using an SSH key pair instead of a password is both more secure and more practical:

bash
# 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_ADDRESS

Installing Java

A Minecraft server runs on Java. Which Java version you install depends on your Minecraft version:

Minecraft VersionJava RequiredPackage Name (Ubuntu/Debian)
1.20.5 and aboveJava 21openjdk-21-jre-headless
1.17.1 – 1.20.4Java 17openjdk-17-jre-headless
1.16.5 and belowJava 8-16openjdk-16-jre-headless

Ubuntu / Debian Installation

bash
# 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 -version

Expected 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 java

Creating 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.

bash
# Create a new user named minecraft
sudo adduser minecraft

# Switch to the user
sudo su - minecraft

# Create the server directory
mkdir -p ~/server && cd ~/server

We 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:

SoftwareTypePlugin SupportPerformanceDescription
VanillaOfficialNoneLowMojang's official server, a plain experience
CraftBukkitModifiedBukkit APIMediumThe first plugin-capable server, no longer in use
SpigotModifiedBukkit + Spigot APIGoodThe optimized version of CraftBukkit
PaperModifiedBukkit + Spigot + Paper APIVery GoodA Spigot fork, the most common choice
PurpurModifiedAll of the Paper API plus extrasVery GoodA Paper fork, extra configuration options
FabricModdedFabric ModsGoodLightweight mod loader, for technical players
ForgeModdedForge ModsMediumThe 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

bash
# 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.jar

Accepting the EULA

The first time a Minecraft server is started, the Mojang EULA (End User License Agreement) has to be accepted:

bash
# 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.txt

Directory Structure

After the first launch, the following files and folders are created in the server directory:

text
~/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 files

Startup Script

Instead of typing the long Java command every time, create a startup script. This script contains JVM parameters optimized with Aikar's Flags:

bash
#!/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} --nogui

Make the script executable:

chmod +x start.sh

screen vs systemd Comparison

There are two common ways to run the server in the background:

Featurescreensystemd
Setup difficultyEasyMedium
Console accessscreen -r minecraftjournalctl -u minecraft
Auto startNone (needs crontab)Built in (enable)
Restart after a crashNoneRestart=on-failure
Log managementManualAutomatic via journald
Recommended useTesting / developmentProduction servers

Running with screen

bash
# 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 -ls

systemd 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

ini
# /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.target

To create this file:

sudo nano /etc/systemd/system/minecraft.service

Enabling and Starting the Service

bash
# 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 minecraft

Commonly Used systemd Commands

CommandDescription
<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:

SettingDefaultRecommendedDescription
<code>server-port</code>2556525565The TCP/UDP port the server listens on
<code>max-players</code>2050Maximum number of concurrent players
<code>view-distance</code>107Chunk radius sent to the player (lower = less bandwidth)
<code>simulation-distance</code>105Chunk radius actively ticked (lower = less CPU)
<code>online-mode</code>truetrueMojang account verification (false = cracked)
<code>motd</code>A Minecraft ServerCustomize itThe description shown in the server list
<code>difficulty</code>easynormalGame difficulty (peaceful/easy/normal/hard)
<code>gamemode</code>survivalsurvivalDefault game mode
<code>spawn-protection</code>1616Protection radius around the spawn point (blocks)
<code>enable-command-block</code>falsefalseCommand block use (off unless you need it)
<code>max-tick-time</code>6000060000Watchdog timeout (ms) — server freeze detection
<code>network-compression-threshold</code>256256Packet compression threshold (bytes)
properties
# 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=true

Firewall 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):

bash
# 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 verbose

RCON Port (Optional)

RCON gives you remote access to the server console. If you are going to use it:

bash
# 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_PASSWORD

Port Summary

PortProtocolServiceStatus
22TCPSSHOpen (required)
25565TCP/UDPMinecraftOpen (required)
25575TCPRCONOptional (restricted)
All other portsClosed (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:25565 into the Server Address field (if the port is 25565, the :25565 part is optional)
  • Click Done and then Join Server

Connection Problems and Fixes

ProblemPossible CauseFix
Connection timed outFirewall port closedCheck port 25565 with <code>ufw status</code>
Connection refusedThe server is not runningCheck <code>systemctl status minecraft</code>
io.netty.channel... errorVersion mismatchYour Minecraft client version must match the server version
Authentication failedonline-mode problemLog in with a genuine Minecraft account
java.net.UnknownHostExceptionDNS could not resolveTry the numeric IP directly instead of a hostname
Internal ExceptionCorrupt packet / plugin errorInspect 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:

text
# Grant OP to a player
op PlayerName

# Whitelist management
whitelist add PlayerName
whitelist on

# Stop the server safely
stop

Next Steps

Your server is running — congratulations! Now it is time for optimization and plugin installation. Continue with the guides below: