Setup ChirpStack using Docker Compose
Go to file
Orne Brocaar c34c100701 Update Makefile after migration to Alpine.
The ChirpStack image base has recently changed from Debian to Alpine,
causing the Makefile import-lorawan-devices task to fail.

Fixes #85.
2023-07-03 15:50:52 +01:00
.github Create FUNDING.yml 2023-01-24 15:15:57 +00:00
configuration Update ChirpStack configuration. 2022-09-01 14:32:54 +01:00
.gitattributes Add .gitattributes to use LF line-endings for *.sh files (#11) 2019-02-19 18:15:22 +01:00
.gitignore Update to ChirpStack v4 (test version). 2022-08-02 20:34:34 +01:00
docker-compose.yml Set tags to :4 to always pull latest v4. 2023-01-26 09:51:21 +00:00
LICENSE Add LICENSE file. 2019-07-15 09:52:26 +02:00
Makefile Update Makefile after migration to Alpine. 2023-07-03 15:50:52 +01:00
README.md Use latest lorawan-devices revision with LICENSE. 2022-12-01 10:26:15 +00:00

ChirpStack Docker example

This repository contains a skeleton to setup the ChirpStack open-source LoRaWAN Network Server (v4) using Docker Compose.

Note: Please use this docker-compose.yml file as a starting point for testing but keep in mind that for production usage it might need modifications.

Directory layout

  • docker-compose.yml: the docker-compose file containing the services
  • configuration/chirpstack: directory containing the ChirpStack configuration files
  • configuration/chirpstack-gateway-bridge: directory containing the ChirpStack Gateway Bridge configuration
  • configuration/mosquitto: directory containing the Mosquitto (MQTT broker) configuration
  • configuration/postgresql/initdb/: directory containing PostgreSQL initialization scripts

Configuration

This setup is pre-configured for all regions. You can either connect a ChirpStack Gateway Bridge instance (v3.14.0+) to the MQTT broker (port 1883) or connect a Semtech UDP Packet Forwarder. Please note that:

  • You must prefix the MQTT topic with the region Please see the region configuration files in the configuration/chirpstack for a list of topic prefixes (e.g. eu868, us915_0, au915, as923_2, ...).
  • The protobuf marshaler is configured.

This setup also comes with a ChirpStack Gateway Bridge instance which is configured to the eu868 topic prefix. You can connect your UDP packet-forwarder based gateway to port 1700.

Data persistence

PostgreSQL and Redis data is persisted in Docker volumes, see the docker-compose.yml volumes definition.

Requirements

Before using this docker-compose.yml file, make sure you have Docker installed.

Importing device repository

To import the lorawan-devices repository (optional step), run the following command:

make import-lorawan-devices

This will clone the lorawan-devices repository and execute the import command of ChirpStack. Please note that for this step you need to have the make command installed.

Note: an older snapshot of the lorawan-devices repository is cloned as the latest revision no longer contains a LICENSE file.

Usage

To start the ChirpStack simply run:

$ docker-compose up

After all the components have been initialized and started, you should be able to open http://localhost:8080/ in your browser.

The example includes the ChirpStack REST API. You should be able to access the UI by opening http://localhost:8090 in your browser.

Note: It is recommended to use the gRPC interface over the REST interface.