← Back to Guides

How to set up a Minecraft Server on Linux in 2024

Hosting a Minecraft server gives you ultimate control over your game world, mods, and rules. While using a ready-made panel like Pterodactyl is great, installing it natively on Linux (like Ubuntu 22.04) gives you maximum performance and customization.

1. Connect to your VPS

Using SSH, connect to your server. ssh root@your-ip-address

Once connected, update your package list to ensure you have the newest software available.

2. Install Java

Minecraft runs on Java. For newer versions (1.20+), you'll need Java 21. Install it using the following command:

sudo apt install openjdk-21-jre-headless

3. Download PaperMC

We recommend PaperMC for better performance over the vanilla jar. Navigate to a new directory named "minecraft" and download the latest Paper build using wget.

4. Accept the EULA and Run

On the first run, the server will stop and ask you to accept the EULA. Edit eula.txt and change false to true. Then restart your server using a startup script (like bash) inside a tmux or screen session so it runs continuously in the background.

Conclusion: Starting your own server can take a bit of technical knowledge, but it's an incredible learning experience that opens the doors to unlimited possibilities in the Minecraft universe.