How to Install Thingsboard on Ubuntu Server Latest

Thingsboard is an open source IoT platform for data collection, processing, and visualization. In this tutorial, you will learn how to install Thingsboard on Ubuntu Server.

Prerequisites

Before starting the installation process, make sure you have the following:

Step 1: Update your system

Before installing Thingsboard, it is recommended to update your system to the latest version by running the following commands:

sudo apt update
sudo apt upgrade

Step 2: Install JDK (Java Development Kit)

Thingsboard requires JDK 8 or higher to be installed on your system. To install it, run the following command:

sudo apt install openjdk-8-jdk

Step 3: Install PostgreSQL

Thingsboard uses PostgreSQL as its database. To install PostgreSQL, run the following command:

sudo apt install postgresql postgresql-contrib

Step 4: Create a new user and database in PostgreSQL

After PostgreSQL is installed, create a new user and database for Thingsboard. Run the following commands to create a new user:

sudo su postgres
createuser thingsboard -P

Then create a new database:

createdb thingsboard -O thingsboard -E utf-8 -T template0

Step 5: Download and install Thingsboard

Download the latest version of Thingsboard from the official website: https://thingsboard.io/docs/user-guide/install/ubuntu/. Once the file is downloaded, navigate to the directory where it was downloaded and run the following command:

tar -xvf thingsboard-<version>.tgz

This will extract the Thingsboard files to a new directory called thingsboard. Rename it by running the following command:

sudo mv thingsboard-<version> thingsboard

Step 6: Configure Thingsboard

To configure Thingsboard, navigate to the thingsboard/conf directory and edit the thingsboard.yml file:

cd thingsboard/conf
sudo nano thingsboard.yml

Inside the file, you need to configure the database, mail server, and other settings. Replace the following lines with your specific configuration:

server:
  ssl:
    enabled: false
  port: 8080
database:
  type: postgresql
  host: localhost
  port: 5432
  username: <your-postgresql-username>
  password: <your-postgresql-password>
  # Name of the DataBase to connect (by default it is "thingsboard")
  # Please note that while creating DataBase from command line, name is: thingsboard (lowercase, no quotes)
  keyspace: thingsboard
mail:
  smtp:
    from: thingsboard@localhost.com    # Default 'from' email address
    protocol: smtp
    host: localhost
    port: 25
plugins:
  # The list of enabled plugins
  # It is possible to define custom configuration section for each plugin
  # Example:
  tb-transport-defaults:
    max_connections: 10000
    # ...

Step 7: Start Thingsboard

To start Thingsboard, navigate to the thingsboard/bin directory and run the following command:

sudo ./thingsboard.sh start

This will start the Thingsboard server in the background. To check the status, run the following command:

sudo ./thingsboard.sh status

If the output displays "Thingsboard service is running", then the installation was successful.

Conclusion

In this tutorial, you learned how to install Thingsboard on Ubuntu Server. You can now begin using Thingsboard for all of your IoT platform needs.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!