Install Minecraft Server ​
- update your system and install necessary programs
apt update && upgrade -yapt update && upgrade -yDebian 10
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2Aapt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2Aecho "deb http://ppa.launchpad.net/linuxuprising/java/ubuntu focal main" | tee /etc/apt/sources.list.d/java.listecho "deb http://ppa.launchpad.net/linuxuprising/java/ubuntu focal main" | tee /etc/apt/sources.list.d/java.listapt updateapt updateapt install screen gnupg oracle-java17-installer -yapt install screen gnupg oracle-java17-installer -yAccept the license conditions by clicking on "OK" with TAB and confirm with ENTER. In the following window click on "YES" and confirm again with ENTER.
Debian 11
apt install screen openjdk-17-jre-headless -yapt install screen openjdk-17-jre-headless -yUbuntu
sudo apt install screen gnupg software-properties-common -ysudo apt install screen gnupg software-properties-common -ysudo add-apt-repository ppa:linuxuprising/javasudo add-apt-repository ppa:linuxuprising/javasudo apt updatesudo apt updatesudo apt install oracle-java17-installer -ysudo apt install oracle-java17-installer -yAccept the license conditions by clicking on "OK" with TAB and confirm with ENTER. In the following window click on "YES" and confirm again with ENTER.
- create a subuser for the server and log in
adduser minecraft --disabled-loginadduser minecraft --disabled-loginsu minecraft -lsu minecraft -l- version selection (for example with Spigot 1.19.3)
wget https://download.getbukkit.org/spigot/spigot-1.19.3.jarwget https://download.getbukkit.org/spigot/spigot-1.19.3.jar- create start file
Create a start.sh with:
nano start.shnano start.shNow copy the following line and paste it with a left click:
screen -AmdS minecraft java -Xms1G -Xmx1G -jar spigot-1.19.3.jar screen -AmdS minecraft java -Xms1G -Xmx1G -jar spigot-1.19.3.jarWARNING
change the 1 in -Xmx1G to the number of your ram e.g. 10 (server with 10 gigabyte ram)
INFO
Now save the entry with CTRL + O and close the window with CTRL + X
- accept licenses and assign file rights
echo "eula = true" > eula.txtecho "eula = true" > eula.txtchmod +x start.shchmod +x start.sh- start server
./start.sh./start.shINFO
The console can be opened with "screen -r minecraft".