Comment by NoSalt

6 months ago

I host a Minecraft server at my house; tmux is great for this:

1. Log in to the physical server.

2. Start a named tmux session.

3. Run the Minecraft start script (log messages start populating)

4. Ctrl + b ... d

Now, whenever I need to do something with the server, I just attach back to the session and do it.

Interesting. Do minecraft servers have an interactive shell when they are running?

  • Yes ... you can white/blacklist users and IP addresses, change server.properties and reload the properties without restarting the server, kick players, message all players. All kinds of nice features.

  • They do, if you type something like `stop`, it's equivalent to typing `/stop` in the in-game chat. In my scripts I set stdin to a named pipe, to be able to send commands later.