ct-Open-Source / ct-Open-Source/ct-Smart-Home

Persistence with Mosquitto

Open
#76 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
171
Forks
40
PR merge metrics
No merged PRs in 30d

Description

It seems to be quite simple to add persistence to mosquitto. Simply add
`persistence true`
`persistence_location /mosquitto/data`
to _data/mqtt/config/mosquitto.conf_.

But - that doesn't work.
The reason is, that /mosquitto/data isn't mounted to data/mqtt/data, as one could expect.
You have to add

mqtt:
volumes:
- ./data/mqtt/data:/mosquitto/data

explicitly to the docker-compose.yml. Only then the persistence is really persistent.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.