> 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/upgrading-the-cms/upgrade-self-hosted-docker-install.md).

# Upgrading Docker Self hosted Install

## Before attempting an upgrade

Please be sure that your media and database files are being correctly written to the `shared` directory. This is particularly important if you are running on a Windows computer. To do so, upload for example an image into the CMS, and check that the same image appears in the `shared/cms/library` directory. Another good check is to make sure that `shared/backup/db/latest.sql.gz` was created within the last 24 hours. If either of those checks fail, please **do not proceed** with the upgrade as this will lead to data loss. Seek support to recover the situation.

Before starting the upgrade, it’s strongly recommended to take a full backup of your Xibo system. `stop` your CMS by issuing the command:

```
docker-compose stop
```

and then, backup `config.env`, your docker-compose files, and `shared` directory and keep them somewhere safe. On a Linux system, you will need to be the `root` user, or use `sudo` to make a copy of the shared directory.

If you’re upgrading from an earlier 1.8.0 pre-release, you may have previously used `launcher`. `launcher` was used for 1.8.0-alpha, beta, rc1 and rc2, but since then we have switched to Docker Compose. Further details are available in the [1.8.0-rc3 release notes](https://xibo.org.uk/manual/en/release_notes_1.8.0-rc3.html#requirements).

Once you have a suitable backup of your CMS files, you can proceed with the upgrade process.

## Upgrade Process

* Download the appropriate version of the [Docker Compose files](https://github.com/xibosignage/xibo-docker/releases) for the version of Xibo you want to upgrade to.
* Extract the Docker Compose files over the top of your existing installation, replacing any existing files.

If you are running the CMS on Custom Ports, then you will need to repeat the initial steps in the CMS installation process where you copied the template `cms_custom-ports.yml.template` file to `cms_custom-ports.yml` and make the appropriate modifications for the ports you want to use.

If you made any other changes to the docker-compose files, you will need to make those modifications again. `config.env` will have been preserved, so you should not need to make any changes there. Specifically, do not change the MySQL password in that file.

To perform the upgrade, run

```
docker-compose down
docker-compose up -d
```

substituting the second command there for the appropriate `up` command if you’re using custom ports or a remote MySQL server.

The CMS containers will be destroyed and rebuilt with the newer Xibo version.

A database backup will be automatically run for you as part of this process.

{% hint style="warning" %}
The upgrade process can take a few minutes to complete. In the interim, the CMS will be unavailable. If the upgrade is fully successful, you should not see the upgrade wizard at all when you go to log in to the CMS.
{% endhint %}

{% hint style="warning" %}
If you do see the upgrade wizard, you can attempt to work through it, however, please be wary of skipping upgrade steps unless you have a detailed knowledge that it is safe to do so.
{% endhint %}

The upgrade should now be complete for you.

## Rolling back the Version

If you need to roll back to the older Xibo version for some reason, you can do so by running;

```
docker-compose down
```

restoring your original copy of `config.env` , the Docker Compose files and the `shared` directory, and finally running;

```
docker-compose up -d
```

The original version of the CMS will be restored for you.


---

# 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/upgrading-the-cms/upgrade-self-hosted-docker-install.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.
