How to install ChirpStack 4 in Ubuntu?

 


ChirpStack is an open-source LoRaWAN Network Server stack that facilitates the deployment and management of LoRaWAN networks. LoRaWAN (Long Range Wide Area Network) is a wireless communication protocol designed for low-power, long-range communication between IoT (Internet of Things) devices and gateways.

ChirpStack provides the necessary components to create and operate a LoRaWAN network, including:

1. Network Server: This component manages the communication between the IoT devices and the application servers. It handles tasks like device activation, uplink and downlink message routing, frame decryption, and more.

2. Application Server: The application server is responsible for processing data from the IoT devices, performing necessary data transformations or business logic, and providing relevant information to applications that use the data.

3. Join Server: The join server handles the activation process for new devices joining the LoRaWAN network. It manages the cryptographic keys and security parameters necessary for device authentication.

4. Gateway Bridge: This component connects the physical gateways in the field to the network server. It converts the raw gateway data into a format that can be understood by the ChirpStack components.

5. Gateway Configuration: ChirpStack provides a way to configure and manage the settings for the connected gateways, ensuring proper communication between the gateways and the network server.

ChirpStack's open-source nature allows organizations to set up and manage their own LoRaWAN networks, providing more control over their infrastructure and data. It's widely used in various IoT applications such as smart cities, industrial automation, agriculture, and more.


# Reference
# https://www.chirpstack.io/docs/getting-started/debian-ubuntu.html
# Install Mosquitto, Redis, PostgreSQL
sudo apt install mosquitto mosquitto-clients redis-server redis-tools postgresql
# Switch to the PostgreSQL command-line tool
sudo -u postgres psql
# Create a role for authentication
create role chirpstack with login password 'chirpstack';
# Create a database and set chirpstack as the owner
create database chirpstack with owner chirpstack;
# Switch to the chirpstack database
\c chirpstack
# Create the pg_trgm extension
create extension pg_trgm;
# Exit the PostgreSQL command-line tool
\q
# Install required packages for ChirpStack Gateway Bridge
sudo apt install apt-transport-https dirmngr
# Add the ChirpStack repository key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1CE2AFD36DBCCA00
# Add the ChirpStack repository to the sources list
sudo echo "deb https://artifacts.chirpstack.io/packages/4.x/deb stable main" | sudo tee /etc/apt/sources.list.d/chirpstack.list
# Update package information
sudo apt update
# Install ChirpStack Gateway Bridge
sudo apt install chirpstack-gateway-bridge
# Configure the ChirpStack Gateway Bridge by updating the MQTT integration section in the configuration file located at /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
# Example for EU868:
# [integration.mqtt]
# event_topic_template="eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}"
# command_topic_template="eu868/gateway/{{ .GatewayID }}/command/#"
# Start ChirpStack Gateway Bridge
sudo systemctl start chirpstack-gateway-bridge
# Start ChirpStack Gateway Bridge on boot
sudo systemctl enable chirpstack-gateway-bridge
# Install ChirpStack
sudo apt install chirpstack
# Configuration files for ChirpStack are located at /etc/chirpstack.
# Start ChirpStack
sudo systemctl start chirpstack
# Start ChirpStack on boot
sudo systemctl enable chirpstack
# View ChirpStack logs
sudo journalctl -f -n 100 -u chirpstack
# Access ChirpStack web interface by going to localhost:8080 in your browser
# The default login is admin as user, and the password is also admin.

 

Comments

Popular Posts