News
FreeBSD 15, Fresh OS Options on VMware, and New 1-Click Apps Are Now Available in the Control Panel!
MW
Michael Williams
June 3 2026
Updated June 8 2026

How to Deploy a Minecraft Server on a VPS

How to Deploy a Minecraft Server on a VPS

Launching your own Minecraft server is a task that many players and community administrators face. Using a Virtual Private Server (VPS) gives you more control over performance and settings compared to ready-made game hosting or running it on your home computer. In this article, we will walk through the step‑by‑step process of deploying a Minecraft server on a VPS – from choosing a configuration to final optimisation.

Why a VPS Instead of Other Options

There are three main ways to host a Minecraft server:

  • Home computer – requires the PC to be always on, a static IP address, and a good internet connection. Moreover, home hardware is rarely optimised for 24/7 high‑load operation.
  • Specialised game hosting – easy to use, but often restricts the choice of software, Minecraft versions, and mods. Performance can suffer from “noisy neighbours” on the same physical server.
  • VPS (Virtual Private Server) – you get dedicated resources (CPU, RAM, disk space), full access to the operating system (root), and fine‑tuning capabilities. This solution works both for a small group of friends and for a public server with dozens of players.

Additionally, on a VPS you manage security, backups, and the installation of mods or plugins yourself, which is impossible on most cheap game hosting plans.

Choosing the Hardware Configuration

The performance of a Minecraft server is affected not only by the amount of RAM and the number of CPU cores, but also by the CPU clock speed (Minecraft is largely a single‑threaded application, although some operations can be distributed). The table below shows recommended VPS configurations for different scenarios.

Use case vCPU (cores) RAM (GB) Disk (NVMe/SSD) CPU clock (GHz) Expected number of players
Vanilla server for 3‑5 friends (no plugins) 1-2 2-4 20-30 GB ≥ 2.5 up to 5
Vanilla + light plugins (e.g., Essentials, WorldGuard) 2 4-6 30-50 GB ≥ 3.0 10-15
Modded server (Forge / Fabric), 20‑30 mods 2-4 6-8 50 GB ≥ 3.5 10-20
Heavy modpack (around 100 mods) or network server (MiniGames, Skyblock) 4-6 8-12 80+ GB ≥ 4.0 (with high IPC) 20-50+

 

Preparing the VPS and Connecting

After you rented a VPS, you need to perform the initial setup.

Choosing an Operating System

Most Minecraft servers run on Linux. The most common and well‑documented distribution is Ubuntu Server 22.04 LTS (or 24.04 LTS). It is stable, has long‑term support, and is easy to administer.

When creating the VPS in the control panel, select Ubuntu 22.04 / 24.04 (64‑bit).

Connecting via SSH

The SSH protocol is used for remote server management. On Linux/macOS you can use the built‑in terminal, on Windows – PowerShell, the command prompt, or third‑party clients (e.g., PuTTY, but on modern Windows 10/11 the ssh command is already available).

Example connection command:

ssh root@<IP-address-of-your-VPS>

Instead of root, another user may be used. You receive the password when the server is created. For better security, it is recommended to change the password after the first login and set up SSH key authentication, but a password is sufficient for the initial stage.

After a successful login, you will see a command prompt.

Installing the Required Software

To run a Minecraft server, you need a Java Runtime Environment (JRE) or Java Development Kit (JDK). The Java version depends on the Minecraft version:

  • Minecraft 1.16.5 and older – Java 8 (OpenJDK 8 can be used).
  • Minecraft 1.17 – 1.20.4 – Java 17.
  • Minecraft 1.20.5 and newer – Java 21.
  • Minecraft 26.1 and newer – Java 25.

We will use Java 25 as it is current for modern versions.

Updating the System and Installing Java

sudo apt update && sudo apt upgrade -y
sudo apt-get install -y java-25-amazon-corretto-jdk libxi6 libxtst6 libxrender1

Check the version:

java -version

You should see a line containing openjdk version "25".

Creating a Dedicated User for the Server (recommended)

Working as root is unsafe. Let’s create a separate user:

adduser minecraft

Set a password. Then switch to that user:

su - minecraft

Downloading and Configuring the Server

Change to the home directory of the minecraft user and create a folder for the server:

mkdir server
cd server

Download the official Minecraft server. The URL for the latest version can be found on minecraft.net. For version 26.1.2, an example:

