0%
Loading...
NolimitHost

How to host your own Minecraft server

Last updated: March 29, 2026

Tested on: Ubuntu 24.04 LTS with OpenJDK 21. Works on most Linux distributions with Java 17+.

This guide explains how to set up and run your own 24/7 Minecraft server on a VPS. You'll have complete control over the server configuration, mods, plugins, and who can play.

Tested on: Ubuntu 24.04 LTS with OpenJDK 21. Works on most Ubuntu LTS versions.

What You'll Need

  • A NolimitHost VPS with Ubuntu (2GB RAM minimum, 4GB+ recommended)
  • A public IPv4 address
  • Port 25565 open (for Minecraft connections)
  • Basic Linux command-line familiarity
  • 45-60 minutes to complete

Step 1: Install Java

Minecraft requires Java 17 or newer. Ubuntu 24.04 includes OpenJDK 21:

sudo apt update
sudo apt install openjdk-21-jdk-headless -y

Verify the installation:

java --version

Step 2: Open Firewall Port 25565

Players connect to Minecraft on port 25565:

sudo ufw allow 25565/tcp
sudo ufw allow 25565/udp
sudo ufw reload
sudo ufw status

Step 3: Create a Minecraft Server Directory

Create a dedicated directory:

mkdir -p ~/minecraftserver
cd ~/minecraftserver

Step 4: Download Server Software

Option A: PaperMC (Recommended)
Better performance, lower resource usage:

wget -O server.jar https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/120/downloads/paper-1.21.1-120.jar

Option B: Official Mojang Server
Vanilla Minecraft experience:

wget -O server.jar https://launcher.mojang.com/v1/objects/0d03b59cc3e1eecbcb5b0b6f0c79e6a19c6b01ce/server.jar

Step 5: Accept the EULA

Run the server once to generate config files:

java -jar server.jar

The server creates an eula.txt

nano eula.txt

Change eula=false to eula=true, then save (Ctrl+X Y Enter).

Step 6: Install Screen (For Background Running)

Screen lets your server run even after you disconnect:

sudo apt install screen -y

Step 7: Start the Server

Create a new screen session:

screen -S MinecraftServer

Start the server (adjust -Xmx based on your RAM: 2048 for 2GB, 4096 for 4GB, etc.):

java -Xms512M -Xmx4096M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+AlwaysPreTouch -jar server.jar nogui

Wait for the logs to show "Done!" - your server is ready.

Connecting to Your Server

To detach from the screen and keep the server running: Press Ctrl+A then D

In Minecraft multiplayer:

  1. Click "Add Server"
  2. Enter your VPS public IP as the address
  3. Join!

Managing Your Server

Reconnect to your server:

screen -r MinecraftServer

Common in-game commands:

  • stop - Gracefully shut down the server
  • say Message here - Broadcast to all players
  • op playername - Make someone an operator
  • save-all - Save the world immediately

Check resource usage:

top

Press Q to exit top.

Performance Tips

  • Allocate enough RAM: Use -Xmx with 50-70% of your VPS's total RAM
  • Use PaperMC: 30-50% better performance than vanilla
  • Limit players: More players = more CPU and RAM needed
  • Monitor with top: Watch for CPU/RAM spikes and adjust allocations
  • Fewer plugins: Each plugin increases resource usage

Backing Up Your World

Create a backup (while server is running and safe):

mkdir -p ~/backups
tar -czf ~/backups/world-$(date +%Y%m%d-%H%M%S).tar.gz ~/minecraftserver/world

Stopping and Restarting

Reconnect to the server:

screen -r MinecraftServer

Stop gracefully: Type stop in the console

Restart: Use the same command from Step 7

Troubleshooting

Players can't connect? Verify port 25565 is open: sudo ufw status
Server running slowly? Check RAM and CPU: top. Consider upgrading your VPS or reducing player count.
Java runs out of memory? You set -Xmx too high. Increase your VPS RAM or reduce the value.

Next Steps

After your server is running:

  • Explore server.properties to customize gameplay
  • Install plugins (Bukkit/Spigot) for additional features
  • Set up automated daily backups
  • Monitor performance weekly and adjust as needed

Need Help?

For server setup questions, please open a support ticket through your billing panel.