DirectorySecurity AdvisoriesPricing
Sign in
Directory
eclipse-mosquitto-fips logoFIPS

eclipse-mosquitto-fips

packaged by Chainguard

Last changed
Request a free trial

Contact our team to test out this image for free. Please also indicate any other images you would like to evaluate.

Tags
Overview
Comparison
Provenance
Specifications
SBOM
Vulnerabilities
Advisories

Chainguard Container for eclipse-mosquitto-fips

Eclipse Mosquitto - An open source MQTT broker, with FIPS support

Chainguard Containers are regularly-updated, secure-by-default container images.

Download this Container Image

For those with access, this container image is available on cgr.dev:

docker pull cgr.dev/ORGANIZATION/eclipse-mosquitto-fips:latest

Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard Registry.

Compatibility Notes

Chainguard's eclipse-mosquitto-fips image is comparable to the upstream eclipse-mosquitto image. To match upstream, it ships upstream's configuration at both /mosquitto/config/mosquitto.conf and /mosquitto-no-auth.conf: anonymous MQTT on port 1883, and the HTTP API with the bundled dashboard on port 9883, also anonymous. The standard Chainguard eclipse-mosquitto image ships no /mosquitto/config/mosquitto.conf, and its /mosquitto-no-auth.conf opens port 1883 only, so this variant opens port 9883 where that one does not. To run MQTT without the HTTP API, see Configuration. Upstream starts as root; this image runs as uid 1883, so PUID and PGID have no effect unless the container runs as root, and mounted volumes must be writable by uid 1883.

The broker differs from upstream where the FIPS build requires it:

  • A TLS listener that sets no ciphers follows the system FIPS policy for TLS 1.2: ECDHE with AES-GCM suites only. One that sets no ciphers_tls1.3 allows only TLS_AES_256_GCM_SHA384 and TLS_AES_128_GCM_SHA256 for TLS 1.3. A ciphers list with no FIPS-approved suite, such as ECDHE-RSA-CHACHA20-POLY1305, stops the broker with an error.
  • The HTTP API has no HTTPS. An http_api listener that sets certfile or keyfile stops the broker with an error. So does any http_api listener that fails to start; upstream keeps running without it.
  • TLS-PSK is not available. psk_file, psk_hint, bridge_identity, and bridge_psk stop the broker with an error. Use certfile and keyfile instead, or bridge_certfile and bridge_keyfile on a bridge.

Like the standard Chainguard eclipse-mosquitto image, the broker is built without memory tracking, so the dashboard shows ? for $SYS/broker/heap/current and $SYS/broker/heap/maximum, and memory_limit is accepted but not enforced.

FIPS Support

This image includes Chainguard's validated redistribution of the OpenSSL FIPS provider module. See the FIPS-enabled images guide for supported configurations and operating requirements.

Run the module's self-tests to confirm the provider loads and that only approved algorithms are available:

docker run --rm --entrypoint /usr/bin/openssl-fips-test cgr.dev/ORGANIZATION/eclipse-mosquitto-fips:latest

Getting Started

Start the broker with its default configuration:

docker run -d --name mosquitto -p 1883:1883 -p 127.0.0.1:9883:9883 cgr.dev/ORGANIZATION/eclipse-mosquitto-fips:latest

Publish a retained message and read it back with the clients included in the image:

docker exec mosquitto mosquitto_pub -h localhost -t test/topic -m "Hello, Mosquitto" -r
docker exec mosquitto mosquitto_sub -h localhost -t test/topic -C 1
Hello, Mosquitto

The dashboard is at http://localhost:9883/, and the HTTP API answers on the same port:

curl http://localhost:9883/api/v1/listeners
{
	"listeners":	[{
			"port":	1883,
			"protocol":	"mqtt",
			"tls":	false,
			"mtls":	false,
			"allow_anonymous":	true
		}, {
			"port":	9883,
			"protocol":	"httpapi",
			"tls":	false,
			"mtls":	false,
			"allow_anonymous":	true
		}]
}

Configuration

To serve MQTT without the HTTP API and dashboard, mount a configuration with no http_api listener:

cat > mosquitto.conf <<EOF
listener 1883
allow_anonymous true
EOF

docker rm -f mosquitto
docker run -d --name mosquitto-mqtt -p 1883:1883 \
  -v "$(pwd)/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro" \
  cgr.dev/ORGANIZATION/eclipse-mosquitto-fips:latest

To serve MQTT over TLS, mount a configuration with a certificate and key. This example leaves ciphers unset, so the listener follows the FIPS policy.

Create a CA and a server certificate signed by it. The broker runs as uid 1883, so server.key must be readable by that user:

openssl req -x509 -newkey rsa:3072 -nodes -days 365 -subj "/CN=mosquitto-ca" \
  -keyout ca.key -out ca.crt
