This script is made for Debian (min. stable) and Debian based Distros. Might also work on other linux distros with apt-packagemanager installed.
WARNING: Autoupdates might cause Problems. Use FTP-Backup or Nextcloud-Backup if possible
HIGHLY RECOMMENDED TO USE THE FTP- OR NEXTCLOUD-BACKUP!!! LINK
- Setup for probably all MC-Versions
- Autoupdate of Paper for the specified Version (default 1.18.X)
- creating a backup.zip of the three Vanilla levels and all plugins; Easy to add more Levels/files for the backup (on-Drive-Backup by default, use FTP- or Nextcloud-Backup if possible)
- Autorestart
- Autoactivate noip2 on startup (also works without noip2 installed)
- creates a serverlog (screenlog.0)
- Debian/linux with ssh-server (Option at Installation with netinstaller)
- Putty and WinSCP/FileZilla
- ssh-login with root enabled. (if sudo is not preconfigured) Link!
- Click on Code
- Click Download ZIP
- Extract the files
- Download/Install Putty and connect to your Linux-System (get the IP with a networkscan app or with your Router)
- maybe you need to install sudo: Login with your root user (Username: root password: YOURROOTPASSWORD)
apt update
apt -y upgrade
apt -y install sudo
Grant your normal user sudo access; Replace "USER" with your normal username
usermod -aG sudo USER
systemctl restart
- Wait till reboot of Debian finished and reconnect Putty to login in with your normal user
- setup the serverfolder:
mkdir minecraft
- Download/Install WinSCP/FileZilla and connect to your Linux-System
- Login as your normal user
- navigate to /home/USER/minecraft Folder
- upload the extracted loop.sh, update.sh and start.sh
- switch back to putty:
cd minecraft/
chmod 0750 start.sh loop.sh update.sh
./start.sh
Enter your sudo password and the script will do the rest.
- Completely stop the server (Press ctrl+C when you logged into your Server console)
- Download the File with WinSCP/Filezilla and edit with Notepad++
- Save (and upload the file)
- run the server
./start.sh
The changes you can do, are described in the comments which are the Lines beginning with a "#". They are written in capital letters.
- Create a Account at noip.com and create a new hostname
- Install noip2
- Forward TCP/UDP Port 25565 to your Debian/Linux System in your Routers settings
- if you write /stop into the chat of the Minecraft server it stops, updates PaperMC to the latest Version, creates the backup, (uploads the backup via ftp or Nextcloud) and restarts
- if you want to start the server use Putty and login with your normal user
cd minecraft/
./start.sh
- if you want to login to the serverconsole while the server is running use Putty and login with your normal user
screen -r
- to download the backup, connect to your server with WinSCP/FileZilla and download the backup.zip in /home/USER/minecraft/backup/