Article

Install a Minecraft Server on Debian 10

Last Updated: Tue, Apr 23, 2019
Debian Game Servers Linux Guides Minecraft

Introduction

A Minecraft server allows you to play Minecraft online with other people. This guide explains how to install a Minecraft server on Debian 10 (Buster).

Step 1: Prepare the System

Step 2: Install Java

Install the headless OpenJDK version.

$ sudo apt install openjdk-11-jre-headless -y

Step 3: Install Screen

Screen is a GNU utility that allows Minecraft to run in the background.

$ sudo apt install screen -y

Step 4: Install Minecraft

Change to the mcuser home directory.

$ cd ~

Create and change to the minecraft folder.

$ mkdir minecraft
$ cd minecraft

Download the Java server. Use the URL on the Minecraft.net download page.

$ wget https://launcher.mojang.com/[NEWEST_VERSION]/server.jar

Create a startup script.

$ nano start.sh

Paste this script into start.sh. Replace 1024M with the RAM installed on your server.

#!/bin/sh

java -Xms512M -Xmx1024M -jar server.jar

Make start.sh executable.

$ chmod +x start.sh

Agree to Minecraft's End User License Agreement.

$ echo "eula=true" > eula.txt

Step 5: Start the Server

Start screen.

$ screen -S "My Minecraft Server"

Run the startup script.

$ cd ~/minecraft
$ ./start.sh

To exit out screen, press CTRL + A, then D. To open the window again, use screen -r.

Conclusion

Congratulations, you now have a Minecraft server installed on Debian 10.

Want to contribute?

You could earn up to $300 by adding new articles