Stand with Ukraine flag
Pricing Try it now
PE Edge
Getting Started Documentation
Architecture API FAQ
On this page

ThingsBoard Edge PE v4.2.x upgrade instructions for Docker

Prepare for upgrading ThingsBoard Edge

Back up your ThingsBoard Edge data before upgrading.

Stop the Edge container

Navigate to your docker-compose.yml directory and stop the container:

1
docker compose stop

Backup the database volume

Before upgrading, make a backup copy of the database volume:

1
docker run --rm -v tb-edge-postgres-data:/source -v tb-edge-postgres-data-backup:/backup busybox sh -c "cp -a /source/. /backup"

This copies all contents from tb-edge-postgres-data to tb-edge-postgres-data-backup.

Restore the backup (if needed)

Stop the ThingsBoard Edge container (if it’s still running):

1
docker compose stop

To restore data from a backup volume to the main volume, run the following command:

1
docker run --rm -v tb-edge-postgres-data-backup:/source -v tb-edge-postgres-data:/target busybox sh -c "cp -a /source/. /target"

Start the ThingsBoard Edge container:

1
docker compose up -d 

Upgrading Edge PE to 4.2.1.1

doc warn icon

Ensure your ThingsBoard Server is up to date before updating ThingsBoard Edge.

If your Server version is outdated, upgrade it first.

The following instructions are applicable for ThingsBoard Edge 4.2.1EDGEPE version.

Doc info icon

These steps are applicable for Edge 4.2.1EDGEPE version.

Set the terminal in the directory which contains the “docker-compose.yml” file, and run the following command to stop and remove the currently running TB Edge container (if it’s still running):

1
docker compose stop mytbedge

Modify the main docker compose file (docker-compose.yml) for ThingsBoard Edge and update the image version:

1
sed -i 's|thingsboard/tb-edge:4.2.1EDGEPE|thingsboard/tb-edge:4.2.1.1EDGEPE|' docker-compose.yml

Upgrade the ThingsBoard Edge service:

1
docker compose run mytbedge upgrade-tb-edge.sh

To start this docker compose, run the following command:

1
docker compose up -d && docker compose logs -f mytbedge

Upgrading Edge PE to 4.2.1

doc warn icon

Ensure your ThingsBoard Server is up to date before updating ThingsBoard Edge.

If your Server version is outdated, upgrade it first.

The following instructions are applicable for ThingsBoard Edge 4.2.0EDGEPE version.

Doc info icon

These steps are applicable for Edge 4.2.0EDGEPE version.

Set the terminal in the directory which contains the “docker-compose.yml” file, and run the following command to stop and remove the currently running TB Edge container (if it’s still running):

1
docker compose stop mytbedge

Modify the main docker compose file (docker-compose.yml) for ThingsBoard Edge and update the image version:

1
sed -i 's|thingsboard/tb-edge:4.2.0EDGEPE|thingsboard/tb-edge:4.2.1EDGEPE|' docker-compose.yml

Upgrade the ThingsBoard Edge service:

1
docker compose run mytbedge upgrade-tb-edge.sh

To start this docker compose, run the following command:

1
docker compose up -d && docker compose logs -f mytbedge

Upgrading Edge PE to 4.2.0

doc warn icon

Ensure your ThingsBoard Server is up to date before updating ThingsBoard Edge.

If your Server version is outdated, upgrade it first.

The following instructions are applicable for ThingsBoard Edge 4.1.0EDGEPE version.

Doc info icon

These steps are applicable for Edge 4.1.0EDGEPE version.

Set the terminal in the directory which contains the “docker-compose.yml” file, and run the following command to stop and remove the currently running TB Edge container (if it’s still running):

1
docker compose stop mytbedge

Modify the main docker compose file (docker-compose.yml) for ThingsBoard Edge and update the image version:

1
sed -i 's|thingsboard/tb-edge:4.1.0EDGEPE|thingsboard/tb-edge:4.2.0EDGEPE|' docker-compose.yml

Upgrade the ThingsBoard Edge service:

1
docker compose run mytbedge upgrade-tb-edge.sh

To start this docker compose, run the following command:

1
docker compose up -d && docker compose logs -f mytbedge