These are the steps I took and the commands to install Minecraft on Debian
- Install Debian from https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
- Once the software is installed run the following commands
sudo apt-get update
sudo apt-get upgrade
- Reboot when done and then run the following command
sudo apt install default-jdk
- Optional: If you want to install a certain version put -rev version number after BuildTools.jar on the last command line 4. Reference
mkdir /home/user/minecraft
cd /home/user/minecraft
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
java -Xmx1024M -jar BuildTools.jar
- Next here is the command to start the server
java -Xms512M -Xmx1008M -jar /home/user/minecraft/spigot-1.16.5.jar -nogui
- You will need to set the eula.txt line to true in order to start the server
nano eula.txt
- Change eula=false to eula=true then save and exit
- run the java command above again to start the server
- In Minecraft when you load up the game select multiplayer and put in the ip address of your server
Register it as a service to start automatically
- The create a service to start automatically when the computer reboots you will enter this command to create the service file
sudo nano /lib/systemd/system/minecraftserver.service
[Unit]
Description=Minecraft Spigot Server
[Service]
User=root
Group=root
Restart=on-abort
WorkingDirectory=/home/user/minecraft/
ExecStart=/usr/bin/java -Xms512M -Xmx1008M -jar /home/user/minecraft/spigot-1.16.5.jar nogui
[Install]
WantedBy=multi-user.target
- Enable the service like so
sudo systemctl enable minecraftserver.service
- reboot to start the service or enter the following
sudo systemctl start minecraftserver.service
References:
https://www.youtube.com/watch?v=BWtwfzy2A8M
https://www.spigotmc.org/wiki/buildtools/?__cf_chl_jschl_tk__=006b6950dc3b85e9bce7ee109d7f2a5c0768d674-1616508324-0-AW6wgSsUGLqVoPEboG57tOukZHksUchoTLasgNSPjaZ2SEpaPTGVasv2TaNyN0pV9yvABWwlApKsBiYVGi5lzY_dBFR3UUpS8inQS9yBvGrU2Y_qCRwK9pROzRMtBa2jmhAuB6pU9qprs4zc93FNeuJKS8RValzSw8qgMeugqKApAcfHPpToZW680cOOdn-8DDdjfHvt9ZsukWJ52HlBoWX_5GadgE0S4r41mCjcdCLUUk03dUiDTfnZWzI-Pn189X59IGsJzSt4D1ud8EamQqFReJkEuiJa2kqZXz_ts-YQScNTtNXE8PbUA52Of2uDP5zpebtcSp0Tep8Ww1E5jwE#linux