# Update within a Docker container

#### Guides for updating Xopero ONE Management Service within a Docker container explain how to perform updates and manage the service efficiently.

***

## Updating the Management Service

{% hint style="info" %}
The below guides apply to **Xopero ONE Management Service** on-prem deployment models.
{% endhint %}

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

## Update process

{% hint style="danger" %}
To update **Xopero ONE Management Service** running as a **Docker** container, stop the old container, install the new one with the old databases mounted, and then remove the old container.
{% endhint %}

1. Download the new image and remove the old [**XMS**](#user-content-fn-1)[^1] container using the following command:

{% code overflow="wrap" %}

```docker
docker pull xopero/xopero-one-service:latest
docker stop xone && docker rm xone
```

{% endcode %}

2. Next, create the new container with the **agent** using the following command:

```docker
docker run -d \
  --name <container_name> \
  -p <xms_port>:80 \
  -v <database_location_outside_container>:/app/Xopero \
  xopero/xopero-one-service
```

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/xAlPpPRgeDqidUTMz1uu/image.png" alt="Running the container with the Xopero ONE Management Service within"><figcaption></figcaption></figure>

***

## Update validation  <a href="#update_validation" id="update_validation"></a>

Verify that the update was successful — log into the **Xopero ONE** panel through a web browser, wait for the device status to show online, and confirm that all settings (plans, storages, devices, and others) are intact.
{% endtab %}

{% tab title="QNAP NAS (CS > 3.0)" %}

## Update process

{% hint style="danger" %}
This method requires **Container Station** version 3.0 or higher.
{% endhint %}

1. Open the **Container Station** on your **QNAP** device.
2. Locate and select the container running the **Xopero ONE Management Service** that you want to update.
3. After selecting the container, click the **gear** ⚙️ icon to open the container settings.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/6Yi7PRC1TYliBykEW3Yn/image.png" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/xrUmy9NTN5jch7ir4fJ1/image.png" alt="" width="146"><figcaption></figcaption></figure>

5. Configure the update settings — switch to advanced mode, as shown in the illustration provided. In advanced mode, you will be prompted to enter the image address from Docker Hub. Enter the following address:

```docker
xopero/xopero-one-service:latest
```

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/sWsbEk6wOHJKBFqgaUPQ/image.png" alt=""><figcaption></figcaption></figure>

6. Make sure to check the option **Try pulling the image from the registry before creating the container**. This ensures that the latest version of the image is used. After configuring the settings, click **Next** to continue.
7. You can edit the container settings as you would when creating a new container. Make any necessary adjustments, or click **Next** to proceed to the summary page.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/rTzLImtbtcGx5tUEhupV/image.png" alt=""><figcaption></figcaption></figure>

8. Review the summary of settings and changes, and once satisfied, click **Finish**.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/PGFPGOJDKZ3s7Dx097so/image.png" alt=""><figcaption></figcaption></figure>

9. Container Station will download the latest image and create a new container using the previous container’s settings and data. This updates the **Xopero ONE Management Service** container to the latest version while preserving all existing settings and data.
   {% endtab %}

{% tab title="QNAP NAS (CS < 3.0.)" %}

### Update process <a href="#new_container" id="new_container"></a>

1. Open the **Container Station** application, select a container, and then click the **Settings** button.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/Jm7zFXtVecFXNaQgQmjd/image.png" alt="Container Settings in Container Station on QNAP NAS"><figcaption></figcaption></figure>

2. Click **Advanced Settings** and open the **Shared Folders** section to view the exact path of your databases on the **QNAP**. Save this path to use when creating the container with the new version.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/ea9Xygh4tqqr2aDmSiQh/image.png" alt="Container Settings in Container Station on QNAP NAS"><figcaption></figcaption></figure>

3. Open the **Image** tab, search for **xopero/xopero-one-service**, and click **Install**.

{% hint style="warning" %}
Make sure to switch to the **Docker Hub** tab from the **Local** tab.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/K4m6irmxXybspalE4uOz/image.png" alt="Image tab in Container Station on QNAP NAS"><figcaption></figcaption></figure>

4. Select the latest version of the image and click **Next**.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/lxi3Kze1qkRAfcdUeQwI/image.png" alt="selecting latest version"><figcaption></figcaption></figure>

5. **QNAP** will display the **Create Container** window, where you can configure the **container name**, **CPU** and **RAM** limits, and other advanced settings for the **Xopero ONE Docker** container.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/zIyZi02FMSy3eSEhgOAd/image.png" alt="Create container window"><figcaption></figcaption></figure>

6. Open the **Advanced Settings**.
7. In the **Network** tab, set the listening port for the **Xopero ONE Management Service** (default is **28555**) by entering the number in the **Host** field. This must match the port used in your initial installation.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/MxyaAAgFgpwI8gSf6mE5/image.png" alt="Creating contener - network tab"><figcaption></figcaption></figure>

8. In the **Shared Folders** tab, select the path for the **Xopero ONE Management Service** databases. First, delete any entry in the **New volume** section.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/0YIRdEbJmmbGOJG4yzie/image.png" alt="Creating contener - shared folders tab"><figcaption></figcaption></figure>

9. Add the path to the **Volume from Host** field, using the path you saved earlier.

{% hint style="warning" %}
o not paste the path. Select a location from the list: **/share/CACHEDEV2\_DATA/Container/cointainer-station-data/lib/docker/volumes/\<container\_folder>/\_data**
{% endhint %}

{% hint style="danger" %}
If the **/share/CACHEDEV2\_DATA/** path is not displayed, navigate to the folder above and start from the **/Container/** directory.
{% endhint %}

10. Set the **Mount Point** to **/app/Xopero**.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/ZF6RoW1iKsz3dJBnJXov/image.png" alt="Creating contener - shared folders tab"><figcaption></figcaption></figure>

11. Click the **Create** button, review the **Summary** window, and then select **OK** to proceed.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/pNQPoRsbfw2WXqpaZfpP/image.png" alt=""><figcaption></figcaption></figure>

***

### Update validation  <a href="#update_validation" id="update_validation"></a>

Log into the **Xopero ONE** panel and wait for the device status to show online. Verify that all previous settings—plans, storages, devices, and others—are intact. Once confirmed, you can either delete the old container or keep it temporarily to ensure the new version is functioning correctly.
{% endtab %}

{% tab title="Synology NAS (Container Manager)" %}

## Update process

{% hint style="info" %}
To update the **Management Service** installed in **Docker** on a **Synology NAS**, install the new version with the old databases mounted.
{% endhint %}

1. When using the `:latest` tag, **Container Manager** monitors the image for updates. When a new version is available, a notification appears in the Image tab showing the status **Update available**. To start the update process, simply select the **Update available** button.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/5trruqpjibJtg7h1haFB/u1.png" alt=""><figcaption></figcaption></figure>

2. After activation, a system prompt will inform you that the services and container will be temporarily suspended during the update. Confirm by selecting the **Update** button.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/ctIe8TODNhLaWsbamOke/u5.PNG" alt=""><figcaption></figcaption></figure>

3. A second confirmation step will require you to confirm the update again by selecting **Update**.

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

4. The update progress will be shown in the operations list. After the updated image is downloaded, containers configured with the **auto-start** option will restart automatically.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/VOHwqNgH7vFeY3BbLPDg/u6.PNG" alt=""><figcaption></figcaption></figure>

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

[^1]: Xopero ONE Management Service
