# Upgrading Connectware to 2.0.1 (Docker)

Connectware 2.0.1 introduces enhancements to the [Data Explorer](/2-1-2/documentation/monitoring/data-explorer.md).

{% hint style="warning" %}
If you are using services configured with `CYBUS_MQTT_ROOT`, you must run a migration script after installing Connectware 2.0.1 to ensure full Data Explorer compatibility.

If you are not using `CYBUS_MQTT_ROOT`, you can [upgrade](#upgrading-procedure) as usual — just note the additional [hardware requirements](#hardware-requirements).
{% endhint %}

## Disclaimer

{% hint style="warning" %}
When upgrading your Connectware instance, follow the upgrade path based on your current version:

* **If you are on version 1.4.1 or below**
  * Upgrade sequentially: **1.5.0 → 1.7.0 → 2.0.0 → 2.0.1 → 2.0.2 → 2.0.5**
* **If you are between version 1.5.0 and 1.6.2**
  * Upgrade sequentially: **1.7.0 → 2.0.0 → 2.0.1 → 2.0.2 → 2.0.5**
* **If you are on version 1.7.0 or newer (but below 2.0.0)**
  * Upgrade sequentially: **2.0.0 → 2.0.1 → 2.0.2 → 2.0.5**
* **If you are on version 2.0.0**
  * Upgrade sequentially: **2.0.1 → 2.0.2 → 2.0.5**
* **If you are on version 2.0.1**
  * Upgrade sequentially: **2.0.2 → 2.0.5**
* **If you are on version 2.0.2, 2.0.3, or 2.0.4**
  * Upgrade directly to **2.0.5**
* **If you are performing a clean or new installation**
  * No upgrade path required. You can install the **latest available version** directly.

**Detailed instructions on each upgrade step**

* [Upgrading Connectware to 2.0.5 (Docker)](/2-1-2/documentation/installation-and-upgrades/upgrading-connectware/upgrading-connectware-docker/upgrading-connectware-to-2-0-5-docker.md)
* [Upgrading Connectware to 2.0.2 (Docker)](/2-1-2/documentation/installation-and-upgrades/upgrading-connectware/upgrading-connectware-docker/upgrading-connectware-to-2-0-2-docker.md)
* [Upgrading Connectware to 2.0.1 (Docker)](/2-1-2/documentation/installation-and-upgrades/upgrading-connectware/upgrading-connectware-docker/upgrading-connectware-to-2-0-1-docker.md)
* [Upgrading Connectware to 2.0.0 (Docker)](/2-1-2/documentation/installation-and-upgrades/upgrading-connectware/upgrading-connectware-docker/upgrading-connectware-to-2-0-0-docker.md)
* [Upgrading Connectware to 1.7.0 (Docker)](/2-1-2/documentation/installation-and-upgrades/upgrading-connectware/upgrading-connectware-docker/upgrading-connectware-to-1-7-0-docker.md)
* [Upgrading Connectware from 1.x to 1.5.0 (Docker)](/2-1-2/documentation/installation-and-upgrades/upgrading-connectware/upgrading-connectware-docker/upgrading-connectware-from-1-x-to-1-5-0-docker.md)
  {% endhint %}

## Hardware Requirements

Connectware 2.0.1 adds a new microservice for MQTT topic exploration. As a result, Connectware requires the following **additional resources**:

* 200m CPU (0.2 CPU)
* 750 MiB of memory

{% hint style="warning" %}
As with any deployment, we recommend monitoring system performance and adjusting resources as needed.
{% endhint %}

## Upgrading Procedure

{% hint style="warning" %}
If your installation is older than 2.0.0, first complete the [upgrade to 2.0.0](/2-1-2/documentation/installation-and-upgrades/upgrading-connectware/upgrading-connectware-docker/upgrading-connectware-to-2-0-0-docker.md) before upgrading to 2.0.1.
{% endhint %}

{% stepper %}
{% step %}

#### Upgrading Connectware to 2.0.1

1. To stop Connectware, go to the Connectware installation directory (default: `/opt/connectware`) and run the following command:

{% code lineNumbers="true" %}

```bash
docker compose down
```

{% endcode %}

2. Download and install Connectware 2.0.1. For more information, see [Upgrading Connectware (Docker)](/2-1-2/documentation/installation-and-upgrades/upgrading-connectware/upgrading-connectware-docker.md).
3. Start Connectware with the following command:

{% code lineNumbers="true" %}

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

{% endcode %}

**Result:** Connectware is upgraded to 2.0.1.

{% hint style="warning" %}
If you are using services configured with `CYBUS_MQTT_ROOT`, continue with [step 2](#migrating-services-with-cybus_mqtt_root-configuration).

If you are not using `CYBUS_MQTT_ROOT`, your Connectware upgrade to 2.0.1 is complete. Just note the additional [hardware requirements](#hardware-requirements).
{% endhint %}
{% endstep %}

{% step %}

#### Migrating Services with `CYBUS_MQTT_ROOT` Configuration

If you are using services configured with `CYBUS_MQTT_ROOT`, you must run a migration script after installing Connectware 2.0.1 to ensure full Data Explorer compatibility.

1. Ensure that only a single instance of Connectware is running in this Docker installation. If you run multiple installations on the same machine, identify the system-control-server container belonging to this installation manually using `docker ps` and use its name as `CW_SCS_CONTAINER` in the next step.
2. Run the migration script. This is required if you have services using `CYBUS_MQTT_ROOT`.

{% code lineNumbers="true" %}

```bash
CW_SCS_CONTAINER=$(docker container ls -q -f "label=io.cybus.connectware=core" -f "label=com.docker.compose.service=system-control-server")
docker run --rm -it \
-v $(docker inspect ${CW_SCS_CONTAINER}  | jq -r '.[].Mounts[] | select(.Destination == "/connectware_certs") | .Name'):/connectware_certs \
--network=container:${CW_SCS_CONTAINER} \
--pid=container:${CW_SCS_CONTAINER} \
registry.cybus.io/cybus/connectware-toolkit:1.3.0 -c 'cw-db-migrate-2_0_1'
```

{% endcode %}

3. Verify that the script ran without errors.
4. Ensure that only a single instance of Connectware is running in this Docker installation. If you run multiple installations on the same machine, identify the `topic-explorer` container that belongs to this installation manually using `docker ps` and use its name as `CW_TE_CONTAINER` in the next step.
5. Restart the `topic-explorer` container:

{% code lineNumbers="true" %}

```bash
CW_TE_CONTAINER=$(docker container ls -q -f "label=io.cybus.connectware=core" -f "label=com.docker.compose.service=topic-explorer")
docker restart $CW_TE_CONTAINER
```

{% endcode %}

**Result:** The migration script updates the database with new column values. You do not need to reinstall your services.
{% endstep %}
{% endstepper %}


---

# Agent Instructions: 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:

```
GET https://docs.cybus.io/2-1-2/documentation/installation-and-upgrades/upgrading-connectware/upgrading-connectware-docker/upgrading-connectware-to-2-0-1-docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
