Minecraft Server Configuration on Linux: Complete Setup Guide

Introduction

Minecraft remains one of the most popular games worldwide, with millions of active players creating, exploring, and surviving in blocky virtual worlds. While many players enjoy joining public servers, hosting your own Minecraft server offers complete control over gameplay, mods, player management, and server rules. Running a Minecraft server on Linux provides excellent performance, stability, and cost-effectiveness compared to other hosting solutions.

This comprehensive guide walks you through setting up a production-ready Minecraft server on Linux, covering everything from initial system requirements to advanced optimization techniques. Whether you're hosting a small server for friends or a larger community server, you'll learn best practices for deployment, security, backup strategies, and performance tuning.

Linux servers offer several advantages for Minecraft hosting: lower resource overhead compared to Windows, superior stability for 24/7 operation, powerful command-line management tools, and the ability to automate maintenance tasks. By the end of this guide, you'll have a fully functional Minecraft server with automated backups, systemd service management, and optimized performance settings.

Use Case Overview

Why Host Your Own Minecraft Server?

Hosting your own Minecraft server provides numerous benefits over playing on public servers or using commercial hosting services:

Complete Control: You decide which game version to run, which mods or plugins to install, and how to configure gameplay rules. There's no waiting for server owners to update or add features you want.

Privacy and Security: Your server data remains under your control. You manage who has access, what permissions they have, and how player data is handled.

Cost-Effectiveness: For groups of friends or small communities, running a VPS with a Minecraft server often costs less than commercial Minecraft hosting, especially when factoring in better hardware specifications.

Learning Experience: Setting up and maintaining a Minecraft server teaches valuable Linux administration skills, including process management, network configuration, backup strategies, and performance optimization.

Customization: From custom world generators to extensive mod packs, you have complete freedom to create unique gameplay experiences impossible on commercial servers.

Common Deployment Scenarios

Personal Server for Friends: A small server (2-10 players) running vanilla Minecraft or light mods, typically on a modest VPS with 2-4GB RAM.

Community Server: Medium-sized servers (20-50 players) with plugins for grief protection, economy systems, and custom gameplay, requiring 4-8GB RAM and dedicated CPU resources.

Modded Server: Heavily modded servers running mod packs like FeedTheBeast or custom mod collections, often requiring 8-16GB RAM and powerful processors.

Network Server: Multiple interconnected Minecraft servers using BungeeCord or Velocity, allowing players to seamlessly move between different game modes and worlds.

Development Server: Testing environment for plugin developers or server administrators to experiment with configurations before deploying to production.

Performance Considerations

Minecraft server performance depends on several factors:

  • Player Count: Each connected player increases CPU and memory usage
  • World Size: Larger explored worlds require more disk I/O and memory
  • Render Distance: Higher view distances dramatically increase CPU and memory requirements
  • Mods and Plugins: Each addition increases resource consumption
  • TPS (Ticks Per Second): Maintaining 20 TPS is critical for smooth gameplay

Requirements

System Requirements

Minimum Requirements for Vanilla Minecraft (5-10 players):

  • CPU: 2 cores at 2.5+ GHz (Intel Core i3/AMD Ryzen 3 equivalent)
  • RAM: 2GB dedicated to Minecraft, 4GB total system RAM
  • Storage: 10GB SSD (20GB recommended for world backups)
  • Network: 10 Mbps upload speed
  • OS: Ubuntu 20.04/22.04, Debian 11/12, CentOS 8, Rocky Linux 8/9

Recommended Requirements for Modded Server (10-20 players):

  • CPU: 4 cores at 3.0+ GHz (Intel Core i5/AMD Ryzen 5 equivalent)
  • RAM: 6-8GB dedicated to Minecraft, 10GB total system RAM
  • Storage: 30GB SSD with fast read/write speeds
  • Network: 50 Mbps upload speed
  • OS: Ubuntu 22.04 LTS (recommended for best compatibility)

Performance Server (50+ players or heavy mod packs):

  • CPU: 6+ cores at 3.5+ GHz (Intel Core i7/AMD Ryzen 7 equivalent)
  • RAM: 12-16GB dedicated to Minecraft, 20GB total system RAM
  • Storage: 50GB+ NVMe SSD
  • Network: 100+ Mbps upload speed with low latency
  • OS: Ubuntu 22.04 LTS with custom kernel optimizations

Software Requirements

