Install a Minecraft Server on Debian 10

Updated on August 3, 2021
Install a Minecraft Server on Debian 10 header image


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).

1. Prepare the System

  1. Launch a fresh Debian 10 VPS.

  2. Update the server with our best practices guide.

  3. Create a sudo user named mcuser. Follow our best practices guide. Switch to mcuser for the remainder of this guide.

  4. 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 - | sudo apt-key add -
     $ sudo add-apt-repository
     $ sudo apt update
     $ sudo apt install adoptopenjdk-16-hotspot

2. Install Screen

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

$ sudo apt install screen -y

3. 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 download page.

$ wget[NEWEST_VERSION]/server.jar

Create a startup script.

$ nano

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


java -Xms512M -Xmx1024M -jar server.jar nogui

Make executable.

$ chmod +x

Agree to Minecraft's End User License Agreement.

$ echo "eula=true" > eula.txt

4. Start the Server

Start screen.

$ screen -S "My Minecraft Server"

Run the startup script.

$ cd ~/minecraft
$ ./

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.