> For the complete documentation index, see [llms.txt](https://helpcenter.xopero.com/xopero-one-en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpcenter.xopero.com/xopero-one-en/updates/xopero-one-agent/update-within-a-docker-container.md).

# Update within a Docker container

This article explains how to update Xopero ONE agents installed within Docker containers.

#### Keep your agent container up-to-date, to ensure optimal performance and access to the latest features and improvements.

***

## Updating Xopero ONE agent

{% tabs %}
{% tab title="Docker" %}

## Replacing the agent

{% hint style="danger" %}
The only way to update an agent installed in a container is to **remove the existing version and create a new one**.
{% endhint %}

1. Download the new image and remove the old container with the agent using the following command:

```dockerfile
docker pull xopero/xone-agent:latest
docker stop xone-agent && docker rm xone-agent
```

2. Create a new container with the **Xopero ONE** agent:

```dockerfile
docker run -d \
  --name xone-agent \
  -e ManagementServiceUrl="<your_xopero_service_URL>" \
  -e XoperoOverriddenHostName="<device_name>" \
  -v /opt/xone-agent/data:/app/Xopero \
  --restart unless-stopped \
  xopero/xone-agent:latest
```

* `<your_xopero_service_URL>` — **Xopero ONE Management Service** address with the port (i.e., `123.456.7.890:28555`)
* `<device_name>` — custom **Docker** container name

3. Once done, the **Xopero** agent should now be up to date.
   {% endtab %}

{% tab title="QNAP NAS (CS > 3.0)" %}
{% hint style="warning" %}
This method requires **Container Station version 3.0 or later**.
{% endhint %}

## Update process

1. First, open **Container Station** on your **QNAP** device.
2. Locate and select the container running the agent you want to update, then click the **settings** ⚙️ icon to open the container settings.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FFD3JKDyUyazFSqXn4cz6%2Fimage.png?alt=media&amp;token=fc8bde93-f494-4ab6-9d30-687bea7d17bc" alt=""><figcaption></figcaption></figure>

3. In the settings menu, select the **Recreate** option to proceed with the update. This action replaces the current container with a new one based on the latest image.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FPimoVSf24PPSM8FGUyT0%2Fimage.png?alt=media&amp;token=0599a9b0-6fd8-436f-aac0-158ae8cd1ac5" alt="" width="170"><figcaption></figcaption></figure>

4. Switch to **Advanced mode** (see illustration below). You will be prompted for the **Docker Hub** image address — enter the address shown below:

```docker
xopero/xone-agent:latest
```

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FJx8BTROzIljs5LOVAMjE%2Fimage.png?alt=media&amp;token=c45f41b2-1cd8-4fd6-b4aa-e66008f61415" alt="" width="563"><figcaption></figcaption></figure>

5. Make sure you select the option **Try pulling the image from the registry before creating the container** (this ensures that the latest version of the image is used) and click **Next** to continue.
6. You can now edit the container settings as you would when creating a new container. Adjust them if needed, then click **Next** again to move to the summary page.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FTSsIva6j3gcoU4n2IbIj%2Fimage.png?alt=media&amp;token=be8906e1-4291-47be-a698-248cea82af62" alt="" width="563"><figcaption></figcaption></figure>

7. Review the summary of the settings and changes. When everything looks correct, click **Finish**. **Container Station** will download the latest image and create a new container using the settings and data from the previous one. This updates the agent to the latest version while preserving all existing settings and data.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FnSetQNhn6wsfhfkRSVim%2Fimage.png?alt=media&amp;token=bf70a1b9-b89f-4640-82a6-9078e0673bde" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="QNAP NAS (CS < 3.0)" %}
{% hint style="danger" %}
The only way to update an agent installed in a container is to remove the existing version and install a new one. Creating a new container requires reactivating the device, so you will need to reassign it to all backup plans.
{% endhint %}

## Update process

1. Log in to **Xopero ONE Management Service**.
2. Go to the **Devices** tab and find the **Docker** agent.
3. Click the device details ℹ️ button. Review the **Docker** agent plans and note them, as you will need to add them again. All plans can be viewed in the **Backup plans** section; expand the list by clicking **Load more**.
4. Remove the old **Xopero ONE** agent container — in **Container Station**, click the **Remove** icon in the **Actions** tab to delete the container.
5. Once the old container has been removed, install the **Xopero ONE** agent **Docker** image again. Then, add the agent to all the plans it was previously assigned to.
   {% endtab %}

{% tab title="Synology NAS" %}

## Update process

1. When using the `:latest` tag, the **Container Manager** monitors the image for updates. When a new version is detected, the **Image** tab will show the status **Update available**. Click the status to start the update process.

{% hint style="warning" %}
If the **Update available** button does not appear even when the agent update is available for other devices, you may wait up to 12 hours before it becomes visible.
{% endhint %}

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FHQZmiZXCbJGCP8DI7lz5%2Fimage.png?alt=media&amp;token=7f8683c0-32f7-4789-a3f6-df0d2b1c16c1" alt=""><figcaption></figcaption></figure>

2. When activated, a system prompt will indicate that the services and container will be temporarily suspended during the update. Confirm by clicking the **Update** button.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2Ftamu9cLzeYKQUslUqmoY%2Fimage.png?alt=media&amp;token=ee2850d4-018d-4dbf-858c-4a6f65c8966b" alt=""><figcaption></figcaption></figure>

3. You will be prompted to confirm the update again by clicking the **Update** button.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/B9PVjRARIlsMO8WUQ8Ap/u3.PNG" alt="" width="563"><figcaption></figcaption></figure>

4. The update progress will appear in the list of operations. Once the image is successfully downloaded, containers set to auto-start will restart automatically.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FbxrXMeAyd5qVlZHQgUy9%2Fimage.png?alt=media&amp;token=c8099761-6138-44f5-afa1-a23fa9bfd0cd" alt=""><figcaption></figcaption></figure>

5. To verify the update, go to the **Containers** tab to check that the container is functioning correctly. Also, check if the system shows the latest version in **Xopero ONE Management Service**.
   {% endtab %}
   {% endtabs %}
