ChirpStack uses several external components for storage of data and receiving gateway events and sending gateway commands.
By default, ChirpStack uses MQTT for subscribing to gateway events and sending commands to the gateway. Mosquitto is a popular open-source MQTT broker. Any other MQTT broker can be used, as long as it implements the MQTT 3.1.1 specification.
To install Mosquitto:
sudo apt install mosquitto
Please refer to the Mosquitto download page for information about how to setup Mosquitto for your platform.
ChirpStack uses PostgreSQL as persistent data-storage. PostgreSQL 9.5+ is required.
To install the PostgreSQL:
sudo apt install postgresql
Please refer to the PostgreSQL download page for information how to setup PostgreSQL on your platform.
Once PostgreSQL has been installed, you can use the following command to
chirpstack role with
chirpstack as password and a
database. Note: the
pg_trgm extension must be installed (see example
From the CLI:
sudo -u postgres psql
Within the SQL console:
-- create role for authentication create role chirpstack with login password 'chirpstack'; -- create database create database chirpstack with owner chirpstack; -- change to chirpstack database \c chirpstack -- create pg_trgm extension create extension pg_trgm; -- exit psql \q
ChirpStack stores device-sessions, metrics and cache into a Redis database. Note that at least Redis 5.0.0 is required.
To Install Redis:
sudo apt install redis-server
Please refer to the Redis documentation for information about how to setup Redis for your platform.