> For the complete documentation index, see [llms.txt](https://docs.xibosignage.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xibosignage.com/cms-installation/xibo-maintenance.md).

# Xibo Maintenance for the CMS

{% hint style="info" %}
**Please note:** Xibo Cloud Hosted customers and CMS instances that have **XTR** configured can skip the Maintenance Enabled / Maintenance Key sections as the Maintenance Tasks are run securely from the command line in XTR.
{% endhint %}

{% hint style="warning" %}
If the environment is not compatible with XTR it is necessary to arrange a 3rd party service to call the maintenance web route.
{% endhint %}

When Xibo is running, logs and statistics slowly accumulate on the server and consume disk space. In extreme cases the sheer volume of those records can cause the CMS web interface to slow and become unresponsive.

It is also reassuring to know that if there is a problem with a **Display** and it stops checking in with the Xibo server, you will be notified by email so you can take action to resolve the problem.

The maintenance script can be scheduled to run periodically and perform background clean-up tasks such as deleting old logs and statistics and checking the status of the displays.

## Configuration

* Maintenance is configured from the **Settings** page under the **Administration** section of the main CMS menu, from the **Maintenance** tab.

There are several options associated with the maintenance script:

* **Maintenance Enabled**( `MAINTENANCE_ENABLED` ):
  * **Off** - All maintenance functionality is disabled.
  * **On** - All maintenance functionality is enabled. You can use any of the methods below to call the maintenance script on a schedule without specifying a key.
  * **Protected** - All maintenance functionality is enabled. You must specify the correct key when calling the maintenance script. This is to prevent unauthorised persons from repeatedly calling the script and generating large amounts of alert email.
* **Maintenance Key** (MAINTENANCE\_KEY) - The secret key required to allow the maintenance script to run when “Maintenance Enabled” is set to “Protected” mode.
* **Email Alerts** (MAINTENANCE\_EMAIL\_ALERTS) - Globally enable or disable the sending of email alerts. You can enable/disable alerts for individual displays in Display Management.

  {cloud} For Xibo Cloud Hosting customers, Max Log Age and Max Statistics Age are set and locked. {/cloud}
* **Max Log Age** (MAINTENANCE\_LOG\_MAXAGE) - How many days worth of log messages to keep. Logs older than specified will be deleted. Set to 0 to keep all logs indefinitely.
* **Max Statistics Age** (MAINTENANCE\_STAT\_MAXAGE) - How many days worth of statistics to keep. Statistics older than specified will be deleted. Set to 0 to keep all statistics indefinitely.
* **Max Display Timeout** (MAINTENANCE\_ALERT\_TOUT) - Globally configure how many minutes after a display lasts connects to the server we should consider it to have a problem and cause an alert to be sent. You can override this default for individual displays in Display Management. You should make sure this time is longer than the collection interval you have configured on your players to avoid false positive alerts.

Set email address information to send emails generated by the CMS from the **Network** tab:

* **Admin email address** (mail\_to) - The overall CMS administrator email that you want to receive all copies of email notifications to be sent to.
* **Sending email address** (mail\_from) - The address to show who the alert emails are from. (e.g. <cms@example.com>)
* **Sending email name** - The name you want to show as the sender.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.xibosignage.com/cms-installation/xibo-maintenance.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
