Minecraft Server Controll socket

I created a stdin interface for the Minecraft server. I build this to have a way to control the server (like giving someone op) via a command on the server, and not using rcon. This is built via a systemd socket. But with this way, I’m unsure, if it is too hacky to be upstreamed into nixpkgs.
my current solution is this.

Should I upstream it into nixpkgs?


As long as there’s a way to switch between rcon and the socket approach, I think it’s a nice option to add.
I’m still trying to find a nice way to add mods without having to rewrite the whole module myself… There’s no easy way to add things to the preStart.
Maybe while you’re at it, and you also want mods, it would be a nice thing to add. :slight_smile:

You can have both, my approach can also have rcon.

I will see if I have an idea to add mods. But I’m unsure how to patch to server.jar to read mods.

1 Like

I more or less gave up on trying to configure minecraft declaratively due to the complexity dealing with mods. I ended up just creating a module to start/stop/manage the minecraft server(s). The minecraft directory is then managed as normal.

It isn’t ideal but if you mod heavily, managing it declaratively becomes complicated. There isn’t always a universal way to keep the mods up to date and in some cases you may not even want to.

1 Like

I created a pr for the fifo thingy, and also added a warning system, to see when the server restarts.

I’m trying to find out, how to build a fabric server as an derivation, because the installer needs access to the maven. If I find a way, I will try to build a way to link mods inside the mod directory.