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

Upgrade instructions

doc warn icon

Rules of Compatibility Between ThingsBoard Edge and ThingsBoard Server Versions:

  • A ThingsBoard Edge version X.Y.Z is compatible with the same ThingsBoard Server version X.Y.Z and any later versions.
  • A ThingsBoard Edge version X.Y.Z is NOT compatible with ThingsBoard Server versions preceding X.Y.Z.

Example: ThingsBoard Edge version 3.3.4.1 is compatible with ThingsBoard Server version 3.3.4.1 and subsequent versions (3.4.0, 3.4.1, …). However, ThingsBoard Edge version 3.4.0 is NOT compatible with ThingsBoard Server version 3.3.4.1 or any prior versions (3.3.4, 3.3.3, …). In such scenarios, ThingsBoard Server 3.3.4.1 or a preceding version must first be upgraded to ThingsBoard Server 3.4.0 or a later version.

Please ensure that the ThingsBoard Server is updated to the latest version before proceeding.

Prepare for upgrading ThingsBoard Edge

Ubuntu/CentOS

Stop ThingsBoard Edge service:

1
sudo systemctl stop tb-edge

Backup Database

Make a backup of the database before upgrading.

Make sure you have enough space to place a backup of the database

Check database size

1
sudo -u postgres psql -c "SELECT pg_size_pretty( pg_database_size('tb_edge') );"

Check free space

1
df -h /

If there is enough free space - make a backup.

1
sudo -Hiu postgres pg_dump tb_edge > tb_edge.sql.bak

Check backup file created successfully.

Docker (Linux or Mac OS)

Set the terminal in the directory which contains the docker-compose.yml file and execute the following command to stop and remove currently running TB Edge container:

1
2
docker compose stop
docker compose rm mytbedge
Doc info icon

If you still rely on Docker Compose as docker-compose (with a hyphen) here is the list of the above commands:
docker-compose stop
docker-compose rm mytbedge

Backup Database Volume

Make a copy of the database volume before upgrading:

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

Backup Database Bind Mount Folder (deprecated)

If you are still using Docker bind mount folders, please ensure to make a copy of the database folder before proceeding with the upgrade:

1
sudo cp -r ~/.mytb-edge-data/db ~/.mytb-edge-db-BACKUP

Windows

Stop ThingsBoard Edge service:

1
net stop tb-edge

Backup Database

Launch the “pgAdmin” software and login as superuser (postgres). Open your server and create backup of database tb_edge using ‘Backup Dialog’ functionality of “pgAdmin”.

Upgrading to 3.8EDGEPE

doc warn icon

Please make sure that ThingsBoard Server version is 3.8PE or above before updating ThingsBoard Edge to this version.

If ThingsBoard Server version is below 3.8PE, please follow upgrade ThingsBoard server upgrade instructions first.

Ubuntu/CentOS

NOTE: These steps are applicable for ThingsBoard Edge 3.7EDGEPE version.

ThingsBoard Edge package download

1
wget https://dist.thingsboard.io/tb-edge-3.8pe.deb
1
wget https://dist.thingsboard.io/tb-edge-3.8pe.rpm

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running.
1
sudo service tb-edge stop
1
sudo dpkg -i tb-edge-3.8pe.deb
1
sudo rpm -Uvh tb-edge-3.8pe.rpm

NOTE: Package installer may ask you to merge your tb-edge configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.

Execute regular upgrade script:

1
sudo /usr/share/tb-edge/bin/install/upgrade.sh --fromVersion=3.7.0

Start the service

1
sudo service tb-edge start

Docker (Linux or Mac OS)

NOTE: These steps are applicable for ThingsBoard Edge 3.7EDGEPE version.

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

1
2
docker compose stop
docker compose rm mytbedge

Backup Database

Make a copy of the database volume before upgrading:

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

Create docker compose file for ThingsBoard Edge upgrade process:

1
> docker-compose-upgrade.yml && nano docker-compose-upgrade.yml

Add the following lines to the yml file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version: '3.8'
services:
  mytbedge:
    restart: on-failure
    image: "thingsboard/tb-edge-pe:3.8.0EDGEPE"
    environment:
      SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb-edge
    volumes:
      - tb-edge-data:/data
      - tb-edge-logs:/var/log/tb-edge
    entrypoint: upgrade-tb-edge.sh
  postgres:
    restart: always
    image: "postgres:15"
    ports:
      - "5432"
    environment:
      POSTGRES_DB: tb-edge
      POSTGRES_PASSWORD: postgres
    volumes:
      - tb-edge-postgres-data:/var/lib/postgresql/data

volumes:
  tb-edge-data:
    name: tb-edge-data
  tb-edge-logs:
    name: tb-edge-logs
  tb-edge-postgres-data:
    name: tb-edge-postgres-data

Execute the following command to start upgrade process:

1
docker compose -f docker-compose-upgrade.yml up

Once upgrade process successfully completed, exit from the docker-compose shell by this combination:

1
Ctrl + C

Execute the following command to stop TB Edge upgrade container:

1
docker compose -f docker-compose-upgrade.yml stop

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

1
nano docker-compose.yml
1
2
3
4
5
6
version: '3.8'
services:
  mytbedge:
    restart: always
    image: "thingsboard/tb-edge-pe:3.8.0EDGEPE"
