kaidelorenzo/minecraft-server

Project ID: 116900

Description

minecraft-server

minecraft-server is a wrapper for the Java and Bedrock Minecraft servers that adds proper systemd support. The core functionality includes proper signal handling for SIGINT and SIGTERM, systemd user services, support for the XDG Base Directory Specification, and a Fedora Copr package for seamless upgrades.

Latest Release pipeline status

Mozilla Public License Version 2.0

Release Schedule

Each release is tied to a specific version of the Minecraft server binaries provided by Mojang.

New releases are built and deployed on Copr for every server binary update released by Mojang. Copr automatically deletes old builds so the latest version is the only one that's guaranteed to be available.

Builds are made available for/build against the latest Fedora and EPEL versions on the x86_64 and AArch64 platforms.

Features

  • Standard input and output are passed through to the Minecraft server executables (works almost identically to the Mojang released CLI)
  • Proper signal handling for SIGTERM and SIGINT (including ctrl+c) for safe server shutdown
  • systemd user services
  • Support for the XDG Base Directory Specification
  • Copr package for seamless upgrades built against latest Fedora and EPEL
  • Arguments passed to the minecraft-server executables are passed on to the Minecraft server binaries

Installation Instructions

Installation

  1. dnf copr enable kaidelorenzo/minecraft-server
  2. dnf install minecraft-server-java

    or

    dnf install minecraft-server-bedrock

Uninstallation

  1. dnf remove minecraft-server-java

    or

    dnf remove minecraft-server-bedrock
  2. dnf copr remove kaidelorenzo/minecraft-server
  3. Delete the net.minecraft.JavaServer and net.minecraft.BedrockServer directories from the $XDG_DATA_HOME and $XDG_CONFIG_HOME directories (see XDG Base Directory Specification)

  4. Delete any manually created configuration files

Simple Usage

Start the server

from the terminal shell

minecraft-server-java

or

minecraft-server-bedrock

with systemd

systemctl --user enable --now minecraft-server-java

or

systemctl --user enable --now minecraft-server-bedrock

To enable auto launch on system start for the currently logged in user:

loginctl enable-linger

https://wiki.archlinux.org/title/Systemd/User#Automatic_start-up_of_systemd_user_instances

To view output:

journalctl --user-unit minecraft-server-java

or

journalctl --user-unit minecraft-server-bedrock

Use the --follow option to continually view messages

To send commands:

  • One at a time:

    echo "help" > $XDG_RUNTIME_DIR/minecraft-server-java.stdin

    or

    echo "help" > $XDG_RUNTIME_DIR/minecraft-server-bedrock.stdin
  • One after the other (with history via up/down arrows) while viewing the server output:

    journalctl --user-unit minecraft-server-java --follow & rlwrap cat > $XDG_RUNTIME_DIR/minecraft-server-java.stdin help help list list <ctrl+c/d>/^C/D # exiting the shell should stop the journalctl job (exit) # to manually stop it do the following # find the id of the background journalctl job (it's 1 in this case) jobs # connect to it fg 1 <ctrl+c>/^C

    or

    journalctl --user-unit minecraft-server-bedrock --follow & rlwrap cat > $XDG_RUNTIME_DIR/minecraft-server-bedrock.stdin help help list list <ctrl+c/d>/^C/D # exiting the shell should stop the journalctl job (exit) # to manually stop it do the following # find the id of the background journalctl job (it's 1 in this case) jobs # connect to it fg 1 <ctrl+c>/^C

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

Release Architectures Repo Download
EPEL 9 aarch64 (31)*, x86_64 (83)* EPEL 9 (33 downloads)
Fedora 40 aarch64 (8)*, x86_64 (5)* Fedora 40 (8 downloads)

* Total number of downloaded packages.