Skip to main content

Starting a Minecraft Server on Debian Linux

Requirements

First things first, the requirements for the Minecraft server.

Hardware Requirements

  • 1 GB or more of RAM (2 - 4 GB preferred)
  • 150 MB or more of Storage (SSD preferred)

Software Requirements

  • Java runtime (JRE) 17 or higher

Network Requirements

  • Static IP or Dynamic DNS Address
  • Port forwarding

Creating the Host

I'm going to start by creating a Debian 13 LXC in my Proxmox cluster.

  1. Create CT
  2. Select Debian Linux template
  3. Allocate 8 GB of SSD Storage
  4. Allocate 2 CPU cores
  5. Allocate 4 GB of RAM and 0 Swap

Install prerequisites

apt update
apt install openjdk-25-jre-headless

Download the Java Minecraft Server Executable

  1. Create folder structure
  2. Open a web browser to https://www.minecraft.net/en-us/download/server
  3. Find the link for the minecraft_server_version.jar file
  4. Download the server.jar file
VER=26.1.1
URL=

mkdir -p /opt/minecraft
useradd -r -m -d /opt/minecraft -s /bin/bash minecraft
cd /opt/minecraft
curl $URL --output /opt/minecraft/server-$ver.jar
ln -s /opt/minecraft/server-$ver.jar /opt/minecraft/server.jar
chown -R minecraft:minecraft /opt/minecraft

Accept the EULA

Before we can actually run our server, we have to launch it once and then accept the EULA.

java -jar /opt/minecraft/server.jar --nogui
sed 's/eula=false/eula=true/g' /opt/minecraft/eula.txt -i
chown -R minecraft:minecraft /opt/minecraft

Change Server Properties

As desired, modify the server.properties file. Here are the changes I'll be making.

FILE=/opt/minecraft/server.properties

sed 's/difficulty=.*/difficulty=peaceful/g' $FILE -i
sed 's/enforce-whitelist=.*/enforce-whitelist=true/g' $FILE -i
sed 's/white-list=.*/white-list=true/g' $FILE -i
chown -R minecraft:minecraft /opt/minecraft

Create Systemd Service

tee /etc/systemd/system/minecraft.service << EOF
[Unit]
Description=minecraft_server
After=network.target

[Service]
WorkingDirectory=/opt/minecraft
User=minecraft
Group=minecraft
ExecStart=java -Xmx2G -jar server.jar --nogui
Type=simple

[Install]
WantedBy=default.target
EOF

Launch Minecraft Server

systemctl daemon-reload
systemctl enable minecraft --now
Back