Direct answer

GNU screen keeps a terminal-based Minecraft server session attached to a pseudo-terminal after your SSH connection closes. It is not a replacement for backups or an OS service manager.

Step-by-step procedure

  1. Install the screen package using your distribution’s package manager.
  2. From the server directory run screen -S minecraft, then launch the Java server using your tested startup command.
  3. Detach using Ctrl+A, then D; this leaves the Minecraft process running in the session.
  4. Reconnect with screen -r minecraft; enter stop in the Minecraft console before ending the session.

Common mistakes and trade-offs

Avoid creating multiple screen sessions pointed at the same world. Do not treat closing the SSH terminal as proof that the server shut down.

How to verify it worked

Run screen -ls after disconnecting and reconnecting to verify one intended session exists and the Minecraft console remains responsive.

Version and platform differences

For automatic startup after machine reboot, use systemd or a panel; GNU screen alone does not arrange boot-time startup.

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.

Was this article helpful?
Help us improve this article

Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.

What could we improve?
Do not include passwords, server IPs, or other private information.0 / 1000