Building ThingsBoard Edge from sources
Build ThingsBoard Edge from source on Ubuntu 22.04 LTS / 24.04 LTS or CentOS 8/9.
Required tools
Section titled “Required tools”Java 17
Section titled “Java 17”ThingsBoard Edge requires Java 17.
sudo apt update && sudo apt install openjdk-17-jdk-headlessConfigure your operating system to use OpenJDK 17 by default:
sudo update-alternatives --config javaVerify the installation:
java -versionsudo dnf install java-17-openjdk-headlessConfigure your operating system to use OpenJDK 17 by default:
sudo update-alternatives --config javaVerify the installation:
java -versionThe expected output:
openjdk version "17.x.xx"OpenJDK Runtime Environment (...)OpenJDK 64-Bit Server VM (build ...)ThingsBoard Edge requires Maven 3.1.0 or later.
sudo apt-get install mavensudo yum install mavenClone the source code
Section titled “Clone the source code”cd thingsboard-edgeRun the following command from the thingsboard-edge directory:
mvn clean install -DskipTestsBuild local Docker images
Section titled “Build local Docker images”Make sure Docker is installed, then run:
mvn clean install -DskipTests -Ddockerfile.skip=falseBuild artifacts
Section titled “Build artifacts”After a successful build, the .deb, .rpm, and Windows .zip packages are available at:
application/targetClear Maven cache if you encounter dependency resolution errors:
rm -rf ~/.m2/repositoryClear Gradle cache if the UI build fails:
rm -rf ~/.gradle/caches/Clear Node modules if the Angular frontend build fails:
rm -rf ui-ngx/node_modulesBuild in parallel with license headers and Docker images:
mvn -T 0.8C license:format clean install -DskipTests -Ddockerfile.skip=false