Chirpstack Redis Persistance

Hello all,
today i realized, that all of my devices where not sending anymore.
In Chirpstack Application Server i saw, that all session keys have been gone.
Is it possible, that the redis database is not persistant by default.

Do you have any best practice on how to configre it.
In the docs it just says, if you flush the redis database all devices have to rejoin.
I did not flush the database, but it is possible, that the server restarted by itself.

Thank you for your help

Default is kind of a misnomer here. Redis default? Chirpstack package default? chirpstack-docker default?

Either way, yes, you will want to configure Redis for persistence in almost all cases. There are a few options:

My starting point for a simple Compose configuration is:

    image: redis:7-alpine
    command: redis-server --save 300 1 --save 60 100 --appendonly no
      - ./volume/redis:/data

Hi bconway,
sorry you are right, my question was not clear.
I have installed Chirpstack on a Ubuntu system following this guide:

I installed redis via apt:

sudo apt install redis-server

From your answer i figure , that i have to edit the redis.conf and add the following?

save 300 1 
save 60 100 
appendonly no

I was wondering, why this is not mentioned in the tutorial i followed.
If persistance is not enabled by default, users will face a problem after a server reboot.

Thank you for your support

I have installed redis multiple times under Ubuntu (18.04, 20.04) and never had a problem with Chirpstack (v3 or v4), there was always some save values enabled by default.

Didn’t try 22.04 yet, could it be your case?

i am using Chirpstack v3 with ubuntu 18.04.
So in your case @martin you did not change anything to the config parameters and still the sessions where persistant after reboot?

Even our production server runs 18.04 for few years now and I’m pretty sure there was no such problem with default config.

It worth noting that from NS v3.14.0 / AS v3.16.0 Redis v5+ is required for frame logging functionality, but Redis v5 is not available in default Ubuntu 18.04 repos. You may need to install it from different source where defaults may be different and problems may arise.

1 Like