Back to templates
EMQX icon

Deploy EMQX on Sealos

A scalable, open-source MQTT broker for IoT, industrial IoT, and connected vehicle messaging.

Tools
Deploy EMQX in a few clicks from the Sealos App Store.Run a self-hosted open-source service on Kubernetes-backed infrastructure.Get automatic HTTPS, routing, and resource management from Sealos.Avoid manual YAML while keeping control of the deployed workload.

Why deploy on Sealos

Sealos makes deploying any app effortless, secure, and production-ready. From one-click launch to ongoing operations, we handle the heavy lifting so you can focus on what matters.

One-Click Deploy
Sealos logo
Compute
Networking
Storage
Security
Observability
Your Application is Live

One-Click Deployment

Deploy any app template in seconds. No compose setup, manual configure, and go live.

Managed Kubernetes Reliability

Built on Sealos Managed Kubernetes for high availability, auto-scaling, and self-healing by default.

Automatic HTTPS & Security

Every deployment includes a secure domain with automatic SSL. We handle certificates and text protection for you.

Persistent Storage

Attach persistent volumes with ease. Your data stays safe, durable, and always accessible.

Scale when needed

Adjust resources as your app grows, no downtime required.

You Get the Whole Stack

Sealos provisions and connects every resource your application needs. Everything is ready to use.

One-click, fully provisionedSecure by defaultProduction ready

App Service

Your application is running and ready to serve requests.

Public HTTPS URL

Secure, global endpoint to access your application.

Database

Managed database instance for your application.

Persistent Volume

Durable storage for uploads and application data.

Environment Variables

Configuration and secrets injected securely into your app.

Logs & Metrics

Centralized logs and basic metrics are enabled.

README

README.md

Deploy and Host EMQX on Sealos

EMQX is an open-source MQTT broker for IoT, industrial IoT, and connected vehicle messaging. This template deploys EMQX as a clustered StatefulSet on Sealos Cloud with persistent data and log storage.

EMQX Screenshot

About Hosting EMQX

EMQX provides MQTT, MQTT over TLS, WebSocket, and dashboard access for device messaging workloads. The Sealos template runs EMQX with DNS-based cluster discovery so multiple replicas can form a broker cluster automatically.

The deployment persists /opt/emqx/data and /opt/emqx/log for each pod, exposes the Dashboard through HTTPS, and can optionally expose MQTT TCP and TLS listeners through a NodePort service.

Common Use Cases

  • IoT Device Messaging: Connect sensors, gateways, and applications with MQTT topics.
  • Industrial IoT Telemetry: Ingest machine and equipment telemetry from factories or edge sites.
  • Connected Vehicle Messaging: Route vehicle status, command, and telemetry messages.
  • MQTT WebSocket Access: Let browser clients connect through the /mqtt WebSocket path.
  • Broker Evaluation: Quickly test EMQX clustering and dashboard features on Kubernetes.

Dependencies for EMQX Hosting

The Sealos template includes the EMQX broker container, Kubernetes StatefulSet orchestration, persistent volumes, internal services, public HTTPS ingress, and a Sealos App dashboard entry.

Deployment Dependencies

Implementation Details

Architecture Components:

This template deploys the following resources:

  • EMQX StatefulSet: Runs one, three, or five EMQX broker replicas.
  • Headless Service: Provides DNS records for EMQX cluster discovery.
  • ClusterIP Service: Exposes the Dashboard and MQTT WebSocket listener inside the cluster.
  • Ingress: Publishes the Dashboard and /mqtt WebSocket endpoint with HTTPS.
  • Optional NodePort Service: Exposes MQTT TCP (1883) and MQTT TLS (8883) when enabled.
  • Persistent Volumes: Stores EMQX data and logs for each broker pod.

Configuration:

  • Dashboard username is admin.
  • ADMIN_PASSWORD sets the initial Dashboard admin password and should be changed after first login.
  • REPLICA_COUNT controls the number of broker replicas.
  • TCP_ENABLE controls whether external MQTT TCP and TLS ports are exposed.
  • EMQX clustering uses DNS discovery through the template-managed headless service.

License Information:

EMQX is licensed under Apache License 2.0. This Sealos template is provided as part of the Sealos template repository.

Why Deploy EMQX on Sealos?

Sealos is an AI-assisted Cloud Operating System built on Kubernetes that unifies application deployment, operations, and scaling. By deploying EMQX on Sealos, you get:

  • One-Click Deployment: Deploy EMQX without manually writing Kubernetes manifests.
  • Built-in Persistent Storage: Keep broker data and logs across pod restarts.
  • Automatic HTTPS Access: Use a generated public URL with TLS for the Dashboard and WebSocket endpoint.
  • Cluster-Ready Defaults: Start with DNS-based EMQX cluster discovery and configurable replica count.
  • Canvas Operations: Adjust resources and settings later through the Sealos Canvas, AI dialog, or resource cards.

Deploy EMQX on Sealos when you want an MQTT broker that can be launched quickly while still using Kubernetes-native primitives.

Deployment Guide

  1. Open the EMQX template and click Deploy Now.
  2. Configure the deployment parameters:
    • REPLICA_COUNT: Choose 1, 3, or 5 broker replicas.
    • ADMIN_PASSWORD: Set the initial Dashboard admin password.
    • TCP_ENABLE: Enable only if you need external MQTT TCP/TLS access.
  3. Wait for deployment to complete, typically 2-3 minutes. After deployment, you will be redirected to the Canvas. For later changes, describe your requirements in the dialog to let AI apply updates, or click the relevant resource cards to modify settings.
  4. Access EMQX through the generated URLs:
    • Dashboard: Open the application URL and log in with username admin and your configured password.
    • MQTT WebSocket: Use wss://[your-app-url]/mqtt for browser MQTT clients.
    • MQTT TCP/TLS: If TCP_ENABLE is enabled, use the NodePort service information shown in Sealos.

Configuration

After deployment, you can configure EMQX through:

  • EMQX Dashboard: Manage listeners, authentication, authorization, clients, rules, and cluster settings.
  • Sealos AI Dialog: Describe resource or template changes and let AI apply them.
  • Resource Cards: Click the StatefulSet, Service, or Ingress cards in Canvas to adjust resources and networking.

Scaling

To scale EMQX after deployment:

  1. Open the Canvas for your deployment.
  2. Click the EMQX StatefulSet resource card.
  3. Adjust the replica count and resource limits.
  4. Apply the changes and wait for the EMQX cluster to rebalance.

For production workloads, use an odd replica count such as 3 or 5 and validate client reconnect behavior during rolling updates.

Troubleshooting

Dashboard login fails

  • Cause: The initial password may have already been changed after first startup.
  • Solution: Use the current Dashboard password. If you need to reset it, follow the EMQX documentation for changing Dashboard users from the CLI or Dashboard.

MQTT TCP clients cannot connect

  • Cause: TCP_ENABLE may be disabled, or the client is using the wrong NodePort endpoint.
  • Solution: Enable TCP_ENABLE during deployment or expose the listener later through Sealos networking settings.

Cluster replicas do not become ready

  • Cause: EMQX needs stable DNS names and enough resources to finish cluster startup.
  • Solution: Check pod logs in Canvas, confirm all replicas can resolve the headless service, and increase CPU or memory if startup probes keep failing.

Getting Help

Additional Resources

License

This Sealos template is provided under the repository license. EMQX itself is licensed under Apache License 2.0.

Related templates

Explore more production-ready templates.

More

Ready to Stop Configuring and
Start Creating?

Get started for free. No credit card required.

Play