Back to Blog

How to Set Up a Minecraft Server From Scratch

How to Set Up a Minecraft Server From Scratch
Command of the Day
java -Xms2G -Xmx4G -jar paper.jar nogui

What it does: Starts a Minecraft server allocating a minimum of 2GB and a maximum of 4GB of RAM.

Running your own Minecraft server gives you complete control over your world, plugins, and players. While RivinCloud offers dedicated Game Hosting with an easy-to-use control panel, some advanced users prefer to set up their server from scratch on a Linux VPS.

Here is how you do it on an Ubuntu VPS.

1. Install Java

Minecraft is built on Java, so your server needs it to run. The version of Java depends on the Minecraft version you are hosting. For modern versions (1.20+), you need Java 21.

sudo apt update
sudo apt install openjdk-21-jre-headless

2. Download the Server Software

We highly recommend using PaperMC instead of the default Vanilla server. Paper is highly optimized and prevents server lag.

Create a folder for your server and download Paper:

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

3. Accept the EULA

Before the server can start, you must accept the Minecraft End User License Agreement.

Run the server once to generate the files:

java -jar paper.jar

It will stop immediately. Open the newly generated eula.txt file and change eula=false to eula=true.

4. Start the Server

Now you can start your server properly. You should specify how much RAM the server is allowed to use.

java -Xms2G -Xmx4G -jar paper.jar nogui

[!TIP] If you close your SSH terminal, the server will shut down. You should use a tool like tmux or screen to keep it running in the background!

Alternative: Use a Game Panel

If managing everything via the command line sounds tedious, RivinCloud's Game Hosting packages come pre-installed with a powerful control panel. It includes a Plugin Installer, a Player Manager, and automatic crash recovery—so you can focus on playing instead of managing the backend.