How to Install a Minecraft Server on Ubuntu Server (22.04/24.04)
Minecraft isn’t just a game—it’s a platform for creativity, collaboration, and even education. Running your own Minecraft server gives you full control over mods, worlds, and who plays. In this guide, we’ll walk you through setting up a vanilla Minecraft server on an Ubuntu 22.04 or 24.04 server from Cloudnium.net
✅ Prerequisites
Before you begin:
-
You need an Ubuntu server (22.04 or 24.04 LTS).
-
At least 2GB of RAM (4GB recommended for smooth play).
-
A non-root user with
sudoprivileges. -
ufwor another firewall tool installed.
🧱 Step 1: Update the Server
First, make sure your server is up to date:
Install basic dependencies:
☕ Step 2: Install Java
Minecraft requires Java 17 or newer.
Confirm the version:
You should see something like:
📁 Step 3: Create a Minecraft Server Directory
It’s a good idea to keep your server files organized:
📥 Step 4: Download the Minecraft Server .jar
Visit https://www.minecraft.net/en-us/download/server and copy the link for the latest .jar file.
Then use wget to download it. Example:
(Replace the URL with the actual current one from Mojang)
🛡️ Step 5: Accept the EULA
Run the server once to generate the files:
You’ll see an error about the EULA. Open the file:
Change:
To:
Save and exit.
🧠 Step 6: Configure Basic Server Settings (Optional)
Open server.properties to tweak game rules like difficulty, PvP, max players, etc.
Make your changes, then save.
🚀 Step 7: Start the Server
Now start the Minecraft server:
This will launch your Minecraft world. It may take a minute or two to finish generating.
🔒 Step 8: Open Firewall Ports
Allow Minecraft’s default port (25565):
🔁 Optional: Keep It Running in the Background
You can use screen or tmux to keep your server running after you disconnect:
To detach from the session:Ctrl + A, then D
To reattach later:
🌍 Connect to Your Server
Launch Minecraft on your client and connect to your server using your server's public IP address and port 25565.