...

Make sure your image is the set to tb-edge-pe:3.8.0EDGEPE.

Execute the following commands to up this docker compose directly:

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

Windows

NOTE: These steps are applicable for ThingsBoard Edge 3.7EDGEPE version.

ThingsBoard Edge package download

Download ThingsBoard Edge package for Windows: tb-edge-windows-3.8pe.zip.

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running:
1
net stop tb-edge
  • Make a backup of previous ThingsBoard Edge configuration located in <ThingsBoard Edge install dir>\conf (for example: C:\tb-edge\conf).

  • Extract ThingsBoard Edge package.

  • Compare and merge your old ThingsBoard Edge configuration files (from the backup you made in the previous step) with new ones.

  • Finally, run upgrade.bat script to upgrade ThingsBoard Edge to the new version.

NOTE Scripts listed below should be executed using Administrator Role.

Execute regular upgrade script:

1
C:\tb-edge>upgrade.bat --fromVersion=3.7.0

Start the service

1
net start tb-edge

Upgrading to 3.7EDGEPE

doc warn icon

Please make sure that ThingsBoard Server version is 3.7PE or above before updating ThingsBoard Edge to this version.

If ThingsBoard Server version is below 3.7PE, please follow upgrade ThingsBoard server upgrade instructions first.

Ubuntu/CentOS

NOTE: These steps are applicable for ThingsBoard Edge 3.6.4EDGEPE version.

doc warn icon

Important note before upgrading to ThingsBoard 3.7

ThingsBoard backend was migrated to Java 17. Install JDK 17 and ensure that system’s default Java version is set to 17.

Please refer to Step 1 of the corresponding installation guide for detailed instructions:

Ubuntu

CentOS/RHEL

ThingsBoard Edge package download

1
wget https://dist.thingsboard.io/tb-edge-3.7pe.deb
1
wget https://dist.thingsboard.io/tb-edge-3.7pe.rpm

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running.
1
sudo service tb-edge stop
1
sudo dpkg -i tb-edge-3.7pe.deb
1
sudo rpm -Uvh tb-edge-3.7pe.rpm

NOTE: Package installer may ask you to merge your tb-edge configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.

Execute regular upgrade script:

1
sudo /usr/share/tb-edge/bin/install/upgrade.sh --fromVersion=3.6.4

Start the service

1
sudo service tb-edge start

Docker (Linux or Mac OS)

NOTE: These steps are applicable for ThingsBoard Edge 3.6.4EDGEPE version.

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

1
2
docker compose stop
docker compose rm mytbedge

Backup Database

Make a copy of the database volume before upgrading:

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

Create docker compose file for ThingsBoard Edge upgrade process:

1
> docker-compose-upgrade.yml && nano docker-compose-upgrade.yml

Add the following lines to the yml file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version: '3.8'
services:
  mytbedge:
    restart: on-failure
    image: "thingsboard/tb-edge-pe:3.7.0EDGEPE"
    environment:
      SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb-edge
    volumes:
      - tb-edge-data:/data
      - tb-edge-logs:/var/log/tb-edge
    entrypoint: upgrade-tb-edge.sh
  postgres:
    restart: always
    image: "postgres:15"
    ports:
      - "5432"
    environment:
      POSTGRES_DB: tb-edge
      POSTGRES_PASSWORD: postgres
    volumes:
      - tb-edge-postgres-data:/var/lib/postgresql/data

volumes:
  tb-edge-data:
    name: tb-edge-data
  tb-edge-logs:
    name: tb-edge-logs
  tb-edge-postgres-data:
    name: tb-edge-postgres-data

Execute the following command to start upgrade process:

1
docker compose -f docker-compose-upgrade.yml up

Once upgrade process successfully completed, exit from the docker-compose shell by this combination:

1
Ctrl + C

Execute the following command to stop TB Edge upgrade container:

1
docker compose -f docker-compose-upgrade.yml stop

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

1
nano docker-compose.yml
1
2
3
4
5
6
version: '3.8'
services:
  mytbedge:
    restart: always
    image: "thingsboard/tb-edge-pe:3.7.0EDGEPE"
...

Make sure your image is the set to tb-edge-pe:3.7.0EDGEPE.

Execute the following commands to up this docker compose directly:

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

Windows

NOTE: These steps are applicable for ThingsBoard Edge 3.6.4EDGEPE version.

doc warn icon

Important note before upgrading to ThingsBoard 3.7

ThingsBoard backend was migrated to Java 17. Install JDK 17 and ensure that system’s default Java version is set to 17.

Please refer to Step 1 of the installation guide for detailed instructions.

ThingsBoard Edge package download

Download ThingsBoard Edge package for Windows: tb-edge-windows-3.7pe.zip.

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running:
1
net stop tb-edge
  • Make a backup of previous ThingsBoard Edge configuration located in <ThingsBoard Edge install dir>\conf (for example: C:\tb-edge\conf).

  • Extract ThingsBoard Edge package.

  • Compare and merge your old ThingsBoard Edge configuration files (from the backup you made in the previous step) with new ones.

  • Finally, run upgrade.bat script to upgrade ThingsBoard Edge to the new version.

