1. Connect to Your Server
ssh root@YOUR_SERVER_IP
Or use the web terminal in the Sitequest dashboard.
2. Install Java
Minecraft requires Java 21+:
apt update
apt install -y openjdk-21-jre-headless
Verify:
java -version
3. Create a Minecraft User
useradd -m -s /bin/bash minecraft
4. Download the Server
Switch to the minecraft user and download the latest server jar:
su - minecraft
mkdir -p ~/server && cd ~/server
curl -LO https://piston-data.mojang.com/v1/objects/SERVER_JAR_URL/server.jar
Replace the URL with the latest download link from minecraft.net/download/server.
5. Accept the EULA
echo "eula=true" > eula.txt
6. Configure the Server
Create or edit server.properties:
nano server.properties
Key settings:
server-port=25565
max-players=20
motd=A Sitequest Minecraft Server
online-mode=true
difficulty=normal
view-distance=10
Adjust view-distance and max-players based on your VPS RAM.
7. Start the Server
java -Xms1G -Xmx2G -jar server.jar nogui
Adjust -Xmx to match your available RAM (leave at least 512 MB for the OS). Press Ctrl+C to stop the server.
8. Create a systemd Service
Exit back to root (exit) and create the service file:
nano /etc/systemd/system/minecraft.service
[Unit]
Description=Minecraft Server
After=network.target
[Service]
User=minecraft
WorkingDirectory=/home/minecraft/server
ExecStart=/usr/bin/java -Xms1G -Xmx2G -jar server.jar nogui
Restart=on-failure
RestartSec=10
StandardInput=null
[Install]
WantedBy=multi-user.target
Enable and start:
systemctl daemon-reload
systemctl enable minecraft
systemctl start minecraft
9. Open Firewall Ports
If you use the Sitequest firewall, open TCP port 25565.
With ufw:
ufw allow 25565/tcp
10. Connect
Open Minecraft, go to Multiplayer > Add Server, and enter your server's IP address. The default port is 25565.
Next Steps
- Install PaperMC instead of vanilla for better performance and plugin support
- Set up automatic backups with a cron job
- Configure a whitelist for private servers
- Set up Let's Encrypt SSL if you run a web map (Dynmap/BlueMap)