Java Runtime Environment: Minecraft 1.17+ requires Java 17 or newer. Older versions may require Java 8 or 11. OpenJDK is recommended for Linux servers.

Build Tools (optional, for Paper/Spigot): git, make, and development libraries if compiling server software from source.

Screen or tmux: Terminal multiplexer for running the server in detached sessions.

Backup Tools: rsync, tar, or dedicated backup solutions like BorgBackup for world data protection.

Network Requirements

Port Configuration: Minecraft servers use port 25565 by default (TCP). RCON (remote console) uses port 25575. Query protocol uses port 25565 UDP.

Firewall Settings: Ensure your Linux firewall (iptables, ufw, firewalld) allows incoming connections on required ports.

Domain Name (optional): While not required, a domain name or subdomain pointing to your server IP improves accessibility for players.

Prerequisites Knowledge

  • Basic Linux command-line navigation and file editing
  • Understanding of SSH connections and terminal usage
  • Familiarity with file permissions and user management
  • Basic networking concepts (IP addresses, ports, firewalls)

Step-by-Step Setup

Step 1: Update System and Install Java

First, connect to your Linux server via SSH and update the system packages:

# For Ubuntu/Debian
sudo apt update && sudo apt upgrade -y

# For CentOS/Rocky Linux
sudo dnf update -y

Install OpenJDK 17 (required for Minecraft 1.17+):

# Ubuntu/Debian
sudo apt install openjdk-17-jre-headless -y

# CentOS/Rocky Linux
sudo dnf install java-17-openjdk-headless -y

Verify Java installation:

java -version

You should see output indicating OpenJDK 17 or newer is installed.

Step 2: Create Dedicated Minecraft User

Running Minecraft as root is a security risk. Create a dedicated user:

sudo useradd -m -r -s /bin/bash minecraft

This creates a system user named "minecraft" with a home directory at /home/minecraft.

Step 3: Create Server Directory Structure

Switch to the minecraft user and create necessary directories:

sudo su - minecraft
mkdir -p ~/server
mkdir -p ~/backups
cd ~/server

Step 4: Download Minecraft Server Software

You have several options for server software:

Option A: Vanilla Minecraft Server (official, unmodified):

Visit the official Minecraft website to get the latest server download URL, or use:

wget https://launcher.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar -O minecraft_server.jar

(Note: This URL is an example. Visit minecraft.net/download/server for the current version.)

Option B: Paper Server (recommended for performance and plugin support):

wget https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/496/downloads/paper-1.20.4-496.jar -O paper.jar

(Visit papermc.io/downloads for the latest version.)

Option C: Fabric Server (for Fabric mods):

wget https://meta.fabricmc.net/v2/versions/loader/1.20.4/0.15.6/1.0.0/server/jar -O fabric-server.jar

Option D: Forge Server (for Forge mods):

Download the Forge installer from files.minecraftforge.net, then run:

java -jar forge-installer.jar --installServer

For this guide, we'll use Paper server as it offers excellent performance and plugin compatibility.

Step 5: Accept EULA and Initial Server Start

Before starting the server, you must accept Minecraft's End User License Agreement:

echo "eula=true" > eula.txt

Start the server for the first time to generate configuration files:

java -Xms2G -Xmx2G -jar paper.jar --nogui

This command allocates 2GB of RAM to the server. Adjust -Xms (minimum) and -Xmx (maximum) based on your available RAM.

The server will generate world files and configuration files, then start accepting connections. This initial start may take a few minutes.

Step 6: Stop the Server and Configure Basic Settings

Stop the server by typing stop in the console.

Edit the main configuration file:

nano server.properties

Key settings to configure:

# Server name and description
motd=My Awesome Minecraft Server

# Gameplay settings
gamemode=survival
difficulty=normal
max-players=20
view-distance=10
simulation-distance=10

# World settings
level-name=world
level-seed=
generate-structures=true
spawn-protection=16

# Performance settings
max-tick-time=60000
max-world-size=29999984

# Network settings
server-port=25565
server-ip=
online-mode=true
enable-query=true
enable-rcon=false

# Security
white-list=false
enforce-whitelist=false
pvp=true

Save and exit (Ctrl+X, then Y, then Enter).

Step 7: Create Server Start Script

Create a convenient startup script:

nano start.sh

Add the following content:

#!/bin/bash

# Minecraft Server Start Script
# Adjust memory allocation based on your server's RAM