NOTE Scripts listed below should be executed using Administrator Role.

Execute regular upgrade script:

1
C:\tb-edge>upgrade.bat --fromVersion=3.6.4

Start the service

1
net start tb-edge

Upgrading to 3.6.4EDGEPE

doc warn icon

Please make sure that ThingsBoard Server version is 3.6.4PE or above before updating ThingsBoard Edge to this version.

If ThingsBoard Server version is below 3.6.4PE, please follow upgrade ThingsBoard server upgrade instructions first.

Ubuntu/CentOS

NOTE: These steps are applicable for ThingsBoard Edge 3.6.3EDGEPE version.

ThingsBoard Edge package download

1
wget https://dist.thingsboard.io/tb-edge-3.6.4pe.deb
1
wget https://dist.thingsboard.io/tb-edge-3.6.4pe.rpm

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running.
1
sudo service tb-edge stop
1
sudo dpkg -i tb-edge-3.6.4pe.deb
1
sudo rpm -Uvh tb-edge-3.6.4pe.rpm

NOTE: Package installer may ask you to merge your tb-edge configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.

Execute regular upgrade script:

1
sudo /usr/share/tb-edge/bin/install/upgrade.sh --fromVersion=3.6.3

Start the service

1
sudo service tb-edge start

Docker (Linux or Mac OS)

NOTE: These steps are applicable for ThingsBoard Edge 3.6.3EDGEPE version.

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

1
2
docker compose stop
docker compose rm mytbedge

Backup Database

Make a copy of the database volume before upgrading:

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

Create docker compose file for ThingsBoard Edge upgrade process:

1
> docker-compose-upgrade.yml && nano docker-compose-upgrade.yml

Add the following lines to the yml file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version: '3.8'
services:
  mytbedge:
    restart: on-failure
    image: "thingsboard/tb-edge-pe:3.6.4EDGEPE"
    environment:
      SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb-edge
    volumes:
      - tb-edge-data:/data
      - tb-edge-logs:/var/log/tb-edge
    entrypoint: upgrade-tb-edge.sh
  postgres:
    restart: always
    image: "postgres:15"
    ports:
      - "5432"
    environment:
      POSTGRES_DB: tb-edge
      POSTGRES_PASSWORD: postgres
    volumes:
      - tb-edge-postgres-data:/var/lib/postgresql/data

volumes:
  tb-edge-data:
    name: tb-edge-data
  tb-edge-logs:
    name: tb-edge-logs
  tb-edge-postgres-data:
    name: tb-edge-postgres-data

Execute the following command to start upgrade process:

1
docker compose -f docker-compose-upgrade.yml up

Once upgrade process successfully completed, exit from the docker-compose shell by this combination:

1
Ctrl + C

Execute the following command to stop TB Edge upgrade container:

1
docker compose -f docker-compose-upgrade.yml stop

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

1
nano docker-compose.yml
1
2
3
4
5
6
version: '3.8'
services:
  mytbedge:
    restart: always
    image: "thingsboard/tb-edge-pe:3.6.4EDGEPE"
...

Make sure your image is the set to tb-edge-pe:3.6.4EDGEPE.

Execute the following commands to up this docker compose directly:

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

Windows

NOTE: These steps are applicable for ThingsBoard Edge 3.6.3EDGEPE version.

ThingsBoard Edge package download

Download ThingsBoard Edge package for Windows: tb-edge-windows-3.6.4pe.zip.

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running:
1
net stop tb-edge
  • Make a backup of previous ThingsBoard Edge configuration located in <ThingsBoard Edge install dir>\conf (for example: C:\tb-edge\conf).

  • Extract ThingsBoard Edge package.

  • Compare and merge your old ThingsBoard Edge configuration files (from the backup you made in the previous step) with new ones.

  • Finally, run upgrade.bat script to upgrade ThingsBoard Edge to the new version.

NOTE Scripts listed below should be executed using Administrator Role.

Execute regular upgrade script:

1
C:\tb-edge>upgrade.bat --fromVersion=3.6.3

Start the service

1
net start tb-edge

Upgrading to 3.6.3EDGEPE

doc warn icon

Please make sure that ThingsBoard Server version is 3.6.3PE or above before updating ThingsBoard Edge to this version.

If ThingsBoard Server version is below 3.6.3PE, please follow upgrade ThingsBoard server upgrade instructions first.

Ubuntu/CentOS

NOTE: These steps are applicable for ThingsBoard Edge 3.6.2EDGEPE version.

ThingsBoard Edge package download

1
wget https://dist.thingsboard.io/tb-edge-3.6.3pe.deb
1
wget https://dist.thingsboard.io/tb-edge-3.6.3pe.rpm

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running.
1
sudo service tb-edge stop
1
sudo dpkg -i tb-edge-3.6.3pe.deb
1
sudo rpm -Uvh tb-edge-3.6.3pe.rpm

NOTE: Package installer may ask you to merge your tb-edge configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.

Execute regular upgrade script:

1
sudo /usr/share/tb-edge/bin/install/upgrade.sh --fromVersion=3.6.2

Start the service

1
sudo service tb-edge start

Docker (Linux or Mac OS)

