Hosting your own Minecraft server on Debian 12 is an exciting endeavor that allows you to create and manage your own virtual world. This guide will walk you through the process, from installing the necessary software to configuring the server settings.
Step 1: Install Java
Minecraft requires Java to run. Install OpenJDK by running the following command:
sudo apt update
sudo apt install openjdk-17-jre
Step 2: Download Minecraft Server
Create a directory for your server and navigate to it:
mkdir minecraft_server
cd minecraft_server
Download the latest Minecraft server .jar file:
wget https://launcher.mojang.com/v1/objects/abc123def456...
Replace the URL with the actual download link.
Step 3: Start the Server
Start the Minecraft server by running:
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
Adjust the -Xmx
and -Xms
values based on your server’s available RAM.
Step 4: Accept EULA
Open the eula.txt
file and change eula=false
to eula=true
to accept the Minecraft End User License Agreement.
Step 5: Configure Server Properties
Edit the server.properties
file to customize your server settings. You can define game rules, world settings, and more.
Step 6: Port Forwarding
If you want others to join your server, you need to set up port forwarding on your router. Forward port 25565 to your server’s local IP address.
Step 7: Allow Firewall Access
Allow incoming traffic on port 25565 using UFW:
sudo ufw allow 25565
sudo ufw enable
Step 8: Start the Server
Restart your server for changes to take effect:
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
Step 9: Connect to Your Server
Launch Minecraft on your computer and select “Multiplayer.” Add your server’s IP address to join.
Optional Step: Using a Server Management Tool
Consider using a server management tool like Spigot or Paper to enhance your server’s functionality and performance.
Conclusion
Hosting a Minecraft server on Debian 12 can provide endless hours of fun for you and your friends. By following this guide, you’ll have your server up and running in no time. Remember to regularly back up your world and keep the server software updated for the best experience. Enjoy your virtual adventures in your self-hosted Minecraft world!