How to set up a dedicated Minecraft server

Minecraft isn’t just a game, it’s your creative sandbox, your battleground, your digital home. Whether you’re building Redstone contraptions, exploring deep caves with friends, or managing a large-scale modded community, having your own Minecraft dedicated server gives you complete control over gameplay, performance, and who gets to join your world.

This step-by-step guide shows you how to set up a Minecraft server on a dedicated server, including server configuration, optimization tips, and how to keep your world running like a dream.

Get premium gaming servers

See what happens when you host an environment on pro-level hardware

System requirements

Before you dive in, make sure your server meets the recommended specs. Minecraft can be surprisingly demanding, especially with mods or lots of players.

Recommended dedicated server specs:

Step 1: Prepare the server environment

Keep your system lean and updated:

sudo apt update && sudo apt upgrade -y

Install the latest stable version of Java 17 (required for Minecraft 1.18+ and beyond):

sudo apt install openjdk-17-jdk -y

Verify Java installation:

java -version

Step 2: Download and launch the Minecraft server

Set up a directory for your server:

mkdir -p ~/minecraft && cd ~/minecraft

Download the official Minecraft server .jar:

wget https://piston-data.mojang.com/v1/objects//server.jar

Accept the End User License Agreement (EULA):

echo “eula=true” > eula.txt

Start the server for the first time:

java -Xmx4G -Xms4G -jar server.jar nogui

Once the server runs and generates default files, shut it down using CTRL + C to begin configuration.

Step 3: Configure your Minecraft server

Open the configuration file:

nano server.properties

Key settings to customize:

Save with CTRL + X, then Y and confirm.

Step 4: Open firewall and set up port forwarding

Allow traffic through Minecraft’s default port (25565):

sudo ufw allow 25565/tcp
sudo ufw enable

If you’re behind a router (common with home setups), configure port forwarding for port 25565 in your router settings.

Step 5: Run Minecraft as a background service

Create a systemd service to automatically launch your server:

sudo nano /etc/systemd/system/minecraft.service

Paste in:

[Unit]
Description=Minecraft Server
After=network.target

[Service]
User=your-username
WorkingDirectory=/home/your-username/minecraft
ExecStart=/usr/bin/java -Xmx4G -Xms4G -jar server.jar nogui
Restart=always

[Install]
WantedBy=multi-user.target

Reload services and start your server:

sudo systemctl daemon-reload
sudo systemctl enable minecraft
sudo systemctl start minecraft

Your server will now run in the background and restart automatically on reboot.

Step 6: Join the Minecraft server

To join:

Step 7: Optimize performance and set up backups

A lag-free world is a happy world. Here’s how to keep your server snappy and safe.

Performance tips:

-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200

World backups:

Back up your Minecraft world regularly

tar -czf minecraft-backup-$(date +%F).tar.gz ~/minecraft/

You can also automate this with a cron job.

Keep your server updated:

Download the latest server version:

wget -O server.jar https://piston-data.mojang.com/v1/objects//server.jar

Restart the service:

sudo systemctl restart minecraft

Why use a dedicated server for Minecraft?

Hosting Minecraft on a dedicated server gives you exclusive resources, full admin control, and maximum performance, especially for larger player communities or mod-heavy setups. Whether you’re building a whitelist-only survival realm or a bustling minigame network, dedicated hosting ensures:

If you’re just starting or testing a smaller server, consider spinning up a Gaming VPS, which can easily scale up when you’re ready to go full dedicated.

Additional resources

How to start selling Minecraft servers →

Turn a hobby into a side-hustle

Latency and rage-quitting →

Liquid Web’s industry study on latency and gaming

Dedicated vs. listen servers →

Pros and cons of each so you can decide what you need

Image

Alex Napier is an Affiliate Program Manager at Liquid Web and a gaming marketing specialist. He blends data with creativity to build engaging communities. Outside of work, Alex enjoys exploring new games, crafting tabletop worlds, and connecting with the gaming community.