NOTE: These steps are applicable for ThingsBoard Edge 3.6.2EDGEPE version.

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

1
2
docker compose stop
docker compose rm mytbedge

Backup Database

Make a copy of the database volume before upgrading:

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

Create docker compose file for ThingsBoard Edge upgrade process:

1
> docker-compose-upgrade.yml && nano docker-compose-upgrade.yml

Add the following lines to the yml file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version: '3.8'
services:
  mytbedge:
    restart: on-failure
    image: "thingsboard/tb-edge-pe:3.6.3EDGEPE"
    environment:
      SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb-edge
    volumes:
      - tb-edge-data:/data
      - tb-edge-logs:/var/log/tb-edge
    entrypoint: upgrade-tb-edge.sh
  postgres:
    restart: always
    image: "postgres:15"
    ports:
      - "5432"
    environment:
      POSTGRES_DB: tb-edge
      POSTGRES_PASSWORD: postgres
    volumes:
      - tb-edge-postgres-data:/var/lib/postgresql/data

volumes:
  tb-edge-data:
    name: tb-edge-data
  tb-edge-logs:
    name: tb-edge-logs
  tb-edge-postgres-data:
    name: tb-edge-postgres-data

Execute the following command to start upgrade process:

1
docker compose -f docker-compose-upgrade.yml up

Once upgrade process successfully completed, exit from the docker-compose shell by this combination:

1
Ctrl + C

Execute the following command to stop TB Edge upgrade container:

1
docker compose -f docker-compose-upgrade.yml stop

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

1
nano docker-compose.yml
1
2
3
4
5
6
version: '3.8'
services:
  mytbedge:
    restart: always
    image: "thingsboard/tb-edge-pe:3.6.3EDGEPE"
...

Make sure your image is the set to tb-edge-pe:3.6.3EDGEPE.

Execute the following commands to up this docker compose directly:

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

Windows

NOTE: These steps are applicable for ThingsBoard Edge 3.6.2EDGEPE version.

ThingsBoard Edge package download

Download ThingsBoard Edge package for Windows: tb-edge-windows-3.6.3pe.zip.

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running:
1
net stop tb-edge
  • Make a backup of previous ThingsBoard Edge configuration located in <ThingsBoard Edge install dir>\conf (for example: C:\tb-edge\conf).

  • Extract ThingsBoard Edge package.

  • Compare and merge your old ThingsBoard Edge configuration files (from the backup you made in the previous step) with new ones.

  • Finally, run upgrade.bat script to upgrade ThingsBoard Edge to the new version.

NOTE Scripts listed below should be executed using Administrator Role.

Execute regular upgrade script:

1
C:\tb-edge>upgrade.bat --fromVersion=3.6.2

Start the service

1
net start tb-edge

Upgrading to 3.6.2EDGEPE

doc warn icon

Please make sure that ThingsBoard Server version is 3.6.2PE or above before updating ThingsBoard Edge to this version.

If ThingsBoard Server version is below 3.6.2PE, please follow upgrade ThingsBoard server upgrade instructions first.

Ubuntu/CentOS

NOTE: These steps are applicable for ThingsBoard Edge 3.6.1EDGEPE version.

ThingsBoard Edge package download

1
wget https://dist.thingsboard.io/tb-edge-3.6.2pe.deb
1
wget https://dist.thingsboard.io/tb-edge-3.6.2pe.rpm

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running.
1
sudo service tb-edge stop
1
sudo dpkg -i tb-edge-3.6.2pe.deb
1
sudo rpm -Uvh tb-edge-3.6.2pe.rpm

NOTE: Package installer may ask you to merge your tb-edge configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.

Execute regular upgrade script:

1
sudo /usr/share/tb-edge/bin/install/upgrade.sh --fromVersion=3.6.1

Start the service

1
sudo service tb-edge start

Docker (Linux or Mac OS)

NOTE: These steps are applicable for ThingsBoard Edge 3.6.1EDGEPE version.

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

1
2
docker compose stop
docker compose rm mytbedge

Migrating Data from Docker Bind Mount Folders to Docker Volumes

Starting with the 3.6.2 release, the ThingsBoard team has transitioned from using Docker bind mount folders to Docker volumes. This change aims to enhance security and efficiency in storing data for Docker containers and to mitigate permission issues across various environments.

To migrate from Docker bind mounts to Docker volumes, please execute the following commands:

1
2
3
docker run --rm -v tb-edge-data:/volume -v ~/.mytb-edge-data:/backup busybox sh -c "cp -a /backup/. /volume"
docker run --rm -v tb-edge-logs:/volume -v ~/.mytb-edge-logs:/backup busybox sh -c "cp -a /backup/. /volume"
docker run --rm -v tb-edge-postgres-data:/volume -v ~/.mytb-edge-data/db:/backup busybox sh -c "cp -a /backup/. /volume"

After completing the data migration to the newly created Docker volumes, you’ll need to update the volume mounts in your Docker Compose configuration. Modify the docker-compose.yml file for ThingsBoard Edge to update the volume settings.

First, please update docker compose file version. Find next snippet:

1
2
version: '3.0'
...

And replace it with:

1
2
version: '3.8'
...

