Skip to content

Persistence with Mosquitto #76

Description

@Narsskrarc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions