hachem.wtf
aboutsummaryrefslogtreecommitdiff

benson

a minecraft server manager from hell.

benson started as a little server manager for the minecraft server a few friends and i play on. the server runs on one of our machines, and originally benson was just a way to make managing that server a little less annoying. then it progressively grew. i added automatic mod updates through modrinth. then compatibility checking. then backups. then a way to generate a fresh server without having to manually download everything and set it up again. at some point, benson stopped being just a server manager and became a tool for spinning up minecraft servers whenever we feel like doing something stupid. it can manage mods for an existing server, keep them up to date, back up the server before making changes, and generate completely new servers from a configuration.

it's probably way more complicated than it needs to be, but that's kind of the point. the only reason this is public is because a friend of mine told me it might be useful for other people.

[!NOTE] this is the go rewrite of benson. the original was held together with duct tape and node.js and shipped as two separate programs; this version is a single self-contained binary with no runtime dependencies. the server manager and the discord bot are now the same executable.

install

you need go 1.26+ to build it. java is only needed for the generate command.

go install git.hachem.wtf/hachem/benson@latest

or build from source:

git clone https://git.hachem.wtf/hachem/benson.git
cd benson
go build -o benson .

configure

benson keeps its configuration under config/. the easiest way to set it up is the interactive wizard:

benson setup        # server manager: versions, paths, mods
benson setup bot    # discord bot: token, channel, interval

setup writes config/config.json and setup bot also writes config/api.json (which holds your bot token). the bot is entirely optional — if you only want the server manager, you never have to touch it. you can also edit the files by hand; see config/config.example.json for the shape.

server manager

run benson with no arguments to open the interactive cli:

benson

it provides the following commands:

command description
list-mods list the configured mods
check check whether the configured mods are compatible
generate download the server and mods and generate a server directory
merge back up the existing server and merge the generated files into it
clean generated remove the generated server directory
clean latest remove the latest backup
clean all remove both generated files and the latest backup
help show available commands
exit exit benson

discord bot

the discord bot periodically checks the configured mods on modrinth and posts compatibility reports to a given channel. since it's the same binary as the manager, you can host it wherever you like:

benson bot

license

benson is licensed under the apache license 2.0. see license for more details.