Then update volume mounts. Locate the following snippet:

1
2
3
4
    volumes:
      - ~/.mytb-edge-data:/data
      - ~/.mytb-edge-logs:/var/log/tb-edge
...

And replace it with:

1
2
3
4
    volumes:
      - tb-edge-data:/data
      - tb-edge-logs:/var/log/tb-edge
...

Apply a similar update for the PostgreSQL service. Find the section:

1
2
3
    volumes:
      - ~/.mytb-edge-data/db:/var/lib/postgresql/data
...

And replace it with:

1
2
3
    volumes:
      - tb-edge-postgres-data:/var/lib/postgresql/data
...

Finally, please add next volumes section at the end of the file:

1
2
3
4
5
6
7
8
...
volumes:
  tb-edge-data:
    name: tb-edge-data
  tb-edge-logs:
    name: tb-edge-logs
  tb-edge-postgres-data:
    name: tb-edge-postgres-data

Backup Database

Make a copy of the database volume before upgrading:

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

Create docker compose file for ThingsBoard Edge upgrade process:

1
> docker-compose-upgrade.yml && nano docker-compose-upgrade.yml

Add the following lines to the yml file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version: '3.8'
services:
  mytbedge:
    restart: on-failure
    image: "thingsboard/tb-edge-pe:3.6.2EDGEPE"
    environment:
      SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb-edge
    volumes:
      - tb-edge-data:/data
      - tb-edge-logs:/var/log/tb-edge
    entrypoint: upgrade-tb-edge.sh
  postgres:
    restart: always
    image: "postgres:15"
    ports:
      - "5432"
    environment:
      POSTGRES_DB: tb-edge
      POSTGRES_PASSWORD: postgres
    volumes:
      - tb-edge-postgres-data:/var/lib/postgresql/data

volumes:
  tb-edge-data:
    name: tb-edge-data
  tb-edge-logs:
    name: tb-edge-logs
  tb-edge-postgres-data:
    name: tb-edge-postgres-data

Execute the following command to start upgrade process:

1
docker compose -f docker-compose-upgrade.yml up

Once upgrade process successfully completed, exit from the docker-compose shell by this combination:

1
Ctrl + C

Execute the following command to stop TB Edge upgrade container:

1
docker compose -f docker-compose-upgrade.yml stop

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

1
nano docker-compose.yml
1
2
3
4
5
6
version: '3.8'
services:
  mytbedge:
    restart: always
    image: "thingsboard/tb-edge-pe:3.6.2EDGEPE"
...

Make sure your image is the set to tb-edge-pe:3.6.2EDGEPE.

Execute the following commands to up this docker compose directly:

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

Windows

NOTE: These steps are applicable for ThingsBoard Edge 3.6.1EDGEPE version.

ThingsBoard Edge package download

Download ThingsBoard Edge package for Windows: tb-edge-windows-3.6.2pe.zip.

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running:
1
net stop tb-edge
  • Make a backup of previous ThingsBoard Edge configuration located in <ThingsBoard Edge install dir>\conf (for example: C:\tb-edge\conf).

  • Extract ThingsBoard Edge package.

  • Compare and merge your old ThingsBoard Edge configuration files (from the backup you made in the previous step) with new ones.

  • Finally, run upgrade.bat script to upgrade ThingsBoard Edge to the new version.

NOTE Scripts listed below should be executed using Administrator Role.

Execute regular upgrade script:

1
C:\tb-edge>upgrade.bat --fromVersion=3.6.1

Start the service

1
net start tb-edge

Upgrading to 3.6.1EDGEPE

doc warn icon

Please make sure that ThingsBoard Server version is 3.6.1PE or above before updating ThingsBoard Edge to this version.

If ThingsBoard Server version is below 3.6.1PE, please follow upgrade ThingsBoard server upgrade instructions first.

Ubuntu/CentOS

NOTE: These steps are applicable for ThingsBoard Edge 3.6.0EDGEPE version.

ThingsBoard Edge package download

1
wget https://dist.thingsboard.io/tb-edge-3.6.1pe.deb
1
wget https://dist.thingsboard.io/tb-edge-3.6.1pe.rpm

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running.
1
sudo service tb-edge stop
1
sudo dpkg -i tb-edge-3.6.1pe.deb
1
sudo rpm -Uvh tb-edge-3.6.1pe.rpm

NOTE: Package installer may ask you to merge your tb-edge configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.

Execute regular upgrade script:

1
sudo /usr/share/tb-edge/bin/install/upgrade.sh --fromVersion=3.6.0

Start the service

1
sudo service tb-edge start

Docker (Linux or Mac OS)

NOTE: These steps are applicable for ThingsBoard Edge 3.6.0EDGEPE version.

Execute the following command to pull 3.6.1EDGEPE image:

1
docker pull thingsboard/tb-edge-pe:3.6.1EDGEPE

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

1
2
docker compose stop
docker compose rm mytbedge

Create docker compose file for ThingsBoard Edge upgrade process:

1
nano docker-compose-upgrade.yml

