Minecraft has captured the hearts of gamers worldwide, offering various versions, each requiring a server to host and manage games. This guide will walk you through setting up a Minecraft server on Debian 10 using open-source tools from the official Minecraft website.
Prerequisites
- A Debian installation with root privileges.
- A Minecraft server compatible with your Debian release. If you’re using Ubuntu, visit the official Minecraft website for compatibility guidance. If unsure, try Googling for “Minecraft Server compatible with Debian/Ubuntu” or ask in the comments for assistance!
Getting Started
Update Your Debian System
Updating your system is a crucial step for security and obtaining the latest software updates. Run the following commands:
sudo apt update
sudo apt upgrade
Updates usually complete within five minutes unless significant upgrades are involved, in which case it may take longer.
Install Java
sudo apt install default-jre
Java is essential for running Minecraft. Confirm the installation by executing:
java -version
Create a New User for Minecraft
Create a dedicated user for Minecraft:
sudo adduser minecraft
Secure the account with a strong password and add the user to the sudo group:
sudo usermod -aG sudo minecraft
Install Screen
Screen allows you to manage terminal sessions effectively. Install it with:
sudo apt install screen -y
Install Minecraft
Re-login as the minecraft user, create a Minecraft directory, and navigate to it:
mkdir minecraft
cd minecraft
Download the current Minecraft server version:
wget https://launcher.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar
Create a Startup Script
sudo nano start.sh
Insert this line into your script file:
java -Xms1024M -Xmx2560M -jar server.jar nogui
Make the startup script executable:
sudo chmod +x start.sh
Run Your Minecraft Server
./start.sh
Accept the Terms of Service and Privacy Policy, then set the EULA to true:
sudo nano eula.txt
eula=true
Run the server in a screen session:
screen /home/minecraft/run.sh
Configure Your Minecraft Server Firewall
Configure UFW to allow Minecraft traffic:
sudo ufw allow 25565
Connect to Your Minecraft Server
Launch your Minecraft client, go to Multiplayer, and enter your server details.
You need an external domain and set up a Dynamic DNS to play on a public network.
Press “Join Server” to connect. Congratulations! Enjoy building worlds with friends. For more information, visit the Minecraft Wiki.
Conclusion
Setting up a Minecraft Server on Debian is easy if you follow this guide. These steps apply to any Debian system like Debian Stretch. We hope this tutorial helps you set up your server. For questions or feedback, comment below. Happy mining!
Frequently Asked Questions (FAQ)
- Can I run this server on Ubuntu instead of Debian?Yes, the steps are similar. Ensure the server version is compatible with your Ubuntu release.
- How do I update my server when new versions are released?Download the latest server.jar and replace the existing one in your Minecraft directory, then restart the server.
- Do I need a powerful server to run Minecraft?Minecraft can run on modest hardware, but performance depends on the number of players and mods.
- Is it necessary to use screen for running the server?While not essential, screen is recommended for managing server processes without keeping the terminal open.