wget https://piston-data.mojang.com/v1/objects/97ccd4c0ed3f81bbb7bfacddd1090b0c56f9bc51/server.jar

Important: always verify the actual link from the official source. For modded setups (Forge, Fabric), you should download the installer from the respective project’s page instead of server.jar.

After downloading, run the server once to generate the configuration files:

java -Xmx1024M -Xms1024M -jar server.jar nogui

The server will terminate with an error, stating that you have not accepted the EULA (End User License Agreement). Edit the eula.txt file:

nano eula.txt

Change the line eula=false to eula=true. Save (Ctrl+O, Enter, Ctrl+X).

Now the server can be started again, this time with proper memory parameters.

Basic server.properties Settings

The main configuration file of the server is server.properties. Open it in an editor:

nano server.properties

Key parameters to change for the first run:

  • server-name – the name of the server visible in the list.
  • max-players – maximum number of players (default 20).
  • motd – message of the day (text that players see when connecting).
  • difficulty – difficulty level (peaceful, easy, normal, hard).
  • view-distance – chunk render distance for players. Reducing it from 10 to 6‑8 can significantly lower CPU load.
  • network-compression-threshold – network packet compression threshold (default 256). For servers with a poor connection, you can lower it to 128.

After making changes, save the file.

Starting the Server and Optimising JVM Parameters

A simple launch with java -Xmx... is inefficient. Use the recommended flags from the PaperMC developers (they also work for the vanilla server and most forks).

Example command for a server with 4 GB of RAM allocated:

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=true -jar server.jar nogui

These settings reduce garbage‑collection pauses (lag). The -Xms and -Xmx values should be the same and correspond to the amount of RAM allocated to the server (leave about 1‑2 GB for the operating system – if your VPS has 6 GB, allocate 4 GB to the server).

Automatic Restart on Crash

To have the server restart automatically after an unexpected stop, you can write a simple script start.sh:

#!/bin/bash
while true
do
java -Xms4G -Xmx4G ... (full command with flags) -jar server.jar nogui
echo "Server will restart in 10 seconds..."
sleep 10
done

Make the script executable: chmod +x start.sh. Run it instead of the direct command.

Setting Up Autostart via systemd (for reliability)

To make the server start automatically when the VPS boots and restart after failures, create a systemd service.

Create the file /etc/systemd/system/minecraft.service (as root):

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

With the following content:

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

[Service]
User=minecraft
WorkingDirectory=/home/minecraft/server
ExecStart=/usr/bin/java -Xms4G -Xmx4G (flags) -jar server.jar nogui
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Then run:

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

Now the server is managed via sudo systemctl {start|stop|restart|status} minecraft.

Opening the Port and Checking Availability

The standard port for Minecraft is 25565 (TCP). You need to allow incoming connections on this port. On Ubuntu, ufw is used:

sudo ufw allow 25565/tcp
sudo ufw enable

If your VPS provider offers its own firewall in the control panel (e.g., Security Group settings), remember to open the port there as well.

You can check port availability from outside with the following command on your local machine:

telnet <IP-address> 25565

If the connection establishes, the port is open.

Whitelist and Security

For private servers, it is recommended to enable the whitelist. This prevents unauthorised players from connecting even if they know the IP address.

In the server.properties file, set:

white-list=true

Then add players through the server console (after startup):

whitelist add PlayerName

Alternatively, edit the whitelist.json file manually. Players not on the whitelist will not be able to connect.

Additional security measures:

  • Use SSH keys instead of password login (edit /etc/ssh/sshd_config: PasswordAuthentication no).
  • Regularly update the system (sudo apt update && sudo apt upgrade).
  • Run the server as the unprivileged user minecraft, not as root.
  • Consider installing Fail2Ban to block repeated failed login attempts.

Installing Mods and Plugins

Plugins (Bukkit/Spigot/Paper)

If you are using Paper or Spigot, plugins (.jar files) are placed in the plugins folder. After installing a plugin, the server must be restarted. Popular plugins:

  • EssentialsX – a set of basic commands (/home, /tpa, /warp).
  • LuckPerms – permission and group management.
  • CoreProtect – grief protection with rollback capabilities.
  • WorldGuard – area protection.

Mods (Forge / Fabric)

To install mods you will need the server version of Forge or Fabric.

