Quickstart Debian / Ubuntu

https://www.chirpstack.io/docs/getting-started/debian-ubuntu.html#quickstart-debian--ubuntu

Оригинал инструкция обновлен на офсайте. Новый Репозиторий!!! https://www.chirpstack.io/docs/getting-started/debian-ubuntu.html#setup-software-repository
Обновление на версию 4.14.х

This tutorial describes the steps needed to setup ChirpStack on a single machine. Recommended distributions are:

Ubuntu 24.04 LTS
Debian 11 (bullseye)

Note before you start

The purpose of this tutorial is to help you getting started. Topics like HA setup, database backups, setting up firewall rules are beyond the scope of this tutorial.

Install requirements

The following command installs the ChirpStack requirements using the apt package manager:

sudo apt install \ mosquitto \ mosquitto-clients \ redis-server \ redis-tools \ postgresql

Для корректной работы с Matrix AMM и MTX LoRa необходима версия Redis не ниже 6.2. Redis version>6.2 ставится из пакетов, начиная с Ubuntu 24.04

redis-cli --version

PostgreSQL setup

To enter the command line utility for PostgreSQL:

sudo -u postgres psql

Inside this prompt, execute the following queries to setup the ChirpStack database. It is recommended to change the usernames and passwords.

-- 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

Setup software repository

ChirpStack provides a Debian / Ubuntu repository which can be used to install the latest ChirpStack version. First make sure that gpg is installed:

sudo apt install gpg

Set up the key for the ChirpStack repository:

sudo mkdir -p /etc/apt/keyrings/ sudo sh -c 'wget -q -O - https://artifacts.chirpstack.io/packages/chirpstack.key | gpg --dearmor > /etc/apt/keyrings/chirpstack.gpg'

Add the repository to the repository list:

echo "deb [signed-by=/etc/apt/keyrings/chirpstack.gpg] https://artifacts.chirpstack.io/packages/4.x/deb stable main" | sudo tee /etc/apt/sources.list.d/chirpstack.list

Update the apt package cache:

sudo apt update

ChirpStack provides a Debian/Ubuntu repository which can be used to install the latest ChirpStack version. First make sure that both dirmngr and apt-transport-https are installed: sudo apt install apt-transport-https dirmngr Set up the key for the ChirpStack repository: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1CE2AFD36DBCCA00 ### If you get an error, try the following: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 1CE2AFD36DBCCA00 Add the repository to the repository list: sudo echo "deb https://artifacts.chirpstack.io/packages/4.x/deb stable main" | sudo tee /etc/apt/sources.list.d/chirpstack.list Update the apt package cache: sudo apt update

Install ChirpStack Gateway Bridge

Note: If you intend to install the ChirpStack Gateway Bridge only on gateway(s) themselves, you can skip this step.

Install the package using apt:

sudo apt install chirpstack-gateway-bridge

Configuration

The configuration file is located at /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml. Please update the [integration.mqtt] section to match the region prefix for the region that applies to this ChirpStack Gateway Bridge instance.

Example for EU868:

[integration.mqtt] event_topic_template="eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}" command_topic_template="eu868/gateway/{{ .GatewayID }}/command/#"

You can find the region configurations that are included by default here: https://github.com/chirpstack/chirpstack/tree/master/chirpstack/configuration.

Starting

Start the ChirpStack Gateway Bridge service:

# start chirpstack-gateway-bridge sudo systemctl start chirpstack-gateway-bridge # start chirpstack-gateway-bridge on boot sudo systemctl enable chirpstack-gateway-bridge

Install ChirpStack

Install the package using apt:

sudo apt install chirpstack

Configuration

The configuration files are located at /etc/chirpstack. You will find one global configuration file called chirpstack.toml and various region configuration files.

Starting

Start the ChirpStack service:

# start chirpstack sudo systemctl start chirpstack # start chirpstack on boot sudo systemctl enable chirpstack

Print the ChirpStack log-output:

sudo journalctl -f -n 100 -u chirpstack

Chirpstack-rest-api

https://github.com/chirpstack/chirpstack-rest-api

Add ChirpStack repository

Add the ChirpStack repository as described in the Documentation.

Install package

After you have added the ChirpStack repository, you can install this component using the following command:

sudo apt install chirpstack-rest-api

Configuration

Environment variables can be used to configure the ChirpStack REST API proxy. You will find this configuration in /etc/chirpstack-rest-api/ environment.

Starting

# start chirpstack sudo systemctl start chirpstack-rest-api # start chirpstack on boot sudo systemctl enable chirpstack-rest-api

(Re)start and stop

sudo systemctl [restart|start|stop] chirpstack-rest-api

Обновление на версию 4.14.х

sudo apt install gpg && sudo mkdir -p /etc/apt/keyrings && sudo sh -c 'wget -q -O - https://artifacts.chirpstack.io/packages/chirpstack.key | gpg --dearmor > /etc/apt/keyrings/chirpstack.gpg' && echo "deb [signed-by=/etc/apt/keyrings/chirpstack.gpg] https://artifacts.chirpstack.io/packages/4.x/deb stable main" | sudo tee /etc/apt/sources.list.d/chirpstack.list && sudo apt update && sudo apt upgrade -y

Возможно понадобится перезагрузка (лучше перезагрузить)