In this blog article I want to show you how you can change Minecraft on Debian 9/10/11.
First we connect to our server via SSH, e.g. with Putty.
Now we run the following command:
- Update the server:
root@testserver ~ # apt update & apt upgrade -y - Now let's check whether Java is installed:
root@testserver ~ # java -version
java version "1.8.*_***"
Java(TM) SE Runtime Environment (build 1.8.*_**-***)
Java HotSpot(TM) 64-Bit Server VM (build **.**-**, mixed mode) - Create a Minecraft user:
root@testserver ~ # adduser --disabled-login minecraft
The details such as name, phone number, e-mail... can be skipped. - Log in as the new user:
root@testserver ~ # su - minecraft
The user's home directory can be found at /home/minecraft. - Download the desired version:
Spigot 1.8.8:
root@testserver ~ # wget https://cdn.getbukkit.org/spigot/spigot-1.8.8-R0.1-SNAPSHOT-latest.jar
Spigot 1.16.4:
root@testserver ~ # wget https://cdn.getbukkit.org/spigot/spigot-1.16.4.jar
Craftbukkit 1.8.8:
root@testserver ~ # wget https://cdn.getbukkit.org/craftbukkit/craftbukkit-1.8.8-R0.1-SNAPSHOT-latest.jar
Craftbukkit 1.16.4:
root@testserver ~ # wget https://cdn.getbukkit.org/craftbukkit/craftbukkit-1.16.4.jar
More versions:
https://getbukkit.org/download/spigot
https://getbukkit.org/download/craftbukkit - Create the start file:
root@testserver ~ # nano start.sh - Now enter the following into the window:
screen -AmdS minecraft java -Xms1024M -Xmx1024M -jar spigot-1.8.8-R0.1-SNAPSHOT-latest.jar
With -Xms and -Xmx you can specify the desired amount of memory.
Also, the name of the file (spigot-1.8.8-R0.1-SNAPSHOT-latest.jar) must be specified correctly.
Afterwards we need to save with CTRL + X and then the Y key. - Grant permissions:
root@testserver ~ # chmod +x start.sh - Accept the license terms (EULA):
root@testserver ~ # echo "eula = true" > eula.txt - Run the start file:
root@testserver ~ # ./start.sh - Open the console:
root@testserver ~ # screen -r minecraft
Frequently asked questions
How do I check whether Java is installed?
Run `java -version` on your server; it prints the installed Java Runtime Environment version.
Which user should run the Minecraft server?
Create a dedicated user with `adduser --disabled-login minecraft` and switch to it with `su - minecraft` before downloading and starting the server.
How do I start and reopen the Minecraft server console?
Start it with `./start.sh`, which launches a detached `screen` session; reopen the console anytime with `screen -r minecraft`.