This repository contains the ThingsBoard Community Edition. Follow the instructions below to set up your development environment.
git clone git@github.com:lamah-co/thingsboard.git
cd thingsboard
mvn clean install -DskipTests
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 11.0.23-tem
services:
postgres:
image: postgres:latest
container_name: thingsboard-postgres
environment:
POSTGRES_DB: thingsboard
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
docker-compose up -d
Connect to the PostgreSQL container and create the ThingsBoard database:
psql -U postgres -d postgres -h 127.0.0.1 -W
CREATE DATABASE thingsboard;
\q
cd thingsboard/application/target/bin/install
chmod +x install_dev_db.sh
./install_dev_db.sh # On Linux
install_dev_db.bat # Windows
If you encounter the following error:
/var/log/thingsboard/install.log (No such file or directory)
sudo mkdir /var/log/thingsboard sudo chmod 777 /var/log/thingsboard
cd thingsboard/ui-ngx
mvn clean install -P yarn-start
You can run the server in two ways:
cd thingsboard
java -jar application/target/thingsboard-${VERSION}-boot.jar
1. Install the Maven for Java Extension:
• Extension ID: vscjava.vscode-maven
2. Install the Spring Boot Tools Plugin Extension:
• Extension ID: vmware.vscode-spring-boot
3. Open the `ThingsboardServerApplication main method located in org.thingsboard.server` and run the server in Visual Studio Code.