Post

Secure Chat-app using MQTT and Docker

Chat-app that runs on Docker, with which two people can chat with MQTT

Secure Chat-app using MQTT and Docker

Overview

I’ve built a secure chat application that utilizes MQTT over WebSockets for real-time communication. The backend consists of an Apache web server serving the frontend, while Mosquitto MQTT broker handles message distribution. The main focus of this project was implementing encryption and authentication for secure communication.

Features

  • MQTT via WebSockets – Enables real-time messaging over the web.
  • Apache Web Server – Hosts the chat application’s frontend.
  • HTTPS (Self-Signed Certificates) – Encrypts communication between clients and the web server.
  • MQTT Security – Implemented either TLS encryption (if supported) or username/password authentication for broker access.

Planned Expansion(s)

  • User Management – Implement a database for persistent user accounts and authentication.
  • Message History – Store chat logs for reference.
  • UI Enhancements – Improve frontend with better design and usability.

Tech Stack

  • Mosquitto MQTT Broker for message handling
  • Apache Web Server for serving the chat interface
  • WebSockets for real-time messaging
  • TLS/SSL (Self-Signed Certificates) for encrypted communication
  • HTML, JavaScript for the frontend

Next Steps

🔧 Implement user authentication with a database
🔧 Add message history persistence

Let me know if you have any feedback or ideas! 🚀

This post is licensed under CC BY 4.0 by the author.