The main purpose of this repository is to develop a minecraft server management script. Its driving goals are minimalism, versatility (spigot/papermc/cuberite/...) and feature completeness.
The script depends on tmux
to fork the server into the background and communicate with it.
All the communication namely querying for online users and issuing commands in the console of the server is done using tmux
.
While the server is offline, the script can listen on the minecraft port for incoming connections and start up the server as soon as a user connects.
-
bash
-
awk
-
sed
-
sudo -- privilege separation
-
tmux -- communication with server
-
netcat -- listen on the minecraft port for incoming connections while the server is down (optional)
-
tar -- take world backups (optional)
make
make install
make GAME=spigot \
INAME=spigot \
SERVER_ROOT=/srv/craftbukkit \
BACKUP_PATHS="world world_nether world_the_end" \
GAME_USER=craftbukkit \
MAIN_EXECUTABLE=spigot.jar \
SERVER_START_CMD="java -Xms512M -Xmx1024M -jar ./spigot.jar nogui"
make install \
GAME=spigot \
INAME=spigot
The world data is stored under /srv/minecraft and the server runs as minecraft user to increase security. Use the minecraft script under /usr/bin/minecraftd to start, stop or backup the server.
Adjust the configuration file under /etc/conf.d/minecraft to your liking.
For the server to start you have to accept the EULA in /srv/minecraft/eula.txt ! The EULA file is generated after the first server start.
Unless otherwise stated, the files in this project may be distributed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This work is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See version 2 and version 3 of the GNU General Public License for more details.