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).
Install Java. The latest version of Minecraft needs Java 16 to run properly.
$ sudo apt update
$ sudo apt install apt-transport-https software-properties-common gnupg wget
$ wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
$ sudo add-apt-repository https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
$ sudo apt update
$ sudo apt install adoptopenjdk-16-hotspot
Screen is a GNU utility that allows Minecraft to run in the background.
$ sudo apt install screen -y
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 nogui
Make start.sh executable.
$ chmod +x start.sh
Agree to Minecraft's End User License Agreement.
$ echo "eula=true" > eula.txt
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
.
Congratulations, you now have a Minecraft server installed on Debian 10.