• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » How to Setup ThingsBoard IoT on Ubuntu/Debian Server

By Abhishek Ghosh November 29, 2022 9:11 pm Updated on November 29, 2022

How to Setup ThingsBoard IoT on Ubuntu/Debian Server

Advertisement

In earlier guides, we have mentioned that ThingsBoard is an open-source IoT platform which supports MQTT, CoAP and HTTP protocol. Supporting HTTP requests is quite important in some use cases. For example, when you need a toggle button to control your AC powered appliances, then the easiest way is to control with a cURL request. This you could do with IBM Watson IoT, but as we have said earlier, IBM Watson IoT platform will be retired soon. ThingsBoard is a software package that can be used for data collection, processing, visualization, and device management. All you need is a virtual server with 1GB RAM with root access.

How to Setup ThingsBoard IoT on Ubuntu

Above is a screenshot of ThingsBoard cloud. You’ll get a similar UI on your server.

 

Steps to Install ThingsBoard IoT on Ubuntu/Debian Server

 

It is practical to use a subdomain or domain and setup Let’s Encrypt/Certbot. The steps of the later will be similar to that shown in our earlier guide.

Advertisement

---

SSH to the instance. First, we have to install OpenJDK 11 and set it to use by the operating system by default :

Vim
1
2
3
4
5
sudo apt update
sudo apt install -y wget curl mlocate
sudo apt install openjdk-11-jdk
sudo update-alternatives --config java
java -version

Next, we have to install PostgreSQL and configure it :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# update locate database
sudo updatedb
# import the repository signing key
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
# add repository contents to your system:
RELEASE=$(lsb_release -cs)
echo "deb http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo tee /etc/apt/sources.list.d/pgdg.list
# install and launch the postgresql service:
sudo apt update
sudo apt -y install postgresql-12
sudo service postgresql start
sudo su - postgres
psql
\password
\q
# press CTRL + D
psql -U postgres -d postgres -h 127.0.0.1 -W
CREATE DATABASE thingsboard;
\q

Now we will install Thingsboard and add the database details:

Vim
1
2
3
wget https://github.com/thingsboard/thingsboard/releases/download/v3.4.1/thingsboard-3.4.1.deb
sudo dpkg -i thingsboard-3.4.1.deb
nano /etc/thingsboard/conf/thingsboard.conf

These things you need to add to the configuration file :

Vim
1
2
3
4
5
6
7
8
9
10
11
export DATABASE_ENTITIES_TYPE=sql
export DATABASE_TS_TYPE=sql
export SPRING_JPA_DATABASE_PLATFORM=org.hibernate.dialect.PostgreSQLDialect
export SPRING_DRIVER_CLASS_NAME=org.postgresql.Driver
export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/thingsboard
export SPRING_DATASOURCE_USERNAME=postgres
export SPRING_DATASOURCE_PASSWORD=PUT_YOUR_POSTGRESQL_PASSWORD_HERE
export SPRING_DATASOURCE_MAXIMUM_POOL_SIZE=5
export SQL_POSTGRES_TS_KV_PARTITIONING=MONTHS
# Update ThingsBoard memory usage restricted to 256MB
export JAVA_OPTS="$JAVA_OPTS -Xms256M -Xmx256M"

Now, run the installation script and start ThingsBoard :

Vim
1
2
3
4
sudo /usr/share/thingsboard/bin/install/install.sh --loadDemo
sudo service thingsboard start
# If you want ThingsBoard to start automatically upon a reboot, you must enable it:
sudo service thingsboard enable

Now, you will be able to open Web UI at this address:

Vim
1
http://server-IP-address:8080/

The demo script has three user accounts. sysadmin@thingsboard.org with sysadmin as the password, tenant@thingsboard.org with tenant as the password and customer@thingsboard.org with customer as the password.

Next, you can follow this official guide to get started with Thingsboard :

Vim
1
2
https://thingsboard.io/docs/getting-started-guides/helloworld/
https://thingsboard.io/docs/samples/esp32/gpio-control-pico-kit-dht22-sensor/

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to How to Setup ThingsBoard IoT on Ubuntu/Debian Server

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • How to Install ThingsBoard on Cloud Server or VPS

    ThingsBoard is an open-source IoT platform that supports MQTT, CoAP and HTTP protocols related to IoT. It is a software package that can be installed to add various prototyping boards including Raspberry Pi, Arduino, ESP32 for data collection, processing, visualization, and device management. When we install vanilla Mosquitto with Ellipse Paho, we get a basic […]

  • How To Install PostgreSQL on Ubuntu 16.04 LTS

    PostgreSQL is Time Tested and Often Compared Head to Head With MongoDB. Here is How To Install PostgreSQL on Ubuntu 16.04 LTS Server via SSH.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy