Say No to Black Windows! Debian MCSManager Minecraft 1.21 Server Setup Guide
Many new server owners who just started with Linux bought a VPS, only to be stunned by that dark command-line interface when they connected via SSH.
"Who am I? Where am I? How do I start my server?"
To be honest, although veterans are used to pure command-line operations like screen or tmux, for most people, an intuitive panel where you can click a mouse to restart, view logs, and change configurations is a real necessity. Today, I'll teach you how to run the latest Minecraft 1.21 in a Debian environment using one of the best open-source panels in China —— MCSManager (MCSM).
Why choose Debian?
As everyone knows, Mojang's code is a "pile of junk," and Minecraft servers (especially Java Edition) are extremely CPU-intensive on a single core. Debian is famous for being lightweight and stable, and it won't come with a bunch of useless background services like some systems that grab your precious CPU and memory.
Step 1: One-click Installation of MCSManager
Don't bother with source code compilation; there's an official one-click script, just take it:
sudo su -c "wget -qO- https://script.mcsmanager.com/setup_cn.sh | bash"
This step will automatically install the Node.js environment and the MCSM daemon for you. After installation, you will see a prompt like http://your-IP:23333. Don't click it just yet; if it can't be opened, it's usually because the firewall (security group) of the ISP or server provider hasn't opened port 23333.
Step 2: Tackle the "Hard Nut" of Java 21
Minecraft 1.21 mandatory requires Java 21. Debian 12's official source might still be using an old version, so we'll use the Adoptium source directly, which is as stable as a rock:
# Install necessary tools
apt update && apt install -y wget gnupg
# Import GPG key
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add -
# Add source
echo "deb https://packages.adoptium.net/artifactory/debian $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/adoptium.list
# Actually start installing Java 21
apt update
apt install -y temurin-21-jdk
After installation, type java -version. If you see openjdk version "21.x.x", it means you're not far from success.
Step 3: Create a Server in the Panel
- Open
http://your-IP:23333in your browser. The initial account and password are usuallyrootand123456(change them immediately!). - Click "Application Instances" -> "New Instance" -> "Minecraft Java Edition".
- Upload Server Core: Download the 1.21
server.jar. I recommend using Paper or Purpur, as the vanilla server optimization is notoriously bad and will make you question your life. - Configure Parameters:
- Remember to select the Java 21 path you just installed for the startup command.
- Memory allocation: If your VPS has 4G, it's recommended to give 3072M (3G), leaving some breathing room for the system.
Step 4: Traps that Beginners Must Avoid
1. EULA Agreement
The first startup will definitely fail. Don't panic, look at the logs. You'll find it asks you to agree to eula.txt. Find this file in the panel's file management, change false to true, and start again. This is Mojang's daily "disclaimer."
2. Online Mode
If you and your friends haven't bought the game yet (ahem), change online-mode to false in server.properties. But honestly, it's not expensive to support the game.
3. Network and Port Forwarding
If you're hosting a server at home via intranet penetration, or if you want the server address to look more professional, don't just give players the IP+port.
Usually, we configure an SRV record so that players only need to enter mc.yourdomain.com to get in, without having to remember that damn port number. If you don't know how to calculate the priority and weight of an SRV record, you can go to the Minecraft SRV Record Generation Tool to fill out a form and generate it with one click.
Advanced Gameplay: Monitoring Your Server
The server is up, but how do you know if it's lagging? Or want to display the server status on a webpage?
You can directly use the Minecraft Server Status Query to see the current TPS (if plugins are installed), number of online players, and version number. This tool is especially useful when troubleshooting "why can't I connect to the server," as it can tell at a glance whether the backend is down or your network is glitchy.
Summary
Hosting a server on Debian is not that difficult; the key is choosing the right tools. MCSManager helps you solve the tedious background management, and you only need to focus on how to make the server fun.
If you encounter permission errors (Permission Denied) during the process, remember to check if the file belongs to the root user, or simply use chmod -R 755 as a brute-force solution (although not recommended, it's most effective for beginners).
Good luck to all server owners, and may you soon become a hundred-player server!