Install on Ubuntu / Raspberry Pi
Install ThingsBoard IoT Gateway as a .deb package on Ubuntu 22.04 LTS / 24.04 LTS or Raspberry Pi.
The package registers the Gateway as a systemd service that starts automatically on boot.
Prerequisites
Section titled “Prerequisites”- System meets Ubuntu minimum hardware requirements.
- Python 3.10 or higher is installed.
Installation
Section titled “Installation”Download the
.debpackage.Terminal window wget https://github.com/thingsboard/thingsboard-gateway/releases/latest/download/python3-thingsboard-gateway.debInstall the package.
Terminal window sudo apt install ./python3-thingsboard-gateway.deb -yThe package automatically installs all required dependencies:
- System libraries:
libffi-dev,libglib2.0-dev,libxml2-dev,libxslt-dev,libssl-dev,zlib1g-dev,python3-dev,python3-pip. - Python modules:
importlib,importlib-metadata,jsonschema,pymodbus,lxml,jsonpath-rw,paho-mqtt,pyserial,PyYAML,simplejson,pyrsistent.
- System libraries:
Check the Gateway status.
Terminal window systemctl status thingsboard-gatewayConfigure the Gateway. Follow the configuration guide to connect the Gateway to your ThingsBoard instance. After saving the configuration, restart the service to apply the changes.
Terminal window systemctl restart thingsboard-gateway
Offline Build
Section titled “Offline Build”The Offline Build is a variant of the Gateway package for environments without internet access
(air-gapped, firewalled, or private datacenter deployments). It bundles all dependencies in advance,
including a prebuilt Python virtual environment, all required Python packages, and the application wheel (.whl),
so no runtime downloads are needed and all connectors are immediately available.
Prerequisites
Section titled “Prerequisites”The Offline Build requires the same system prerequisites as the standard package, plus Python 3.11 exactly. If an incompatible Python version is detected, the installer exits with instructions for installing the correct version.
To install Python 3.11:
sudo add-apt-repository ppa:deadsnakes/ppa -ysudo apt-get updatesudo apt-get install -y python3.11 python3.11-venvInstallation
Section titled “Installation”Download the offline
.debpackage.Terminal window wget https://github.com/thingsboard/thingsboard-gateway/releases/latest/download/python3.11-thingsboard-gateway-offline.debInstall the package.
Terminal window sudo apt install ./python3.11-thingsboard-gateway-offline.deb -yCheck the Gateway status.
Terminal window systemctl status thingsboard-gateway
Troubleshooting
Section titled “Troubleshooting”Wrong Python version — the installer displays a guide for installing the required version. Once Python 3.11 is installed, remove the previously installed package before retrying:
sudo dpkg --purge python3-thingsboard-gatewayThen reinstall the offline package as described above.