Forge:

  1. Download the Forge installer for the required Minecraft version from the official website.
  2. Run the installer in server mode (point to the /home/minecraft/server directory).
  3. The installer will create a run.sh script or a forge-version-universal.jar file.
  4. Place mods (.jar files) into the mods folder (created after the first launch).
  5. Start the server using java -jar forge-universal.jar nogui.

Fabric:

  1. Download the Fabric installer for the server.
  2. Run java -jar fabric-installer.jar server -dir /home/minecraft/server -mcversion 26.1.2 (specify the required version).
  3. The installer will create fabric-server-launch.jar. Launch it with memory parameters.
  4. The mods folder is created automatically – place Fabric API and other mods there.

Monitoring and Logs

To understand the server’s state, it is useful to set up basic monitoring.

Simple commands:

  • top or htop – CPU and RAM usage.
  • df -h – free disk space.
  • Real‑time server log viewing: tail -f /home/minecraft/server/logs/latest.log.

Advanced monitoring with Prometheus and Grafana (optional):

An exporter (e.g., minecraft-exporter) is installed on the server, collecting metrics (TPS, number of players, memory usage). Prometheus scrapes them every minute, and Grafana builds dashboards. This is useful for large servers where dynamic performance tracking is needed.

Installing a Control Panel (optional)

If you find working via console and SSH inconvenient, you can install a web panel to manage the server.

Pterodactyl – a professional panel with Docker support, server isolation, and an API. Requires a dedicated domain, web server setup (Nginx), and a database (MySQL). Installation according to the official documentation takes about an hour.

Minecraft Server Manager (MCSM) – a simpler option, installed with a single command (a script on GitHub). Provides a web interface for starting/stopping, editing configs, and viewing the console. Suitable for small projects.

When installing any panel, make sure you have a dedicated domain or subdomain, as the panel usually runs on port 80/443.

Backups

Losing the world is the most painful problem for an administrator. Set up regular backups.

Simple method using cron:

Open the crontab for the minecraft user:

crontab -e

Add a line for a daily backup at 3 AM with rotation (keep the last 7 copies):

0 3 * * * tar -czf /home/minecraft/backups/world_$(date +\%Y\%m\%d).tar.gz /home/minecraft/server/world && find /home/minecraft/backups -name "world_*.tar.gz" -mtime +7 -delete

A more robust approach:

  • Use rsync to synchronise the world with another VPS or cloud storage.
  • Set up automatic backup uploads to Google Drive or S3 using rclone.
  • For critical servers, back up the database (if a MySQL‑based plugin is used).

Frequently Encountered Problems and Their Solutions

1. Server does not start: “Java not found”
Check whether Java is installed (java -version). Install OpenJDK.

2. OutOfMemoryError (lack of memory)
Increase -Xmx (e.g., from 2G to 4G). Make sure the VPS actually has that much free RAM (command free -h).

3. Port 25565 is not reachable from outside
Check whether ufw is active (sudo ufw status) and whether the port is open in the provider’s control panel. You can temporarily disable ufw for testing (sudo ufw disable), but then re‑enable it.

4. Severe lag (low TPS)
Run the command /timings report (on Paper) and study the report. A common cause is too many entities (animals/mobs) or chunk loading by players with a high view‑distance. Use the LagGoggles plugin for analysis.

5. Server crashes with error “Connection reset by peer”
Check the stability of the network connection between the VPS and the provider. Sometimes changing the port (e.g., to 25566) in server.properties helps.

6. File permission issues
Make sure the minecraft user owns all files in /home/minecraft/server: sudo chown -R minecraft:minecraft /home/minecraft/server.

Additional Configuration for Voice Chat (Plasmo Voice)

If you plan to use the Plasmo Voice mod (spatial voice chat), you need to open an additional UDP port (default 24454). In ufw:

sudo ufw allow 24454/udp

In the mod’s server configuration (voice_chat.properties) you can change the port. Ensure that clients use the same mod version as the server.

Conclusion

Deploying a Minecraft server on a VPS is a process that requires attention to detail, but it fully pays off with configuration freedom and stability. You choose the game version, mods, plugins, and the number of players. This guide covers the basic steps: selecting a configuration, installing Java, optimising the startup, creating backups, and solving typical problems. Using systemd, installing Forge/Fabric mods, monitoring, and voice chat will help you adapt the server to any task.

After launch, remember to monitor the server logs and periodically update both the game itself and the VPS operating system. Happy gaming and stable online play!

You might also like...

We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.