Running a server
Maintenance mode
On this page
Maintenance mode closes the server to everybody without the maintenance.bypass permission, with a
message of your choice for anybody refused and a MOTD for the server list. It is part of the server
rather than a plugin, so it still works when plugins are the problem, and it stays closed through a
restart.
It is off by default, and there is nothing to set up: the command is always there, and there are no
rustmc.yml settings for it. Its state and texts are kept in maintenance.json.
Using it
| Command | Does |
|---|---|
maintenance | Says whether it is on, since when and who closed it, and the MOTD and message |
maintenance on | Closes the server now. Run again while closed, it removes anybody who has since lost the bypass |
maintenance off | Opens it |
maintenance message <text> | Sets what a refused or removed player reads |
maintenance motd <text> | Sets what the server list shows while closed |
The command works at the console, over RCON and in game. The web portal has the same switch, and both texts, on its Maintenance screen.
Turning it on removes every online player without the bypass at once, with the message. There is no countdown: it is for stopping something that is going wrong. Their data saves as it does on any disconnect. Players with the bypass stay.
While it is on, anybody without the bypass is refused at login with the message, and the server list shows the maintenance MOTD instead of the usual one. A player who was already past the login check when the server closed is removed as they finish joining. Turning it off brings back the usual MOTD.
The default message is "The server is closed for maintenance. Please try again soon." and the default MOTD is "Closed for maintenance".
Permissions
| Node | Default | Covers |
|---|---|---|
maintenance.bypass | level 3 | Joining, and staying, while closed |
minecraft.command.maintenance | level 3 | The command |
portal.maintenance | level 3 | The portal's Maintenance screen |
A bypass does not beat a ban. The bypass is checked at login and each time maintenance on is run,
not continuously.
A permissions plugin gets 1.5 seconds to answer about the bypass. An answer that comes in time stands, including a refusal of an operator. With no answer in time, the operator level decides for that player, and the console says so, so a hung permissions plugin can neither hold a login nor stop the server from closing.
With no permissions plugin, or if it has died, the operator level decides. If the permissions plugin itself is wrongly letting people through, take it out of the plugins and restart: the server stays closed, and operators of level 3 or more can still join.
Texts
The message and MOTD are each one line of at most 512 characters, with no control characters, and cannot be empty. A text that breaks this is refused and nothing changes. A text in the file that breaks it is replaced by the default when the server starts, and the console says so.
The file
maintenance.json lives beside ops.json, in the server's folder (for a server started with a world
path, that is the world's folder):
{ "enabled": true, "message": "...", "motd": "...", "since": "2026-10-31 12:00:00 +0000", "by": "console" }
by is the player who closed it, console, or, from the portal, who was signed in. Setting enabled
to true while the server is stopped makes it start closed, and the console says it is closed at
every start until it is opened.
If the file cannot be read, the server starts closed and says so on the console, because it cannot
tell whether somebody had closed it. maintenance off opens it and writes a good file. If the file
cannot be written, the server still closes, but the reply warns that it will not survive a restart.
From docs/maintenance.md in the RustMC repository at bbd81209ad.