> 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/kb/cms-installation-and-upgrades/running-on-an-existing-docker-cluster.md).

# Running on an existing Docker cluster

Y*ou will be responsible for pulling the docker containers, starting them and manually installing Xibo.*

The structure expected by the containers is outlined below:

### Containers

There are 2 containers provided:

* web
* xmr

These are built by Docker Hub and packaged into `xibo-signage/xibo-cms` and `xibosignage/xibo-xmr`

Xibo also requires a database - we recommend using the `mysql` container available on Docker Hub. Any MySQL based container can be used, provided it can be linked to the `cms-web` container. It is also possible to use an external database by providing those details to the `cms-web` container as environment variables, as below:

* MYSQL\_HOST
* MYSQL\_PORT
* MYSQL\_DATABASE
* MYSQL\_USER
* MYSQL\_PASSWORD

If you decide to run the containers yourself you should read and understand the `DockerFile` which can be found for each container in the `/containers` folder.

You may also want to pass in environment variables to configure SMTP in the container. All options are fully documented in the `config.env.template` and `config.env.template-remote-mysql` files found in our archives.

### Storing Data

Data folders should be mapped outside the Docker containers as volumes so that data is persisted across Container upgrades.

The following Data folders are used by `docker-compose` and should be configured for your environment:

* The Library storage can be found in `/shared/cms/library`
* The database storage can be found in `/shared/db`
* Automated daily database backups can be found in `/shared/backup`
* Custom themes should be placed in `/shared/cms/web/theme/custom`
* Custom modules should be placed in `/shared/cms/custom`

Any user-generated PHP or resources external to Xibo that you want to be hosted on the same web server go in `/shared/cms/web/userscripts`. They will then be available to you at `http://localhost/userscripts/`


---

# 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/kb/cms-installation-and-upgrades/running-on-an-existing-docker-cluster.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.