Add the following lines to the yml file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
version: '3.0'
services:
  mytbedge:
    restart: on-failure
    image: "thingsboard/tb-edge-pe:3.6.1EDGEPE"
    environment:
      SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb-edge
    volumes:
      - ~/.mytb-edge-data:/data
      - ~/.mytb-edge-logs:/var/log/tb-edge
    entrypoint: upgrade-tb-edge.sh
  postgres:
    restart: always
    image: "postgres:15"
    ports:
      - "5432"
    environment:
      POSTGRES_DB: tb-edge
      POSTGRES_PASSWORD: postgres
    volumes:
      - ~/.mytb-edge-data/db:/var/lib/postgresql/data

Execute the following command to start upgrade process:

1
docker compose -f docker-compose-upgrade.yml up

Once upgrade process successfully completed, exit from the docker-compose shell by this combination:

1
Ctrl + C

Execute the following command to stop TB Edge upgrade container:

1
docker compose -f docker-compose-upgrade.yml stop

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

1
nano docker-compose.yml
1
2
3
4
5
6
version: '3.0'
services:
  mytbedge:
    restart: always
    image: "thingsboard/tb-edge-pe:3.6.1EDGEPE"
...

Make sure your image is the set to tb-edge-pe:3.6.1EDGEPE.

Execute the following commands to up this docker compose directly:

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

Windows

NOTE: These steps are applicable for ThingsBoard Edge 3.6.0EDGEPE version.

ThingsBoard Edge package download

Download ThingsBoard Edge package for Windows: tb-edge-windows-3.6.1pe.zip.

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running:
1
net stop tb-edge
  • Make a backup of previous ThingsBoard Edge configuration located in <ThingsBoard Edge install dir>\conf (for example: C:\tb-edge\conf).

  • Extract ThingsBoard Edge package.

  • Compare and merge your old ThingsBoard Edge configuration files (from the backup you made in the previous step) with new ones.

  • Finally, run upgrade.bat script to upgrade ThingsBoard Edge to the new version.

NOTE Scripts listed below should be executed using Administrator Role.

Execute regular upgrade script:

1
C:\tb-edge>upgrade.bat --fromVersion=3.6.0

Start the service

1
net start tb-edge

Upgrading to 3.6.0EDGEPE

doc warn icon

Please make sure that ThingsBoard Server version is 3.6.0PE or above before updating ThingsBoard Edge to this version.

If ThingsBoard Server version is below 3.6.0PE, please follow upgrade ThingsBoard server upgrade instructions first.

Ubuntu/CentOS

NOTE: These steps are applicable for ThingsBoard Edge 3.5.1.1EDGEPE version.

ThingsBoard Edge package download

1
wget https://dist.thingsboard.io/tb-edge-3.6pe.deb
1
wget https://dist.thingsboard.io/tb-edge-3.6pe.rpm

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running.
1
sudo service tb-edge stop
1
sudo dpkg -i tb-edge-3.6pe.deb
1
sudo rpm -Uvh tb-edge-3.6pe.rpm

NOTE: Package installer may ask you to merge your tb-edge configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.

Execute regular upgrade script:

1
sudo /usr/share/tb-edge/bin/install/upgrade.sh --fromVersion=3.5.1

Start the service

1
sudo service tb-edge start

Docker (Linux or Mac OS)

NOTE: These steps are applicable for ThingsBoard Edge 3.5.1.1EDGEPE version.

Execute the following command to pull 3.6.0EDGEPE image:

1
docker pull thingsboard/tb-edge-pe:3.6.0EDGEPE

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

1
2
docker compose stop
docker compose rm mytbedge

Create docker compose file for ThingsBoard Edge upgrade process:

1
nano docker-compose-upgrade.yml

Add the following lines to the yml file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
version: '3.0'
services:
  mytbedge:
    restart: on-failure
    image: "thingsboard/tb-edge-pe:3.6.0EDGEPE"
    environment:
      SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb-edge
    volumes:
      - ~/.mytb-edge-data:/data
      - ~/.mytb-edge-logs:/var/log/tb-edge
    entrypoint: upgrade-tb-edge.sh
  postgres:
    restart: always
    image: "postgres:15"
    ports:
      - "5432"
    environment:
      POSTGRES_DB: tb-edge
      POSTGRES_PASSWORD: postgres
    volumes:
      - ~/.mytb-edge-data/db:/var/lib/postgresql/data

Execute the following command to start upgrade process:

1
docker compose -f docker-compose-upgrade.yml up

Once upgrade process successfully completed, exit from the docker-compose shell by this combination:

1
Ctrl + C

Execute the following command to stop TB Edge upgrade container:

1
docker compose -f docker-compose-upgrade.yml stop

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

1
nano docker-compose.yml
1
2
3
4
5
6
version: '3.0'
services:
  mytbedge:
    restart: always
    image: "thingsboard/tb-edge-pe:3.6.0EDGEPE"
...

Make sure your image is the set to tb-edge-pe:3.6.0EDGEPE.

Execute the following commands to up this docker compose directly:

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

Windows

NOTE: These steps are applicable for ThingsBoard Edge 3.5.1.1EDGEPE version.

ThingsBoard Edge package download

