restart
Restarts the server gracefully, at once or after a delay.
| Syntax | Console | In game | Minimum level | Role |
|---|---|---|---|---|
restart [seconds] |
Yes | Yes | Administrator | Game |
restartrestart 60In-game administrators use .restart or .restart 60. With no argument or 0, the server announces
The server is restarting now. and requests the stop. A positive number announces The server will restart in <seconds> seconds. and schedules it. It is the same ordered stop as shutdown: services stop, the
final world save completes, persistence is disposed.
The difference is the exit code: a restart ends the process with 75, a shutdown with 0. Something above the server must read it and start the server again:
| Runs the server | Starts it again on 75 |
|---|---|
mgctl run |
Yes, at once |
| systemd | With Restart=on-failure |
| Docker | With restart: on-failure |
| Kubernetes | A pod restarts a stopped container by its policy |
A bare mgserver |
No: it stops, as after shutdown |
A policy that starts the server again after any exit (Restart=always, restart: unless-stopped) also starts it
again after a shutdown; only on-failure keeps a shutdown down and brings a restart back.
The server accepts one stop request at a time, whichever command asked for it: while a shutdown or restart
countdown is pending, the other command reports an error and changes nothing.
See also
Section titled “See also”Made with ❤️ by Tom
