Direct answer
tmux keeps a terminal session running through SSH disconnects. Minecraft continues only while its process and tmux session stay alive.
Step-by-step procedure
- Install
tmuxand enter the server directory as the dedicated Minecraft user. - Run
tmux new -s minecraft, then launch the tested Java start script inside the tmux session. - Detach with
Ctrl+B, thenD. Later reconnect usingtmux attach -t minecraft. - Type
stopinto the Minecraft console for a graceful shutdown; do not kill the session mid-save.
Common mistakes and trade-offs
Running the same world in more than one tmux window/process can corrupt files. tmux alone does not provide crash-restart or automatic boot behavior.
How to verify it worked
Use tmux ls after reconnecting to verify the expected named session and confirm the server responds to the console list command.
Version and platform differences
If you need automatic boot and service recovery, configure an OS service manager or host panel separately.
Official references
These sources were checked for the current MSH revision. Version-sensitive details should always be confirmed against the project documentation for the release you run.
Related guides
Help us improve this article
Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.