Download ThingsBoard Edge package for Windows: tb-edge-windows-3.6pe.zip.

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running:
1
net stop tb-edge
  • Make a backup of previous ThingsBoard Edge configuration located in <ThingsBoard Edge install dir>\conf (for example: C:\tb-edge\conf).

  • Extract ThingsBoard Edge package.

  • Compare and merge your old ThingsBoard Edge configuration files (from the backup you made in the previous step) with new ones.

  • Finally, run upgrade.bat script to upgrade ThingsBoard Edge to the new version.

NOTE Scripts listed below should be executed using Administrator Role.

Execute regular upgrade script:

1
C:\tb-edge>upgrade.bat --fromVersion=3.5.1

Start the service

1
net start tb-edge

Upgrading to 3.5.1.1EDGEPE

doc warn icon

Please make sure that ThingsBoard Server version is 3.5.1PE or above before updating ThingsBoard Edge to this version.

If ThingsBoard Server version is below 3.5.1PE, please follow upgrade ThingsBoard server upgrade instructions first.

Ubuntu/CentOS

NOTE: These steps are applicable for ThingsBoard Edge 3.5.1EDGEPE version.

ThingsBoard Edge package download

1
wget https://dist.thingsboard.io/tb-edge-3.5.1.1pe.deb
1
wget https://dist.thingsboard.io/tb-edge-3.5.1.1pe.rpm

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running.
1
sudo service tb-edge stop
1
sudo dpkg -i tb-edge-3.5.1.1pe.deb
1
sudo rpm -Uvh tb-edge-3.5.1.1pe.rpm

NOTE: Package installer may ask you to merge your tb-edge configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.

Start the service

1
sudo service tb-edge start

Docker (Linux or Mac OS)

NOTE: These steps are applicable for ThingsBoard Edge 3.5.1EDGEPE version.

Execute the following command to pull 3.5.1.1EDGEPE image:

1
docker pull thingsboard/tb-edge-pe:3.5.1.1EDGEPE

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

1
2
docker compose stop
docker compose rm mytbedge

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

1
nano docker-compose.yml
1
2
3
4
5
6
version: '3.0'
services:
  mytbedge:
    restart: always
    image: "thingsboard/tb-edge-pe:3.5.1.1EDGEPE"
...

Make sure your image is the set to tb-edge-pe:3.5.1.1EDGEPE.

Execute the following commands to up this docker compose directly:

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

Windows

NOTE: These steps are applicable for ThingsBoard Edge 3.5.1EDGEPE version.

ThingsBoard Edge package download

Download ThingsBoard Edge package for Windows: tb-edge-windows-3.5.1.1pe.zip.

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running:
1
net stop tb-edge
  • Make a backup of previous ThingsBoard Edge configuration located in <ThingsBoard Edge install dir>\conf (for example: C:\tb-edge\conf).

  • Extract ThingsBoard Edge package.

  • Compare and merge your old ThingsBoard Edge configuration files (from the backup you made in the previous step) with new ones.

Start the service

1
net start tb-edge

Upgrading to 3.5.1EDGEPE

doc warn icon

Please make sure that ThingsBoard Server version is 3.5.1PE or above before updating ThingsBoard Edge to this version.

If ThingsBoard Server version is below 3.5.1PE, please follow upgrade ThingsBoard server upgrade instructions first.

Ubuntu/CentOS

NOTE: These steps are applicable for ThingsBoard Edge 3.5.0EDGEPE version.

ThingsBoard Edge package download

1
wget https://dist.thingsboard.io/tb-edge-3.5.1pe.deb
1
wget https://dist.thingsboard.io/tb-edge-3.5.1pe.rpm

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running.
1
sudo service tb-edge stop
1
sudo dpkg -i tb-edge-3.5.1pe.deb
1
sudo rpm -Uvh tb-edge-3.5.1pe.rpm

NOTE: Package installer may ask you to merge your tb-edge configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.

Execute regular upgrade script:

1
sudo /usr/share/tb-edge/bin/install/upgrade.sh --fromVersion=3.5.0

Start the service

1
sudo service tb-edge start

Docker (Linux or Mac OS)

NOTE: These steps are applicable for ThingsBoard Edge 3.5.0EDGEPE version.

Execute the following command to pull 3.5.1EDGEPE image:

1
docker pull thingsboard/tb-edge-pe:3.5.1EDGEPE

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

1
2
docker compose stop
docker compose rm mytbedge

Create docker compose file for ThingsBoard Edge upgrade process:

1
nano docker-compose-upgrade.yml

Add the following lines to the yml file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
version: '3.0'
services:
  mytbedge:
    restart: on-failure
    image: "thingsboard/tb-edge-pe:3.5.1EDGEPE"
    environment:
      SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb-edge
    volumes:
      - ~/.mytb-edge-data:/data
      - ~/.mytb-edge-logs:/var/log/tb-edge
    entrypoint: upgrade-tb-edge.sh
  postgres:
    restart: always
    image: "postgres:15"
    ports:
      - "5432"
    environment:
      POSTGRES_DB: tb-edge
      POSTGRES_PASSWORD: postgres
    volumes:
      - ~/.mytb-edge-data/db:/var/lib/postgresql/data

Execute the following command to start upgrade process:

1
docker compose -f docker-compose-upgrade.yml up

Once upgrade process successfully completed, exit from the docker-compose shell by this combination:

1
Ctrl + C

