MCRunner

MCRunner is a client/server system that allows the control and monitoring of multiple Minecraft server instances on a single machine.

Contents:

Installation

From PyPI:

$ pip install mcrunner

From source:

$ git clone https://github.com/sbezboro/mcrunner
$ cd mcrunner
$ python setup.py install

Running MCRunner

First rename the sample configuration file:

mv /etc/mcrunner/mcrunner.sample.conf /etc/mcrunner/mcrunner.conf

In it you will find some basic configuration required for running Minecraft server instances.

The configuration file can contain multiple named ‘server’ sections that define the path and other data required for each server.

[server:survival]
path=/path/to/server
jar=spigot.jar
opts=-Xms1G -Xmx2G

mcrunnerd

mcrunnerd is the daemon process that controls the server instances directly. To start it, simply type:

mcrunnerd start

mcrunner

mcrunner is a client used to interface with the mcrunnerd daemon server process. You can use it to start servers, stop servers, and send commands to server:

mcrunner start survival

This will attempt to start the “survival” server defined in the configuration if it exists. Otherwise an error will be shown.

Configuration

By default mcrunnerd and mcrunner look at /etc/mcrunner/mcrunner.conf for configuration.

The configuration file contains three different sections, [mcrunnerd], [mcrunner] and [server:<name>].

[mcrunnerd] section

This section contains properties used by the daemon process.

logfile

Filepath to the log file used for mcrunnerd.

Default: /var/log/mcrunner/mcrunnerd.log

Required: yes

user

UNIX username used to setuid on startup.

Default: none

Required: no

[mcrunner] section

This section contains properties used by the client process.

url

Path to a UNIX socket used for communication between mcrunnerd and mcrunner

Default: /tmp/mcrunner.sock

Required: yes

[server:<name>] section

This section contains properties for a Minecraft server that MCRunner should manage. This section can appear multiple times as long as the server names are unique. The name is used when interfacing with the mcrunner command line.

path

Path to a Minecraft server root directory containing the main jar and other data.

Default: none

Required: yes

jar

Filename of the main jar used to start the Minecraft server. Example: spigot.jar.

Default: none

Required: yes

opts

Additional options passed to the java invocation of the server. Example: -Xms1G -Xmx2G.

Default: none

Required: no

License

The project is licensed under the MIT license.