Build Your Dream Minecraft Server: Easy Ubuntu Setup Guide (2025)

👋 Welcome, Minecraft Builders!
Want to host your own Minecraft Java Edition server on Ubuntu? Whether you’re starting a private world for friends or launching a massive multiplayer hub, this guide will show you how to set it all up from scratch—no advanced server knowledge needed!
Follow these steps to create a reliable and secure Minecraft server on Ubuntu. Let’s get started!
✅ What You’ll Need
Before we begin, make sure you have:
- An Ubuntu VPS or dedicated server (Ubuntu 20.04 or later recommended)
- Basic Linux terminal knowledge
- About 30 minutes of your time
🔧 Step 1: Update Your Ubuntu Server
Keep your system secure and up to date:
bashCopyEditsudo apt-get update && sudo apt-get upgrade -y
☕ Step 2: Install Java & Create a Minecraft User
Minecraft requires Java to run. Install it with:
bashCopyEditsudo apt-get install default-jdk -y
Now create a dedicated user for your Minecraft server:
bashCopyEditsudo adduser mcserver
sudo mkdir /home/mcserver
sudo chown -R mcserver:mcserver /home/mcserver
📥 Step 3: Download & Install the Minecraft Server
Go to the official Minecraft Java Edition download page and grab the .jar server file.
Move it to your server directory and extract if necessary:
bashCopyEdittar -xvf minecraft_server.tar.gz -C /home/mcserver
sudo chmod +x /home/mcserver/minecraft_server.jar
🚀 Step 4: Create a Startup Script
Make it easy to launch your server with a startup script:
Create start_server.sh inside /home/mcserver:
bashCopyEdit#!/bin/bash
cd /home/mcserver
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
Then make it executable:
bashCopyEditchmod +x start_server.sh
⚙️ Step 5: Set Up a systemd Service
Ensure your server runs smoothly with systemd.
Create a new service file:
bashCopyEditsudo nano /etc/systemd/system/minecraftserver.service
Paste in the following:
iniCopyEdit[Unit]
Description=Minecraft Server
After=network.target
[Service]
User=mcserver
Group=mcserver
ExecStart=/usr/bin/bash /home/mcserver/start_server.sh
Restart=always
[Install]
WantedBy=multi-user.target
Enable and start the service:
bashCopyEditsudo systemctl enable minecraftserver
sudo systemctl start minecraftserver
🖥️ Managing Your Minecraft Server
- Use
screenortmuxto run your server in the background - Log in as
mcserverto manage files - Use the
/op yourusernamecommand in the server console to become an admin
🎮 Invite Friends & Grow Your Community
Your Minecraft server is now live! Share your IP address with friends and start building your world together.
You can also:
- Customize gameplay with plugins or mods
- Set up whitelist or permissions
- Explore performance optimization tools
🧱 Wrapping Up
With just a few commands, you’ve set up a powerful and private Minecraft Java server on Ubuntu. Ready to explore, build, and survive with your friends?
💬 Got questions or tips? Drop them in the comments below!
📌 Don’t forget to bookmark this guide and share it with other Minecraft fans!
Happy crafting! See you online!