Skip to main contentSkip to navigation
[email protected]
Client AreaSupport
Hosting Mammoth
HostingMammothYour Data, Our Responsibility
Home
Solutions
Hosting Services
Store
Pricing
About
Blog
API
Contact

Stay Ahead of the Curve

Get the latest insights on cybersecurity, AI innovations, and enterprise data solutions delivered to your inbox.

Hosting Mammoth
HostingMammothEnterprise Solutions

Enterprise-grade data solutions. Hosting, recovery, cybersecurity, and AI-powered services for businesses worldwide.

[email protected]
Sun - Fri, 9:00am - 5:00pm

Services

  • Cloud Hosting
  • Data Recovery
  • Cybersecurity
  • Legal Support
  • MSP Services
  • Web Development
  • AI Services
  • Free Server Migration

Hosting

  • VPS Hosting (NVMe SSD)
  • VDS Hosting (NVMe)
  • Storage VPS (High SSD)
  • GPU Servers
  • Managed Services
  • Cloud Firewall
  • Load Balancer
  • One-Click Apps
  • n8n Hosting
  • Object Storage
  • FAQ

Company

  • Store
  • Pricing
  • About Us
  • Locations
  • Blog
  • Testimonials
  • Contact
  • Affiliate Program
  • White-Label
  • Terms of Service
  • Privacy Policy
  • Browser Cookies
  • SLA

Support

  • Client Area
  • Submit Ticket
  • Knowledge Base
  • Server Status
  • API Documentation

© 2026 Hosting Mammoth. All rights reserved.

Knowledge Base
Getting StartedAccount ManagementVPS HostingGPU ServersStorage VPSCloud FirewallLoad BalancerServer ManagementBilling & PaymentsSupport & TicketsAffiliate ProgramReseller ProgramMarketplace & Appsn8n HostingManaged ServicesServer MigrationAPI & DevelopersSecurityTroubleshootingGlossaryInstall Guides
  1. Home
  2. /
  3. Support
  4. /
  5. Install Guides
  6. /
  7. How To Install Minecraft Server Ubuntu
GUIDEInstall Guides

How to Install a Minecraft Server on Ubuntu 24.04 VPS: Complete Java Edition Guide

27 min read

How to Install a Minecraft Server on Ubuntu 24.04 VPS (Java Edition)

Running your own Minecraft server puts you back in control -- no player slot fees, no plugin whitelist, no capped TPS, and no forced migrations when the host decides to sunset a plan. This tutorial walks through a production-grade Vanilla Java Edition install on Ubuntu 24.04, with pointers for switching to Paper, Spigot, or Forge along the way. By the end you will have a hardened, auto-restarting server under systemd, tuned with Aikar's JVM flags, nightly backups, and a locked-down firewall that only exposes port 25565.

Want the shortcut? Deploy a pre-configured Minecraft VPS with Java 21, UFW, automated backups, and OpenSSH hardening baked in. Launch a game-ready VPS now -- your first world is online in under two minutes.

