LEVEL 1Ubuntu / Linux Setup

Run a server on Ubuntu

Install Ubuntu Server, Java and Paper, then run it safely as a service.

◷ About 30 minCarefulReviewed Aug 18, 2026
On this pageThe short path1. Install Ubuntu Server LTS2. Install Java3. Create the server folder4. Start once and accept the EULA5. Open only the game port6. Test at home7. Start it automaticallyNext

The short path#

Ubuntu Server → Java → Paper → `start.sh` → EULA → local test → systemd.

Choose Ubuntu when the PC is dedicated to hosting and you are comfortable using a terminal. Prefer Windows for familiar desktop folders or ZimaOS for a browser dashboard.

1. Install Ubuntu Server LTS#

  1. 1
    Back up the PC. Installing Ubuntu can erase the selected drive.
  2. 2
    Download the current Ubuntu Server LTS.
  3. 3
  4. 4
    Select OpenSSH server during installation if you want to manage it from another computer.
  5. 5
    Sign in and update the system:
bash
sudo apt update && sudo apt upgrade -y

2. Install Java#

Current Paper 26.x uses Java 25; Paper 1.20 through 1.21.11 uses Java 21. Follow Paper's official Ubuntu/Debian Java steps, then confirm:

bash
java -version

3. Create the server folder#

bash
sudo mkdir -p /opt/minecraft
sudo chown "$USER":"$USER" /opt/minecraft
cd /opt/minecraft

Download Paper from the official Paper page, move the jar into /opt/minecraft, and rename it paper.jar.

4. Start once and accept the EULA#

bash
chmod +x start.sh
./start.sh

The first run creates eula.txt and stops. Read the linked Minecraft EULA. Change eula=false to eula=true only if you agree, then run ./start.sh again and wait for Done.

5. Open only the game port#

If you manage the machine through SSH, allow SSH before enabling UFW:

bash
sudo ufw allow OpenSSH
sudo ufw allow 25565/tcp
sudo ufw enable
sudo ufw status

Ubuntu documents UFW as its default firewall tool. Open only the Minecraft port you use.

6. Test at home#

Find the server's local address:

bash
hostname -I

Join that address from Minecraft on another device at home. Finish the LAN test before Playit or port forwarding.

7. Start it automatically#

After the manual server works, create /etc/systemd/system/minecraft.service:

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

[Service]
User=YOUR_LINUX_USERNAME
WorkingDirectory=/opt/minecraft
ExecStart=/opt/minecraft/start.sh
Restart=on-failure
TimeoutStopSec=60

[Install]
WantedBy=multi-user.target

Replace YOUR_LINUX_USERNAME, then enable it:

bash
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft
sudo systemctl status minecraft

Stop it before a manual backup with sudo systemctl stop minecraft. View recent logs with sudo journalctl -u minecraft -n 100 --no-pager.

Next#

Was this page helpful?