> ## Documentation Index
> Fetch the complete documentation index at: https://docs.levelrail.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-host Eclipse Mosquitto with Docker

> A lightweight MQTT broker for connecting IoT devices, sensors, and home automation hubs.

A lightweight MQTT broker for connecting IoT devices, sensors, and home automation hubs.

This page describes the Levelrail template for Eclipse Mosquitto (IoT). It deploys the services below as one Docker Compose app on your own server. Project site: [https://mosquitto.org/documentation/](https://mosquitto.org/documentation/).

Recommended memory: about 128 MiB.

## Services, ports and volumes

| Service | Image | Container ports | Volumes |
| - | - | - | - |
| `mosquitto` | `eclipse-mosquitto:2.0.20` | 1883 | `mosquitto_data -&#62; /mosquitto/data` |

## Environment variables

This template sets no environment variables.

Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.

## Deploy Eclipse Mosquitto with Levelrail

In the dashboard, open **Apps**, choose **New app**, then **Browse templates**, and select Eclipse Mosquitto. Review the Compose body and deploy.

With the CLI:

```bash theme={"dark"}
levelrail-cli templates deploy mosquitto --name my-mosquitto
```

See the [service template catalog](/templates-and-registry) for how templates work, and [Getting started](/getting-started) if you have not installed Levelrail yet.

## More IoT templates

* [Home Assistant](/self-host/home-assistant)
* [Traccar](/self-host/traccar)

All templates are listed in the [self-host gallery](/self-host).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.