java -Xms4G -Xmx4G \
     -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 \
     -Dusing.aikars.flags=https://mcflags.emc.gs \
     -Daikars.new.flags=true \
     -jar paper.jar --nogui

Make the script executable:

chmod +x start.sh

These JVM flags (known as Aikar's flags) significantly improve Minecraft server performance by optimizing garbage collection.

Step 8: Set Up Systemd Service

Exit from the minecraft user back to your main user:

exit

Create a systemd service file:

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

Add the following content:

[Unit]
Description=Minecraft Server
After=network.target

[Service]
Type=simple
User=minecraft
WorkingDirectory=/home/minecraft/server
ExecStart=/bin/bash /home/minecraft/server/start.sh
Restart=on-failure
RestartSec=10

# Process management
StandardInput=null
StandardOutput=journal
StandardError=journal

# Security settings
NoNewPrivileges=true
PrivateTmp=true

[Install]
WantedBy=multi-user.target

Reload systemd and enable the service:

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

Check service status:

sudo systemctl status minecraft

View server logs:

sudo journalctl -u minecraft -f

Step 9: Configure Firewall

Allow Minecraft port through the firewall:

# UFW (Ubuntu/Debian)
sudo ufw allow 25565/tcp
sudo ufw allow 25565/udp

# Firewalld (CentOS/Rocky Linux)
sudo firewall-cmd --permanent --add-port=25565/tcp
sudo firewall-cmd --permanent --add-port=25565/udp
sudo firewall-cmd --reload

Step 10: Connect to Your Server

Your server is now running! Connect using the Minecraft client:

  1. Launch Minecraft (Java Edition)
  2. Click "Multiplayer"
  3. Click "Add Server"
  4. Enter your server IP address or domain name
  5. Click "Done" and then "Join Server"

Configuration

Server Properties Fine-Tuning

The server.properties file controls most server behavior. Important settings explained:

Performance Settings:

# View distance affects how far players can see
# Lower values improve performance but reduce visibility
view-distance=10

# Simulation distance controls how far from players entities are active
# Setting this lower than view-distance improves performance
simulation-distance=8

# Network compression threshold (bytes)
# Lower values reduce bandwidth, higher values reduce CPU usage
network-compression-threshold=256

# Entity broadcast range percentage
# Reducing this improves performance but entities appear/disappear closer to players
entity-broadcast-range-percentage=100

Gameplay Modifications:

# Spawn protection radius (blocks from spawn)
spawn-protection=0

# Allow Nether dimension
allow-nether=true

# Allow End dimension
allow-end=true

# Enable command blocks
enable-command-block=true

# Announce player achievements
announce-player-achievements=true

# Player idle timeout (minutes, 0 to disable)
player-idle-timeout=0

Paper Configuration

Paper server provides additional configuration files in the config directory.

paper-global.yml - Global server settings:

# Chunk loading optimization
chunk-loading-advanced:
  auto-config-send-distance: true
  player-max-concurrent-chunk-loads: 4.0

# Entity optimizations
entities:
  spawning:
    all-chunks-are-slime-chunks: false
    alt-item-despawn-rate:
      enabled: true
    count-all-mobs-for-spawning: false

# Performance optimizations
timings:
  enabled: true
  verbose: true

paper-world-default.yml - World-specific settings:

# Anti-cheat
anticheat:
  anti-xray:
    enabled: true
    engine-mode: 2

# Hopper optimizations
hopper:
  cooldown-when-full: true
  disable-move-event: false

# Spawn limits
spawn-limits:
  monster: 70
  creature: 10
  ambient: 15
  water-creature: 5
  water-ambient: 20

Plugin Installation

Paper/Spigot servers support plugins that extend functionality. Popular plugins include:

Essential Plugins:

  • EssentialsX: Commands, economy, homes, warps
  • LuckPerms: Advanced permissions management
  • WorldEdit: World editing and manipulation
  • WorldGuard: Region protection and flags
  • Vault: Economy API for other plugins

To install plugins:

cd /home/minecraft/server/plugins
wget [plugin-download-url] -O PluginName.jar

Restart the server to load new plugins:

sudo systemctl restart minecraft

Operator and Whitelist Setup

Grant operator privileges (admin powers):

# Connect to server console via screen/tmux or use RCON
sudo su - minecraft
screen -r minecraft
# Then in server console:
op PlayerName

Enable and configure whitelist (restrict who can join):

Edit server.properties:

white-list=true
enforce-whitelist=true

Add players to whitelist:

# In server console
whitelist add PlayerName
whitelist list

Or manually edit whitelist.json:

[
  {
    "uuid": "player-uuid-here",
    "name": "PlayerName"
  }
]

RCON Setup (Remote Console)

RCON allows remote server management without SSH access.

Edit server.properties:

enable-rcon=true
rcon.port=25575
rcon.password=YourStrongPasswordHere

Configure firewall if accessing RCON remotely:

# Only allow from specific IP
sudo ufw allow from YOUR_IP to any port 25575

Use RCON client:

sudo apt install mcrcon -y
mcrcon -H localhost -P 25575 -p YourPassword "list"

Optimization

Memory Allocation Optimization

Proper memory allocation is critical for performance. Follow these guidelines:

General Rules:

  • Allocate 1-2GB base + 500MB per player
  • Leave 1-2GB for OS and other processes
  • Set -Xms and -Xmx to the same value for consistent performance

RAM Allocation Examples:

# 5 players: 3GB
-Xms3G -Xmx3G

# 10 players: 4GB
-Xms4G -Xmx4G

# 20 players: 6GB
-Xms6G -Xmx6G

# 50 players or heavy modded: 10-12GB
-Xms12G -Xmx12G

JVM Flags Optimization

Using optimized JVM flags dramatically improves performance. The startup script includes Aikar's flags, which are thoroughly tested and recommended by the Minecraft community.

Key flags explained:

  • +UseG1GC: Use G1 garbage collector (best for large heaps)
  • MaxGCPauseMillis=200: Target maximum GC pause time
  • +AlwaysPreTouch: Pre-touch memory pages at startup
  • G1NewSizePercent=30: Allocate 30% heap to new generation
  • G1HeapRegionSize=8M: Optimize region size for typical server

Server Performance Settings

Reduce view and simulation distance for better performance:

view-distance=8
simulation-distance=6

Optimize entity limits in spigot.yml:

world-settings:
  default:
    entity-activation-range:
      animals: 32
      monsters: 32
      raiders: 48
      misc: 16
      water: 16
      villagers: 32
      flying-monsters: 32
    entity-tracking-range:
      players: 48
      animals: 48
      monsters: 48
      misc: 32
      other: 64

Enable async chunk loading in paper-global.yml:

chunk-loading-advanced:
  auto-config-send-distance: true
  player-max-concurrent-chunk-loads: 4.0

Disk I/O Optimization

Use faster storage: SSD or NVMe drives significantly improve world loading and chunk generation.

Reduce auto-save frequency in bukkit.yml:

ticks-per:
  autosave: 6000  # Auto-save every 5 minutes instead of 1

Use separate disk for backups to prevent I/O contention during backup operations.

Network Optimization

Optimize network settings in server.properties:

# Increase compression threshold to reduce CPU usage
network-compression-threshold=512

# Optimize packet sending
max-tick-time=60000

Use connection throttle to prevent connection spam:

# spigot.yml
settings:
  connection-throttle: 4000

Pre-generate World Chunks

Pre-generating chunks prevents lag during exploration. Use Chunky plugin:

# In server console
chunky world world
chunky radius 5000
chunky start

This pre-generates a 10,000x10,000 block area, eliminating chunk generation lag.

Troubleshooting

Server Won't Start

Symptom: Service fails to start or crashes immediately.

Check Java version:

java -version

Minecraft 1.17+ requires Java 17 or newer.

Check available RAM:

free -h

If allocated memory exceeds available RAM, reduce -Xmx value.

Review logs:

sudo journalctl -u minecraft -n 100

Look for error messages indicating the problem.

Check file permissions:

ls -la /home/minecraft/server/

Ensure minecraft user owns all files:

sudo chown -R minecraft:minecraft /home/minecraft/server

High CPU Usage

Symptom: CPU usage consistently above 80-90%.

Check TPS (ticks per second):

# In server console
tps

Healthy servers maintain 20 TPS. Below 18 TPS indicates performance issues.

Profile performance:

Install Spark plugin for detailed performance analysis:

cd /home/minecraft/server/plugins
wget https://ci.lucko.me/job/spark/lastSuccessfulBuild/artifact/spark-bukkit/build/libs/spark-bukkit.jar

Use Spark commands:

/spark profiler start
# Wait 2-3 minutes
/spark profiler stop

Common solutions:

  • Reduce view and simulation distance
  • Limit mob spawning
  • Remove lag-inducing plugins
  • Pre-generate world chunks
  • Reduce entity counts with /kill @e[type=item]

High Memory Usage / Out of Memory

Symptom: Server crashes with OutOfMemoryError.

Increase allocated RAM:

Edit start.sh and increase -Xmx value:

-Xms6G -Xmx6G

Monitor memory usage:

# While server is running
jps  # Get Minecraft process ID
jstat -gc [PID] 1000  # Monitor garbage collection

Enable detailed GC logging:

Add to startup flags:

-Xlog:gc*:file=/home/minecraft/server/gc.log:time,uptime:filecount=5,filesize=10M

Solutions:

  • Allocate more RAM to server
  • Reduce loaded chunks (lower view distance)
  • Remove memory-intensive plugins
  • Clear old chunks with plugin like WorldBorder
  • Reduce entity counts

Connection Issues

Symptom: Players cannot connect to server.

Verify server is running:

sudo systemctl status minecraft

Check if port is open:

sudo netstat -tlnp | grep 25565

Should show Java listening on port 25565.

Test connectivity from server:

telnet localhost 25565

If this works but external connections fail, check firewall.

Verify firewall rules:

# UFW
sudo ufw status

# Firewalld
sudo firewall-cmd --list-all

Check if server is binding correctly:

In server.properties, ensure:

server-ip=

Leave blank to bind to all interfaces, or specify IP address.

Test external connectivity:

Use online tools like mcsrvstat.us or have friend test connection.

World Corruption

Symptom: Server crashes on startup, mentions corrupted chunks.

Restore from backup:

sudo systemctl stop minecraft
cd /home/minecraft/server
rm -rf world world_nether world_the_end
tar -xzf /home/minecraft/backups/world-backup-YYYY-MM-DD.tar.gz
sudo systemctl start minecraft

Repair corrupted chunks:

Use MCEdit or Amulet Map Editor to identify and delete corrupted chunks.

Prevention:

  • Regular automated backups
  • Proper shutdown procedures (never kill -9)
  • Reliable storage (avoid cheap SSDs prone to failure)
  • Monitor disk health regularly

Permission Denied Errors

Symptom: Server logs show permission errors when reading/writing files.

Fix file ownership:

sudo chown -R minecraft:minecraft /home/minecraft/server
sudo chown -R minecraft:minecraft /home/minecraft/backups

Fix file permissions:

sudo chmod -R 755 /home/minecraft/server
sudo chmod 644 /home/minecraft/server/*.properties
sudo chmod 644 /home/minecraft/server/*.yml
sudo chmod 644 /home/minecraft/server/*.json

Plugin Conflicts

Symptom: Server crashes or behaves incorrectly after installing plugins.

Identify problematic plugin:

Remove plugins one at a time from plugins folder and restart server.

Check plugin compatibility:

Ensure plugins are compatible with your server version (1.20.4, etc.).

Review plugin logs:

tail -f /home/minecraft/server/logs/latest.log

Look for error messages mentioning specific plugins.

Common conflicts:

  • Multiple permission plugins
  • Duplicate functionality plugins
  • Outdated plugins for current Minecraft version

Backup Strategy

Automated Backup Script

Create a backup script:

sudo nano /home/minecraft/backup.sh

Add the following content:

#!/bin/bash

# Minecraft Server Backup Script

MINECRAFT_DIR="/home/minecraft/server"
BACKUP_DIR="/home/minecraft/backups"
DATE=$(date +%Y-%m-%d-%H%M%S)
BACKUP_NAME="minecraft-backup-$DATE.tar.gz"
DAYS_TO_KEEP=7

# Announce backup start
echo "save-off" > /tmp/minecraft-cmd
echo "save-all flush" >> /tmp/minecraft-cmd
screen -S minecraft -p 0 -X stuff "$(cat /tmp/minecraft-cmd)^M"

# Wait for save to complete
sleep 10

# Create backup
cd $MINECRAFT_DIR
tar -czf $BACKUP_DIR/$BACKUP_NAME world world_nether world_the_end \
    *.properties *.yml *.json plugins \
    --exclude='*.jar' --exclude='plugins/*.jar'

# Resume saving
echo "save-on" > /tmp/minecraft-cmd
screen -S minecraft -p 0 -X stuff "$(cat /tmp/minecraft-cmd)^M"

# Delete old backups
find $BACKUP_DIR -name "minecraft-backup-*.tar.gz" -mtime +$DAYS_TO_KEEP -delete

# Log backup completion
echo "Backup completed: $BACKUP_NAME" >> $BACKUP_DIR/backup.log

Make executable:

sudo chmod +x /home/minecraft/backup.sh
sudo chown minecraft:minecraft /home/minecraft/backup.sh

Schedule Automatic Backups

Create cron job:

sudo crontab -e -u minecraft

Add backup schedule:

# Daily backup at 3 AM
0 3 * * * /home/minecraft/backup.sh

# Backup every 6 hours
0 */6 * * * /home/minecraft/backup.sh

Offsite Backup with Rclone

Install rclone:

sudo apt install rclone -y

Configure cloud storage:

rclone config

Create offsite backup script:

#!/bin/bash

# Upload latest backup to cloud storage
LATEST_BACKUP=$(ls -t /home/minecraft/backups/*.tar.gz | head -1)
rclone copy "$LATEST_BACKUP" remote:minecraft-backups/

Backup Before Updates

Before updating server or installing major plugins, create manual backup:

sudo su - minecraft
cd /home/minecraft
DATE=$(date +%Y-%m-%d-%H%M)
tar -czf backups/pre-update-$DATE.tar.gz server/

Advanced Configuration

Multiple Server Instances

Run multiple Minecraft servers on one machine:

# Create second server directory
sudo mkdir -p /home/minecraft/server2
sudo chown minecraft:minecraft /home/minecraft/server2

# Copy server files
sudo cp /home/minecraft/server/*.jar /home/minecraft/server2/

# Edit server.properties with different port
# server-port=25566

# Create second systemd service
sudo cp /etc/systemd/system/minecraft.service /etc/systemd/system/minecraft2.service

# Edit minecraft2.service to use server2 directory

BungeeCord Network Setup

BungeeCord allows multiple servers to appear as one network:

# Download BungeeCord
mkdir -p /home/minecraft/proxy
cd /home/minecraft/proxy
wget https://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/BungeeCord.jar

# Configure config.yml with server definitions
# Start BungeeCord on port 25565
# Configure backend servers on different ports (25566, 25567, etc.)

Mod Pack Server Setup

For modded servers (Forge/Fabric):

# Download mod pack server files
# Extract to server directory
# Install required mods in mods/ folder
# Allocate more RAM (8-16GB recommended)
# Adjust startup script for higher memory:
-Xms8G -Xmx8G

Performance Monitoring with Grafana

Set up advanced monitoring:

  1. Install Prometheus and Grafana
  2. Install Minecraft Prometheus Exporter plugin
  3. Configure Grafana dashboard
  4. Monitor TPS, player count, memory usage, chunk loading

Conclusion

You now have a fully functional Minecraft server running on Linux with optimized performance settings, automated backups, and proper system integration. This setup provides a stable foundation for hosting everything from small friend servers to larger community servers.

Key takeaways from this guide:

  • Java 17+ is required for modern Minecraft versions, with OpenJDK recommended for Linux
  • Paper server offers the best balance of performance and plugin compatibility
  • Proper JVM flags (Aikar's flags) significantly improve garbage collection and reduce lag
  • Systemd integration ensures automatic startup and easy service management
  • Regular backups are essential for preventing data loss from corruption or mistakes
  • Performance tuning through view distance, simulation distance, and entity limits maintains smooth gameplay
  • Security practices like dedicated users, firewall configuration, and whitelist protect your server

The modular nature of this setup allows easy scaling. Start with basic vanilla Minecraft and gradually add plugins, mods, or additional server instances as your community grows. The configuration files and scripts provided serve as templates that you can customize for specific needs.

Remember to monitor your server regularly using tools like htop, check logs with journalctl, and use in-game tools like /tps to ensure smooth performance. The Minecraft server community continuously develops new optimization techniques and plugins, so staying informed through forums like SpigotMC and PaperMC helps maintain cutting-edge performance.

Whether you're running a creative build server, survival multiplayer world, minigame network, or heavily modded adventure, this Linux-based setup provides the reliability and performance needed for excellent gameplay experiences. Regular maintenance, monitoring, and community engagement will ensure your Minecraft server thrives for years to come.

Happy crafting!