In this tutorial we will show you how to install Minecraft server on Debian 9 Stretch. For those of you who didn’t know, Minecraft is a game about breaking and placing blocks. The creative and building aspects of Minecraft allow players to build constructions out of textured cubes in a 3D procedurally generated world. Minecraft servers allow players to play online or via a local area network with other people. They may either be run on a hosted server, on local dedicated server hardware, a Virtual Private server on a home machine, or on your local gaming computer.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Minecraft Server on an Debian 9 Stretch server.
Install Minecraft Server on Debian 9 Stretch
Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.
Minecraft server setup requires Java to be installed on your system:
Verify the installation by printing the java version:
First, Run the following command to create three new directories inside the user home directory:
Next, Downloading and Compiling mcrcon:
Then, Downloading Minecraft Server:
wgethttps://launcher.mojang.com/v1/objects/3737db93722a9e39eeada7c27e7aca28b144ffa7/server.jar -P ~/server
Once the download is completed, navigate to the ~/server directory and start the Minecraft server:
Next, Open the eula.txt file and change eula=false to eula=true:
### nano ~/server/eula.txt
#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).
#Thu Dec 27 03:33:56 PST 2018
Then, edit the server.properties file to enable the rcon protocol and set the rcon password. You can use this settings to connect to the Minecraft server using the mcrcon tool:
### nano ~/server/server.properties
To run Minecraft as a service we will create a new Systemd unit file:
Paste the following file:
Save and close the file and notify systemd that we created a new unit file:
If your server is protected by a firewall and you want to access Minecraft server from the outside of your local network you need to open port 25565:
To access the Minecraft Console you can use the mcrcon utility. The syntax is as follows, you need to specify the host, rcon port, rcon password and use the -t switch which enables the mcrcon terminal mode:
Congratulation’s! You have successfully installed Minecraft. Thanks for using this tutorial for installing Minecraft server on Debian 9 (Stretch) system. For additional help or useful information, we recommend you to check the official Minecraft web site.