Table of Contents

  • Why Self-Host Minecraft?
  • Vanilla vs Paper vs Spigot vs Forge
  • Cost Comparison: VPS vs Managed Hosts
  • System Requirements
  • Prerequisites
  • Step 1: Update the System and Open the Firewall
  • Step 2: Install OpenJDK 21
  • Step 3: Create a Dedicated minecraft User
  • Step 4: Download the Vanilla server.jar
  • Step 5: Accept the EULA and First Run
  • Step 6: Tune server.properties
  • Step 7: Create the systemd Service with Aikar's Flags
  • Step 8: Automated Backups with 7-Day Rotation
  • Step 9: Op Your First Player
  • Switching to Paper, Spigot, or Forge
  • Troubleshooting
  • FAQ
  • Next Steps
  • Why Self-Host Minecraft?

    Managed Minecraft hosting sounds cheap until you read the per-slot pricing page. The headline number is always a 1 GB plan, which struggles to hold 3 players and one plugin. Bumping up to a usable tier plus "premium" CPU almost always lands north of USD 20 per month, and you are still renting a time-sliced VM that someone else has root on.

    Running your own server on a VPS flips the economics and the control surface in your favor:

    • Flat-rate RAM and CPU -- a 12 GB VPS hosts a 30-player Paper SMP, a Velocity proxy, and a Fabric creative world on the same box for the price of a "5 GB" managed plan.
    • Any plugin, any mod, any datapack -- install Paper, Purpur, Fabric, Forge, NeoForge, Mohist, Arclight, Folia, or a custom-compiled fork. Nobody blocks it.
    • Real root and real logs -- tail latest.log, profile TPS with Spark, mount extra disk for map renders. Managed panels give you a fraction of this visibility.
    • Your world, your backups -- snapshot on your schedule, rsync offsite, keep versioned history. When a host goes under, you still have every world file.
    • No forced upgrades -- you choose when to jump from 1.21.3 to 1.21.5, and you keep the old jar one cp away if a mod breaks.
    • Run more than just Minecraft -- the same VPS hosts a Pterodactyl panel, a web dashboard, a Discord bot, and a Uptime Kuma monitor without spinning up a second machine.

    Vanilla vs Paper vs Spigot vs Forge

    There are four mainstream server flavors for Minecraft Java Edition. Pick one before you download anything.

    FlavorBest ForPluginsModsPerformance
    Vanilla (Mojang)Reference behavior, datapack-only serversNoNoBaseline
    Paper (papermc.io)Plugin-based SMPs and community serversYes (Bukkit/Spigot API)No3-5x Vanilla
    SpigotLegacy plugin compatibilityYesNo~1.5x Vanilla
    Forge / NeoForgeModpacks (All the Mods, RLCraft, etc.)No (unless Sponge)YesVaries by modpack
    This tutorial installs Vanilla first because the procedure is identical for Paper -- you simply swap the jar file URL. For pure mod servers, download the Forge installer instead of server.jar and run java -jar forge-installer.jar --installServer. Everything else in this guide (user, systemd, backups, firewall, Aikar flags) applies unchanged.

    Official download sources:

    • Vanilla server.jar: minecraft.net/en-us/download/server
    • Paper: papermc.io/downloads/paper
    • Spigot: getbukkit.org/download/spigot (or self-build via BuildTools)
    • Forge: files.minecraftforge.net

    Cost Comparison: VPS vs Managed Hosts

    Here is what EUR 19.99 buys you at the three most-searched managed Minecraft hosts versus a self-hosted CloudCore VPS. Prices are monthly, in the cheapest billing tier, as listed on each provider's public pricing page.

    ProviderPlanRAMPlayer Slot CapRoot AccessMonthly Price
    Apex HostingPremium 3 GB3 GB"Unlimited"NoUSD 9.99
    ShockbyteDirt Plan2 GB20NoUSD 7.99
    BisectHostingPremium 4 GB4 GB"Unlimited"NoUSD 9.99
    CloudCore StarterVPS4 GBUnlimitedYesEUR 7.99
    CloudCore ProfessionalVPS12 GBUnlimitedYesEUR 19.99
    CloudCore BusinessVPS16 GB+UnlimitedYesEUR 29.99+
    \* "Unlimited slots" on managed hosts means the server jar does not enforce a cap, but the plan RAM does -- 3 GB in practice holds 8-12 Vanilla players before TPS crashes.

    At the same EUR 20 price point, you get 3x the RAM, 6 dedicated vCPU cores, full root, NVMe storage, and the freedom to host other services on the same box. The self-hosted option wins on every axis except "I have never touched a terminal before" -- which is exactly what the rest of this guide solves.

    System Requirements

    Minecraft's main thread is single-core and I/O-sensitive, so you want fast cores and NVMe storage more than raw core count. RAM scales with concurrent players and loaded chunks.

    Concurrent PlayersHeap (RAM)vCPUStorageRecommended Plan
    1-5 (friends)4 GB2 cores40 GB SSDStarter -- EUR 7.99
    5-15 (small community)6-8 GB4 cores80 GB NVMeProfessional -- EUR 19.99
    15-40 (medium public)10-12 GB6 cores160 GB NVMeProfessional -- EUR 19.99
    40-100 (busy public)16-24 GB8 cores240 GB NVMeBusiness -- EUR 29.99+
    Modpacks (ATM9, RLCraft)2-3x Vanilla6+ cores160 GB NVMeProfessional or Business
    Recommended Plan: CloudCore Professional -- EUR 19.99/month
    >
    The Professional plan is the sweet spot for a 5-20 player SMP with plugins and a backup job:
    >
    - 6 vCPU cores (AMD EPYC)
    - 12 GB RAM
    - 100 GB NVMe SSD
    - Unmetered 1 Gbps bandwidth
    - DDoS protection included

    Prerequisites

    Before you start, make sure you have:

    • A VPS running Ubuntu 24.04 LTS with root or sudo access
    • SSH access (terminal on macOS/Linux, PuTTY or Windows Terminal on Windows)
    • An open TCP port 25565 (the Minecraft default)
    • A Minecraft: Java Edition account for testing
    • Optional: a DNS A record pointing play.yourdomain.com at your VPS IP
    Connect to your server:

    bash
    ssh root@your-server-ip

    Step 1: Update the System and Open the Firewall

    Refresh the package index, apply security updates, and install UFW if it is not already present:

    bash
    sudo apt update && sudo apt upgrade -y
    sudo apt install -y ufw wget curl screen

    Allow SSH (so you do not lock yourself out), then open the Minecraft port:

    bash
    sudo ufw allow OpenSSH
    sudo ufw allow 25565/tcp comment 'Minecraft Java Edition'
    sudo ufw --force enable
    sudo ufw status numbered

    Expected output:

    text
    Status: active

    To Action From -- ------ ---- [ 1] OpenSSH ALLOW IN Anywhere [ 2] 25565/tcp ALLOW IN Anywhere [ 3] OpenSSH (v6) ALLOW IN Anywhere (v6) [ 4] 25565/tcp (v6) ALLOW IN Anywhere (v6)

    If you plan to enable RCON (remote console) later, open port 25575 as well but restrict it to a trusted IP:

    bash
    sudo ufw allow from YOUR.ADMIN.IP.HERE to any port 25575 proto tcp comment 'Minecraft RCON'

    Never expose RCON to 0.0.0.0 on the public internet -- its auth is a shared password with no rate limiting.

    If the kernel was updated during apt upgrade, reboot now:

    bash
    sudo reboot

    Reconnect after the server is back.

    Step 2: Install OpenJDK 21

    Minecraft 1.20.5 and all newer releases require Java 21. Ubuntu 24.04's main repository ships OpenJDK 21 directly, so no third-party PPA is needed.

    bash
    sudo apt install -y openjdk-21-jre-headless

    Verify the install:

    bash
    java --version

    Expected output:

    text
    openjdk 21.0.4 2024-07-16
    OpenJDK Runtime Environment (build 21.0.4+7-Ubuntu-1ubuntu2~24.04)
    OpenJDK 64-Bit Server VM (build 21.0.4+7-Ubuntu-1ubuntu2~24.04, mixed mode, sharing)

    Running an older Minecraft version?

    • 1.18 - 1.20.4 -- install openjdk-17-jre-headless
    • 1.17 -- install openjdk-16-jre-headless (requires ppa:openjdk-r/ppa)
    • 1.16.5 and older -- install openjdk-8-jre-headless
    You can install multiple JDKs side by side and switch with sudo update-alternatives --config java.

    Step 3: Create a Dedicated minecraft User

    Never run a game server as root. Create an unprivileged system user that owns the server directory:

    bash
    sudo adduser --system --shell /bin/bash --home /opt/minecraft --group minecraft
    sudo mkdir -p /opt/minecraft/server
    sudo chown -R minecraft:minecraft /opt/minecraft

    Drop into the minecraft user for the next steps:

    bash
    sudo -u minecraft -i
    cd /opt/minecraft/server

    The rest of the tutorial assumes you are operating as the minecraft user in /opt/minecraft/server unless noted.

    Step 4: Download the Vanilla server.jar

    Grab the official server jar URL from minecraft.net/en-us/download/server -- Mojang updates this link with every release, and the URL is not stable.

    At the time of writing, the current release is 1.21.4. Download it:

    bash
    wget -O server.jar https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar

    For Paper instead of Vanilla, grab the latest build from the Paper downloads API:

    bash
    # Replace 1.21.4 and 232 with the current version/build from papermc.io
    wget -O server.jar https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar

    Verify the jar is present and non-zero:

    bash
    ls -lh server.jar

    Expected output:

    text
    -rw-rw-r-- 1 minecraft minecraft 49M Apr 16 10:00 server.jar

    Step 5: Accept the EULA and First Run

    Run the jar once to generate the eula.txt, server.properties, and logs/ directory. It will exit immediately because the EULA has not been accepted yet:

    bash
    java -Xms1G -Xmx2G -jar server.jar --nogui

    Expected output (last few lines):

    text
    [10:01:30] [ServerMain/INFO]: Building unoptimized datafixer
    [10:01:32] [ServerMain/ERROR]: Failed to load properties from file: server.properties
    [10:01:32] [ServerMain/WARN]: Failed to load eula.txt
    [10:01:32] [ServerMain/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.

    Accept the Minecraft EULA by editing the generated file:

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

    Confirm:

    bash
    cat eula.txt

    Expected output:

    text
    #By changing the setting below to TRUE you are indicating your agreement to our EULA (https://aka.ms/MinecraftEULA).
    #Wed Apr 16 10:01:32 UTC 2026
    eula=true

    Step 6: Tune server.properties

    The default server.properties is fine for a LAN test but leaves performance on the table. Edit the key fields for a production server:

    bash
    nano /opt/minecraft/server/server.properties

    Recommended values for a 5-15 player SMP on a 6 vCPU / 12 GB VPS:

    properties
    # Core gameplay
    motd=\u00A76CloudCore SMP \u00A77| play.example.com
    gamemode=survival
    difficulty=normal
    hardcore=false
    pvp=true
    spawn-protection=16
    max-players=20
    online-mode=true
    white-list=false

    Network / performance

    server-port=25565 view-distance=8 simulation-distance=6 network-compression-threshold=256 sync-chunk-writes=false entity-broadcast-range-percentage=80 max-tick-time=60000

    World generation

    level-name=world level-type=minecraft\:normal allow-nether=true spawn-animals=true spawn-monsters=true spawn-npcs=true generate-structures=true

    Security

    enforce-whitelist=false prevent-proxy-connections=false enable-rcon=true rcon.port=25575 rcon.password=replace-with-a-strong-random-password enable-query=false

    Notes on the tuning choices:

    • view-distance=8 -- the default 10 pushes chunk loading costs up 50% for marginal visible range. 8 is the sweet spot for medium servers; drop to 6 on under-powered boxes.
    • simulation-distance=6 -- controls how far out mobs, redstone, and tile entities tick. Lower than view-distance is fine and saves significant CPU.
    • network-compression-threshold=256 -- packets smaller than 256 bytes skip compression, reducing CPU overhead on LAN and modern networks. Set to -1 to disable entirely on a local proxy.
    • sync-chunk-writes=false -- lets chunk saves happen asynchronously. Safe on journaled filesystems like ext4 (which Ubuntu uses by default).
    • online-mode=true -- required for Mojang authentication. Only disable this if the server is behind a Velocity proxy in forwarding mode.
    The full reference for every property is maintained on the Minecraft Wiki server.properties page.

    Step 7: Create the systemd Service with Aikar's Flags

    Running Minecraft inside screen or tmux works in a pinch, but systemd is the right answer for production: it restarts on crash, starts on boot, integrates with journald, and does not leave a dangling session if you get disconnected.

    Aikar's JVM Flags Explained

    Aikar's flags are a well-tested set of G1GC tuning parameters that dramatically reduce GC pause times on Minecraft servers. They are designed for 12+ GB heaps but work acceptably down to 4 GB. The key changes from stock G1GC:

    • Larger G1NewSizePercent and G1MaxNewSizePercent (40 / 50) -- Minecraft allocates heavily in the young generation during chunk ticks.
    • Smaller G1HeapRegionSize=8M -- more granular collection, fewer full pauses.
    • InitiatingHeapOccupancyPercent=15 -- starts concurrent GC cycles earlier, avoiding stop-the-world events.
    • +ParallelRefProcEnabled and +DisableExplicitGC -- prevent plugin-triggered manual System.gc() calls from stalling the server.

    Exit the minecraft user and write the unit file as root:

    bash
    exit  # back to your sudo user
    sudo nano /etc/systemd/system/minecraft.service

    Paste the following (tuned for an 8 GB heap -- adjust Xms/Xmx to your plan):

    ini
    [Unit]
    Description=Minecraft Java Edition Server
    Wants=network-online.target
    After=network-online.target

    [Service] Type=simple User=minecraft Group=minecraft WorkingDirectory=/opt/minecraft/server Restart=on-failure RestartSec=10s SuccessExitStatus=0 143

    Hardening

    NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ProtectHome=true ReadWritePaths=/opt/minecraft

    Aikar's flags for 8 GB heap on Minecraft 1.20+ with Java 21

    ExecStart=/usr/bin/java \ -Xms8G -Xmx8G \ -XX:+UseG1GC \ -XX:+ParallelRefProcEnabled \ -XX:MaxGCPauseMillis=200 \ -XX:+UnlockExperimentalVMOptions \ -XX:+DisableExplicitGC \ -XX:+AlwaysPreTouch \ -XX:G1NewSizePercent=40 \ -XX:G1MaxNewSizePercent=50 \ -XX:G1HeapRegionSize=8M \ -XX:G1ReservePercent=15 \ -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 server.jar --nogui

    Graceful shutdown -- systemd sends SIGTERM, Minecraft saves and exits cleanly

    ExecStop=/bin/kill -SIGTERM $MAINPID TimeoutStopSec=60s

    [Install] WantedBy=multi-user.target

    Heap sizing rule -- set Xms equal to Xmx so the JVM does not waste cycles resizing the heap. Leave at least 2 GB of VPS RAM free for the OS, off-heap JVM memory, and any plugin native libraries.

    Reload systemd, enable the service on boot, and start it:

    bash
    sudo systemctl daemon-reload
    sudo systemctl enable --now minecraft

    Watch it boot:

    bash
    sudo journalctl -u minecraft -f

    You should see the world load and the server announce readiness within 30-60 seconds:

    text
    [10:15:01] [Server thread/INFO]: Preparing spawn area: 100%
    [10:15:01] [Server thread/INFO]: Done (12.345s)! For help, type "help"

    Press Ctrl+C to stop tailing the log (the server stays running).

    Connect from your Minecraft client using your-server-ip:25565 or your DNS record. You are live.

    Step 8: Automated Backups with 7-Day Rotation

    A Minecraft server without a backup strategy is a disaster waiting to happen -- one corrupted region file or one bad /fill command can delete hours of work. Schedule nightly tarballs with a 7-day rotation.

    Create the backup script:

    bash
    sudo nano /opt/minecraft/backup.sh

    Paste:

    bash
    #!/bin/bash
    

    Minecraft world backup with 7-day rotation

    set -euo pipefail

    BACKUP_DIR="/opt/minecraft/backups" SERVER_DIR="/opt/minecraft/server" STAMP=$(date +%Y-%m-%d_%H-%M) ARCHIVE="${BACKUP_DIR}/world-${STAMP}.tar.gz"

    mkdir -p "${BACKUP_DIR}"

    Tell the server to flush and pause world saves via RCON (requires rcon-cli or mcrcon)

    Skip if RCON is disabled -- this fallback uses systemd to pause briefly

    echo "[$(date)] Starting backup: ${ARCHIVE}"

    cd "${SERVER_DIR}" tar --exclude='./logs/' --exclude='./cache/' -czf "${ARCHIVE}" \ world world_nether world_the_end \ server.properties ops.json whitelist.json banned-players.json banned-ips.json \ 2>/dev/null || tar -czf "${ARCHIVE}" world server.properties

    Rotate: keep last 7 backups

    find "${BACKUP_DIR}" -name 'world-*.tar.gz' -type f -mtime +7 -delete

    echo "[$(date)] Backup complete: $(du -h "${ARCHIVE}" | cut -f1)"

    Make it executable and set ownership:

    bash
    sudo chown minecraft:minecraft /opt/minecraft/backup.sh
    sudo chmod +x /opt/minecraft/backup.sh

    Schedule it via the minecraft user's crontab (runs daily at 4:00 AM server time):

    bash
    sudo -u minecraft crontab -e

    Add:

    cron
    0 4   * /opt/minecraft/backup.sh >> /opt/minecraft/backups/backup.log 2>&1

    Test it manually once:

    bash
    sudo -u minecraft /opt/minecraft/backup.sh
    ls -lh /opt/minecraft/backups/

    For offsite backups, add a second cron line that rsyncs the backup directory to a remote host or pushes it to S3-compatible storage via Restic or Rclone. A single destroyed VPS is the most common way to lose a world permanently -- always have a copy on a different machine.

    Step 9: Op Your First Player

    To grant yourself admin (operator) privileges, connect to the server console via journalctl or by attaching to the systemd service's stdin. The cleanest way is sending a command through systemd:

    bash
    # Get the Minecraft console using RCON (install mcrcon on your client)
    

    Or use the server console if you started it manually

    Easiest: open a runtime socket or use an rcon CLI client

    sudo apt install -y rcon-cli rcon-cli --host 127.0.0.1 --port 25575 --password YOUR_RCON_PASSWORD "op YourMinecraftUsername"

    Expected reply:

    text
    Made YourMinecraftUsername a server operator

    Rejoin the server -- you now have /gamemode, /give, /tp, and every other op command available.

    Switching to Paper, Spigot, or Forge

    Everything above works unchanged for Paper and Spigot -- just swap the server.jar:

    bash
    sudo systemctl stop minecraft
    cd /opt/minecraft/server
    sudo -u minecraft mv server.jar server.jar.vanilla-bak

    Paper

    sudo -u minecraft wget -O server.jar https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar

    sudo systemctl start minecraft

    For Forge, the install flow differs slightly. Download the installer from files.minecraftforge.net, run:

    bash
    sudo -u minecraft java -jar forge-1.21.4-installer.jar --installServer

    This generates a run.sh and a user_jvm_args.txt. Update your systemd ExecStart= to point at run.sh (or to the forge-*.jar that the installer drops in the directory), keep Aikar's flags, and restart the service.

    For modpacks (All the Mods, RLCraft, Create: Above and Beyond), the pack author usually ships a serverfiles.zip with a preconfigured run.sh. Unzip into /opt/minecraft/server, point systemd at run.sh, and bump Xmx to the pack's recommended value (usually 6-10 GB).

    Troubleshooting

    SymptomCauseFix
    Error: Unsupported class file major version 65Running Minecraft 1.20.5+ on Java 17 or olderInstall openjdk-21-jre-headless and verify with java --version
    Failed to bind to port 25565: Address already in useAnother process holds the portsudo ss -tlnp \</td><td>grep 25565 to find it, kill or reconfigure
    Server crashes with OutOfMemoryError: Java heap spaceXmx too small for plugin/world loadIncrease -Xmx in systemd unit, reload with sudo systemctl daemon-reload && sudo systemctl restart minecraft
    Low TPS (< 18) with few playersDisk I/O bottleneck or too-high view-distanceLower view-distance to 6-8, confirm NVMe storage, install Spark to profile
    Players can connect locally but not from internetUFW or cloud firewall blocking 25565sudo ufw allow 25565/tcp, check provider's cloud firewall panel
    Can't keep up! Is the server overloaded? spamChunk generation stalls on main threadPre-generate world with Chunky plugin (Paper), reduce simulation-distance
    systemd service keeps restarting in a loopEULA not accepted or jar corruptedCheck journalctl -u minecraft -n 50, re-accept EULA, redownload jar
    RCON connection refusedRcon port not enabled in server.propertiesSet enable-rcon=true, restart, open port 25575 in UFW from your admin IP only
    World file grows to tens of GBNormal chunk accumulationRun /forceload remove all, use WorldBorder plugin to cap size, trim unused regions
    View full logs any time:

    bash
    sudo journalctl -u minecraft -n 200 --no-pager
    sudo tail -f /opt/minecraft/server/logs/latest.log

    FAQ

    How much RAM does a Minecraft server need?

    Plan for roughly 4 GB of heap for 1-5 players, 6 GB for up to 15 players, and 10-12 GB for 20-40 concurrent players. Always leave at least 1 GB free for the OS and JVM off-heap memory (metaspace, direct buffers, native plugin libraries). Modded servers like All the Mods 9 or RLCraft need 2-3x the RAM of Vanilla at the same player count because mods add entities, chunk loaders, and background processing. If TPS drops below 18 and the G1 "young" pool stays above 90%, you are RAM-starved.

    Should I use Vanilla, Paper, Spigot, or Forge?

    Use Vanilla only if you want exact Mojang behavior and plan to extend via datapacks. Use Paper for anything plugin-based -- it is 3-5x faster than Vanilla at the same player count and is a drop-in replacement for the Vanilla jar. Spigot is only relevant if a specific plugin will not run on Paper, which is rare in 2026. Use Forge or NeoForge exclusively for mod servers; mods and plugins are architecturally incompatible unless you run a hybrid like Mohist, Magma, or Arclight (which carry their own stability caveats). When in doubt, start with Paper.

    Which Java version do I need for Minecraft?

    Minecraft 1.20.5 and newer require Java 21. 1.18 - 1.20.4 run on Java 17. 1.17 needs Java 16. Anything older than 1.17 still works on Java 8. Ubuntu 24.04 ships OpenJDK 21 directly from the main repository, which is what this guide installs. You can have multiple JDKs installed side by side and switch with sudo update-alternatives --config java per-terminal, or just reference the full path in your systemd unit (/usr/lib/jvm/java-17-openjdk-amd64/bin/java) for a specific service.

    Can I run a Minecraft server on my home PC instead of a VPS?

    Technically yes, but a VPS gives you 24/7 uptime, static IP, DDoS protection, higher upload bandwidth, and no port-forwarding exposure on your home network. Residential ISPs typically cap upload speeds at 20-40 Mbps, which caps how many players you can host before everyone rubber-bands. A CloudCore Starter plan at EUR 7.99/month costs less than the electricity of leaving a desktop on all month, and you avoid exposing your home IP to the wider internet (including to anyone who threatens to DDoS your server after a ban).

    How do I reduce lag and boost TPS?

    In order of impact: (1) switch to Paper if you are on Vanilla; (2) reduce view-distance from 10 to 7-8 in server.properties; (3) set simulation-distance=5-6; (4) apply Aikar's JVM flags (Step 7 above); (5) install Spark to profile actual hot paths; (6) use Chunky to pre-generate a 5000-block-radius spawn area so chunk-gen does not interrupt gameplay; (7) install ClearLag or Ent Culling to trim stale mobs and item entities. Paper's paper-global.yml also exposes dozens of optimization toggles worth reading.

    Is self-hosting cheaper than Apex, Shockbyte, or BisectHosting?

    Yes. Apex Hosting charges USD 9.99/month for 3 GB, Shockbyte USD 7.99 for 2 GB, and BisectHosting USD 9.99 for 4 GB Premium. A CloudCore Professional VPS at EUR 19.99 gives you 12 GB dedicated RAM, 6 vCPU, 100 GB NVMe, full root, and the ability to run unlimited game servers, a web dashboard, a Discord bot, and offsite backups on the same machine. For the price of a single Shockbyte "Stone" plan, you get roughly 6x the RAM and none of the plugin restrictions.

    Can I migrate an existing world from another host?

    Yes. Stop the source server cleanly (so chunks flush), zip world/, world_nether/, world_the_end/ plus banned-players.json, ops.json, whitelist.json, and server.properties. Upload to the VPS with scp or rsync, extract into /opt/minecraft/server/, chown -R minecraft:minecraft, and start the service. The server picks up the existing world automatically. Keep the same Minecraft version on both ends; upgrading a 1.19 world to 1.21 works but is one-way -- back up before you try it.

    Next Steps

    Now that your Minecraft server is running under systemd with Aikar's flags, backups, and a locked firewall, here is what to do next:

    • Install a game server panel -- Deploy Pterodactyl to get a web UI for managing this and future game servers, including file editor, console, and user permissions.
    • Add monitoring -- Install Uptime Kuma to ping your Minecraft port and alert on Discord when the server is down.
    • Pre-generate your world -- Install the Chunky plugin (Paper only) and run /chunky radius 5000 && /chunky start to generate a 10k x 10k chunk area so players never wait on chunk gen.
    • Host more games on the same VPS -- Same box can comfortably run a Valheim server, an ARK: Survival Evolved server, a 7 Days to Die server, a Satisfactory dedicated server, a Project Zomboid server, or a Space Engineers server. Just pick different ports.
    • Set up a Velocity proxy -- If you want a network of Minecraft servers (survival, creative, minigames) sharing one address, put Velocity in front and run each backend with online-mode=false plus modern forwarding.
    • Enable snapshot backups on the VPS -- Use your provider's snapshot feature for disaster recovery in addition to the tarball backups configured in Step 8.

    Skip the Manual Install -- Launch a Pre-Built Minecraft VPS
    >
    Our Professional VPS plan comes tuned for Minecraft out of the box: OpenJDK 21, UFW firewall, automated daily backups, and systemd unit ready to run Paper. Deploy in 60 seconds and start handing out IPs.
    >
    - 12 GB RAM, 6 vCPU AMD EPYC, 100 GB NVMe
    - Unmetered 1 Gbps bandwidth, DDoS protection included
    - Full root, no plugin restrictions, no slot caps
    - One-click SSH key deployment
    >
    Deploy Your Minecraft VPS Now -- Plans start at EUR 7.99/month (Starter), EUR 19.99 (Professional), EUR 29.99+ (Business).

    Was this article helpful?

    ← Back to Install GuidesBrowse all categories →

    Still have questions?

    Contact Support →Submit a Ticket