openssl req -newkey rsa:3072 -nodes -subj "/CN=localhost" \
  -keyout server.key -out server.csr
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -days 365 \
  -extfile <(printf 'subjectAltName=DNS:localhost,IP:127.0.0.1') -out server.crt
chmod 0644 server.key

Start the broker with the configuration, the certificate and key, and the CA certificate for the clients:

cat > mosquitto-tls.conf <<EOF
listener 8883
allow_anonymous true
certfile /mosquitto/config/server.crt
keyfile /mosquitto/config/server.key
EOF

docker run -d --name mosquitto-tls -p 8883:8883 \
  -v "$(pwd)/mosquitto-tls.conf:/mosquitto/config/mosquitto.conf:ro" \
  -v "$(pwd)/server.crt:/mosquitto/config/server.crt:ro" \
  -v "$(pwd)/server.key:/mosquitto/config/server.key:ro" \
  -v "$(pwd)/ca.crt:/mosquitto/config/ca.crt:ro" \
  cgr.dev/ORGANIZATION/eclipse-mosquitto-fips:latest

Publish a retained message over TLS and read it back:

docker exec mosquitto-tls mosquitto_pub -h localhost -p 8883 --cafile /mosquitto/config/ca.crt -t test/tls -m "Hello, TLS" -r
docker exec mosquitto-tls mosquitto_sub -h localhost -p 8883 --cafile /mosquitto/config/ca.crt -t test/tls -C 1
Hello, TLS

The broker logs the TLS version and cipher each client negotiated:

docker logs mosquitto-tls 2>&1 | grep negotiated
1791646969: Client auto-831B48D6-C09C-C8D0-4F6B-7A22319332FD negotiated TLSv1.3 cipher TLS_AES_256_GCM_SHA384
1791646969: Client auto-A14A2720-D9C5-6F6D-0764-06DB9149481E negotiated TLSv1.3 cipher TLS_AES_256_GCM_SHA384

For all configuration options, refer to the mosquitto.conf documentation.

Documentation and Resources

What are Chainguard Containers?

Chainguard's free tier of Starter container images are built with Wolfi, our minimal Linux undistro.

All other Chainguard Containers are built with Chainguard OS, Chainguard's minimal Linux operating system designed to produce container images that meet the requirements of a more secure software supply chain.

The main features of Chainguard Containers include:

For cases where you need container images with shells and package managers to build or debug, most Chainguard Containers come paired with a development, or -dev, variant.

In all other cases, including Chainguard Containers tagged as :latest or with a specific version number, the container images include only an open-source application and its runtime dependencies. These minimal container images typically do not contain a shell or package manager.

Although the -dev container image variants have similar security features as their more minimal versions, they include additional software that is typically not necessary in production environments. We recommend using multi-stage builds to copy artifacts from the -dev variant into a more minimal production image.

Need additional packages?

To improve security, Chainguard Containers include only essential dependencies. Need more packages? Chainguard customers can use Custom Assembly to add packages, either through the Console, chainctl, or API.

To use Custom Assembly in the Chainguard Console: navigate to the image you'd like to customize in your Organization's list of images, and click on the Customize image button at the top of the page.

Learn More

Refer to our Chainguard Containers documentation on Chainguard Academy. Chainguard also offers VMs and Libraries — contact us for access.

Trademarks

This software listing is packaged by Chainguard. The trademarks set forth in this offering are owned by their respective companies, and use of them does not imply any affiliation, sponsorship, or endorsement by such companies.

Licenses

Chainguard's container images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" tag of this image:

  • Apache-2.0

  • GCC-exception-3.1

  • GPL-3.0-or-later

  • MIT

  • NIST-PD

For a complete list of licenses, please refer to this Image's SBOM.

Software license agreement

Compliance

Chainguard Containers are SLSA Level 3 compliant with detailed metadata and documentation about how it was built. We generate build provenance and a Software Bill of Materials (SBOM) for each release, with complete visibility into the software supply chain.

SLSA compliance at Chainguard

This image helps reduce time and effort in establishing PCI DSS 4.0 compliance with low-to-no CVEs.

PCI DSS at Chainguard

This is a FIPS validated image for FedRAMP compliance.

This image is STIG hardened and scanned against the DISA General Purpose Operating System SRG with reports available.

Learn more about STIGsGet started with STIGs

Related images
eclipse-mosquitto logo

eclipse-mosquitto


Category
FIPS
STIG

The trusted source for open source

Talk to an expert
PrivacyTerms

Product

Chainguard ContainersChainguard LibrariesChainguard VMsChainguard OS PackagesChainguard ActionsChainguard Agent SkillsIntegrationsPricing
© 2026 Chainguard, Inc. All Rights Reserved.
Chainguard® and the Chainguard logo are registered trademarks of Chainguard, Inc. in the United States and/or other countries.
The other respective trademarks mentioned on this page are owned by the respective companies and use of them does not imply any affiliation or endorsement.