# 🚧 Maintenance

## Maintenance

Maintenance closes a server, or the whole network, for everyone except the people you allow. Players already on a server that goes under maintenance are kicked, and new connections are denied until it ends.

This feature is part of the proxy plugin, so it needs PhoenixLobby installed on your BungeeCord or Velocity.

Everyone with `phoenixlobby.maintenance.bypass` can always join, and `phoenixlobby.maintenance` is needed to use the command.

### Commands

| Command                                          | Description                                |
| ------------------------------------------------ | ------------------------------------------ |
| `/maintenance start <server> [time]`             | Starts a maintenance                       |
| `/maintenance end <server>`                      | Ends a maintenance                         |
| `/maintenance add <user/uuid> <server>`          | Allows someone to join                     |
| `/maintenance remove <user/uuid> <server>`       | Revokes someone's access                   |
| `/maintenance list <server>`                     | Lists who is allowed to join               |
| `/maintenance schedule <start-in> <duration> <server>` | Schedules a maintenance for later    |
| `/maintenance schedules`                         | Lists every scheduled maintenance          |

Leave the server empty or use **global** to affect every server at once. Leaving the time empty makes the maintenance last until you end it yourself.

### Time Format

Times are written as `1Y 1M 1W 1D 1H 1m 1S`, and can be combined, for example `1D12H`.

> **Warning:**
An uppercase **M** means months and a lowercase **m** means minutes.

### MOTD

The proxy shows a different motd while a maintenance is running through the `motds.maintenance` option. The regular motd is covered on the [MOTD](../modules/motd.md) page.

<details>

<summary>Maintenance MOTD config.yml</summary>

```yaml
motds:
  maintenance:
    enabled: true
    motd:
    - '                &c&lUNDER MAINTENANCE'
    - '              &8We will be back in &7{timer}'
```

</details>

> **Info:**
The running and scheduled maintenances are saved in the **maintenance.yml** file of the proxy, so they survive a restart.

Source: https://www.phoenixplugins.com/docs/phoenix-lobby/featues/maintenance