Skip to content

nfrastack/container-mosquitto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This will build a container for Mosquitto, A MQTT broker.

Maintainer

Table of Contents

Installation

Prebuilt Images

Feature limited builds of the image are available on the Github Container Registry and Docker Hub.

To unlock advanced features, one must provide a code to be able to change specific environment variables from defaults. Support the development to gain access to a code.

To get access to the image use your container orchestrator to pull from the following locations:

ghcr.io/nfrastack/container-mosquitto:(image_tag)
docker.io/nfrastack/mosquitto:(image_tag)

Image tag syntax is:

<image>:<optional tag>-<optional_distribution>_<optional_distribution_variant>

Example:

ghcr.io/nfrastack/container-mosquitto:latest or

ghcr.io/nfrastack/container-mosquitto:1.0

  • latest will be the most recent commit
  • An optional tag may exist that matches the CHANGELOG - These are the safest
  • If it is built for multiple distributions there may exist a value of alpine or debian
  • If there are multiple distribution variations it may include a version - see the registry for availability

Have a look at the container registries and see what tags are available.

Multi-Architecture Support

Images are built for amd64 by default, with optional support for arm64 and other architectures.

Configuration

Quick Start

Persistent Storage

The following directories are used for configuration and can be mapped for persistent storage.

Directory Description
/config/ (optional) Configuration files
/data/ Volatile data
/data/auth Authentication information
/data/db Persistence DB
/logs/ Logfiles for

Environment Variables

Base Images used

This image relies on a customized base image in order to work. Be sure to view the following repositories to understand all the customizable options:

Image Description
OS Base Base Image

Below is the complete list of available options that can be used to customize your installation.

  • Variables showing an 'x' under the Advanced column can only be set if the containers advanced functionality is enabled.

Core Configuration

Parameter Description Default Advanced
MOSQUITTO_SETUP_MODE Set to AUTO, MANUAL
LOG_LEVEL Log verbosity level all
LOG_TYPE Log output type (BOTH/STDOUT/FILE) BOTH
LOG_PATH Path to log files /logs/
LOG_FILE Log file name mosquitto.log
LOG_CONNECTION_MESSAGES Log connection messages (TRUE/FALSE) TRUE
LOG_ENABLE_TIMESTAMP Enable timestamps in logs (TRUE/FALSE) TRUE
LOG_TIMESTAMP_FORMAT Timestamp format for logs %Y-%m-%dT%H:%M:%S
CONFIG_PATH Path to configuration files /config/
CONFIG_FILE Mosquitto configuration file name mosquitto.conf
DATA_PATH Path to persistent data /data/
ENABLE_PERSISTENCE Enable persistence (TRUE/FALSE) FALSE
PERSISTENCE_PATH Path to persistence database ${DATA_PATH}/db/
PERSISTENCE_AUTOSAVE_INTERVAL Autosave interval in seconds 1800
PERSISTENCE_AUTOSAVE_ON_CHANGES Autosave on changes (TRUE/FALSE) FALSE
PERSISTENCE_FILE Persistence database file name mosquitto.db
LISTEN_IP IP address to listen on 0.0.0.0
LISTEN_PORT Port to listen on 1883
LISTEN_TYPE Listener type (TCP/other) TCP
MOSQUITTO_GROUP Group to run Mosquitto as mosquitto
MOSQUITTO_USER User to run Mosquitto as mosquitto
MOSQUITTO_SETUP_TYPE Setup type (AUTO/MANUAL) AUTO
SECURITY_ENABLE_ANONYMOUS Allow anonymous connections (TRUE/FALSE) FALSE
SECURITY_PASSWORD_FILE Password file name auth.db
SECURITY_PASSWORD_PATH Path to password file ${DATA_PATH}/auth/

Users and Groups

Type Name ID
User mosquitto 1883
Group www-data 1883

Networking

Port Protocol Description
188 tcp mosquitto

Maintenance

Shell Access

For debugging and maintenance, bash and sh are available in the container.

Support & Maintenance

  • For community help, tips, and community discussions, visit the Discussions board.
  • For personalized support or a support agreement, see Nfrastack Support.
  • To report bugs, submit a Bug Report. Usage questions will be closed as not-a-bug.
  • Feature requests are welcome, but not guaranteed. For prioritized development, consider a support agreement.
  • Updates are best-effort, with priority given to active production use and support agreements.

References

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Containerized Message MQTT Broker

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Sponsor this project

 

Packages

 
 
 

Contributors