moonlight200 / minecraft-tmux-service

A systemd service that starts the minecraft server in a tmux session
GNU General Public License v3.0
37 stars 13 forks source link
minecraft systemd tmux

Minecraft tmux service

With these files a minecraft server can be started in a tmux session via systemd. This allows to easily start and stop the server while still being able to connect to its console.

Requirements

tmux needs to be installed on the system.

The script was written for the following settings. If any of those don't match your system, you might have to change the script accordingly.

Installation

Usage

You can now start the server via systemd:

systemctl start minecraft

To attach to the tmux session that the service is running in, run:

/var/minecraft/service.sh attach