How to Install Thingsboard on Fedora Server

Thingsboard is an open-source IoT platform that enables device management, data collection, and processing, and visualization of data using widgets and dashboards.

In this tutorial, we will guide you through the process of installing Thingsboard on Fedora Server.

Prerequisites

Before installing Thingsboard, ensure that you have:

Step 1: Update your Fedora Server

It's essential to have an updated system before installing any software on your server. To update your Fedora Server, run the following commands:

sudo dnf update

Step 2: Install the PostgreSQL database

Thingsboard uses PostgreSQL as a database to store and manage data. To install PostgreSQL, run the following command:

sudo dnf install postgresql postgresql-server postgresql-contrib

Once installed, initialize the PostgreSQL database by running:

sudo postgresql-setup --initdb --unit postgresql

Start and enable PostgreSQL to automatically start on boot, as shown below:

sudo systemctl start postgresql
sudo systemctl enable postgresql

Step 3: Install Thingsboard

To install Thingsboard, follow the steps below:

Step 3.1: Download Thingsboard

Download the latest version of Thingsboard from the official website by running:

wget https://github.com/thingsboard/thingsboard/releases/download/v3.3.1/thingsboard-3.3.1.rpm

Step 3.2: Install Thingsboard

Install the Thingsboard package by running the following command:

sudo dnf localinstall thingsboard-3.3.1.rpm

Alternatively, you can install Thingsboard from the official RPM repository by running:

sudo dnf install thingsboard

Step 3.3: Start Thingsboard

Once installation is complete, start the Thingsboard service and enable it to start automatically on boot:

sudo systemctl start thingsboard
sudo systemctl enable thingsboard

Step 4: Configure Thingsboard

After starting the Thingsboard service, you need to configure it to use PostgreSQL as a database. To do this, perform the following steps:

Step 4.1: Create a Thingsboard database in PostgreSQL

Log in to the PostgreSQL shell by running:

sudo -u postgres psql

Create a Thingsboard database by running:

CREATE DATABASE thingsboard;

Create a Thingsboard database user and grant all privileges on the Thingsboard database by running:

CREATE USER thingsboard WITH PASSWORD 'PASSWORD';
GRANT ALL PRIVILEGES ON DATABASE thingsboard TO thingsboard;

Step 4.2: Configure Thingsboard to use PostgreSQL

Edit the Thingsboard configuration file /etc/thingsboard/conf/thingsboard.yml by uncommenting the following line:

spring:
  datasource:
    url: jdbc:postgresql://localhost:5432/thingsboard
    username: thingsboard
    password: PASSWORD
    driver-class-name: org.postgresql.Driver

Replace the PASSWORD with the password you used when creating the Thingsboard database user.

Save the changes and exit the editor.

Step 4.3: Restart Thingsboard

Restart the Thingsboard service to apply the changes you made to the configuration file:

sudo systemctl restart thingsboard

Step 5: Access Thingsboard

Once Thingsboard is up and running, you can access the web interface by navigating to http://SERVER_IP:8080 in your web browser.

You will be prompted to log in to the Thingsboard dashboard using your username and password. The default username and password are:

Conclusion

You have successfully installed Thingsboard on your Fedora Server instance. You can now use Thingsboard to manage your IoT devices and visualize data using the dashboard.

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!