Execute the following command to stop TB Edge upgrade container:

1
docker compose -f docker-compose-upgrade.yml stop

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

1
nano docker-compose.yml
1
2
3
4
5
6
version: '3.0'
services:
  mytbedge:
    restart: always
    image: "thingsboard/tb-edge-pe:3.5.1EDGEPE"
...

Make sure your image is the set to tb-edge-pe:3.5.1EDGEPE.

Execute the following commands to up this docker compose directly:

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

Windows

NOTE: These steps are applicable for ThingsBoard Edge 3.5.0EDGEPE version.

ThingsBoard Edge package download

Download ThingsBoard Edge package for Windows: tb-edge-windows-3.5.1pe.zip.

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running:
1
net stop tb-edge
  • Make a backup of previous ThingsBoard Edge configuration located in <ThingsBoard Edge install dir>\conf (for example: C:\tb-edge\conf).

  • Extract ThingsBoard Edge package.

  • Compare and merge your old ThingsBoard Edge configuration files (from the backup you made in the previous step) with new ones.

  • Finally, run upgrade.bat script to upgrade ThingsBoard Edge to the new version.

NOTE Scripts listed below should be executed using Administrator Role.

Execute regular upgrade script:

1
C:\tb-edge>upgrade.bat --fromVersion=3.5.0

Start the service

1
net start tb-edge

Upgrading to 3.5.0EDGEPE

doc warn icon

Please make sure that ThingsBoard Server version is 3.5.0PE or above before updating ThingsBoard Edge to this version.

If ThingsBoard Server version is below 3.5.0PE, please follow upgrade ThingsBoard server upgrade instructions first.

Ubuntu/CentOS

NOTE: These steps are applicable for ThingsBoard Edge 3.4.3EDGEPE version.

ThingsBoard Edge package download

1
wget https://dist.thingsboard.io/tb-edge-3.5pe.deb
1
wget https://dist.thingsboard.io/tb-edge-3.5pe.rpm

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running.
1
sudo service tb-edge stop
1
sudo dpkg -i tb-edge-3.5pe.deb
1
sudo rpm -Uvh tb-edge-3.5pe.rpm

NOTE: Package installer may ask you to merge your tb-edge configuration. It is preferred to use merge option to make sure that all your previous parameters will not be overwritten.

Execute regular upgrade script:

1
sudo /usr/share/tb-edge/bin/install/upgrade.sh --fromVersion=3.4.3

Start the service

1
sudo service tb-edge start

Docker (Linux or Mac OS)

NOTE: These steps are applicable for ThingsBoard Edge 3.4.3EDGEPE version.

Execute the following command to pull 3.5.0EDGEPE image:

1
docker pull thingsboard/tb-edge-pe:3.5.0EDGEPE

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

1
2
docker compose stop
docker compose rm mytbedge

Create docker compose file for ThingsBoard Edge upgrade process:

1
nano docker-compose-upgrade.yml

Add the following lines to the yml file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
version: '3.0'
services:
  mytbedge:
    restart: on-failure
    image: "thingsboard/tb-edge-pe:3.5.0EDGEPE"
    environment:
      SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb-edge
    volumes:
      - ~/.mytb-edge-data:/data
      - ~/.mytb-edge-logs:/var/log/tb-edge
    entrypoint: upgrade-tb-edge.sh
  postgres:
    restart: always
    image: "postgres:15"
    ports:
      - "5432"
    environment:
      POSTGRES_DB: tb-edge
      POSTGRES_PASSWORD: postgres
    volumes:
      - ~/.mytb-edge-data/db:/var/lib/postgresql/data

Execute the following command to start upgrade process:

1
docker compose -f docker-compose-upgrade.yml up

Once upgrade process successfully completed, exit from the docker-compose shell by this combination:

1
Ctrl + C

Execute the following command to stop TB Edge upgrade container:

1
docker compose -f docker-compose-upgrade.yml stop

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

1
nano docker-compose.yml
1
2
3
4
5
6
version: '3.0'
services:
  mytbedge:
    restart: always
    image: "thingsboard/tb-edge-pe:3.5.0EDGEPE"
...

Make sure your image is the set to tb-edge-pe:3.5.0EDGEPE.

Execute the following commands to up this docker compose directly:

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

Windows

NOTE: These steps are applicable for ThingsBoard Edge 3.4.3EDGEPE version.

ThingsBoard Edge package download

Download ThingsBoard Edge package for Windows: tb-edge-windows-3.5pe.zip.

ThingsBoard Edge service upgrade

  • Stop ThingsBoard Edge service if it is running:
1
net stop tb-edge
  • Make a backup of previous ThingsBoard Edge configuration located in <ThingsBoard Edge install dir>\conf (for example: C:\tb-edge\conf).

  • Extract ThingsBoard Edge package.

  • Compare and merge your old ThingsBoard Edge configuration files (from the backup you made in the previous step) with new ones.

  • Finally, run upgrade.bat script to upgrade ThingsBoard Edge to the new version.

NOTE Scripts listed below should be executed using Administrator Role.

Execute regular upgrade script:

1
C:\tb-edge>upgrade.bat --fromVersion=3.4.3

Start the service

1
net start tb-edge