This is a Docker-enhanced continuation of the original Malla project - a comprehensive web analyzer for Meshtastic networks based on MQTT data.
- β Complete database schema initialization
- β Real-time MQTT data capture and processing
- β Web interface with full functionality
- β PostgreSQL database with optimized queries
- β Network topology visualization
- β Longest links analysis
- β Node tracking and statistics
- β Packet analysis and filtering
This enhanced version provides a complete Docker-based deployment with PostgreSQL database, MQTT broker, and all necessary services orchestrated together.
- Docker and Docker Compose installed
- Git (to clone this repository)
# Clone the repository
git clone https://github.com/n30nex/malla.git
cd malla
# Start all services (PostgreSQL, MQTT, Web UI, Data Capture)
docker-compose up --buildThat's it! The system will:
- Set up a PostgreSQL database
- Start an MQTT broker
- Begin capturing Meshtastic data
- Launch the web interface
Access the web interface at: http://localhost:8080
This Docker setup includes:
- PostgreSQL Database - Stores all mesh network data
- MQTT Broker - Eclipse Mosquitto for message handling
- Data Capture Service - Captures and processes Meshtastic packets
- Web Interface - Flask-based UI for network analysis
| Service | Port | Description |
|---|---|---|
| Web UI | 8080 | Main web interface |
| PostgreSQL | 5432 | Database (internal) |
| MQTT Broker | 1883 | Message broker (internal) |
Copy the example environment file and customize:
cp env.example .envKey configuration options in .env:
# MQTT Configuration (Required)
MALLA_MQTT_BROker_ADDRESS=mqtt.mt.gt
MALLA_MQTT_USERNAME=meshdev
MALLA_MQTT_PASSWORD=large4cats
# Database Configuration
POSTGRES_PASSWORD=yourpassword
# Web Interface
MALLA_NAME=My Malla Instance
MALLA_WEB_PORT=8080You can also use config.yaml for more detailed configuration:
cp config.sample.yaml config.yaml
# Edit config.yaml with your settingsFor development without Docker:
# Install dependencies
pip install -e .
# Set up local database
export MALLA_DATABASE_HOST=localhost
export MALLA_DATABASE_PORT=5432
export MALLA_DATABASE_NAME=malla
export MALLA_DATABASE_USER=malla
export MALLA_DATABASE_PASSWORD=yourpassword
# Start services
python -m malla.mqtt_capture # Terminal 1
python -m malla.web_ui # Terminal 2The system automatically initializes the database schema on first run. For manual database operations:
# Access PostgreSQL container
docker-compose exec postgres psql -U malla -d malla
# View database schema
\dt- Real-time Network Visualization - Interactive mesh topology β WORKING
- Node Tracking - Monitor device locations and status
- Packet Analysis - Deep dive into mesh communications
- Traceroute Analysis - Network path visualization
- Performance Metrics - SNR, distance, and connectivity stats
- Longest Links Analysis β WORKING
- PostgreSQL Backend - Robust, scalable data storage
- Optimized Queries - Fast analysis of large datasets
- Data Persistence - Automatic data retention and cleanup
- Export Capabilities - Download network data
- Modern Web UI - Responsive, mobile-friendly interface
- Interactive Maps - Visualize network topology
- Real-time Updates - Live data streaming
- Advanced Filtering - Powerful search and filter options
To use your own MQTT broker instead of the included one:
# In docker-compose.yml, comment out the mqtt service
# and update environment variables:
environment:
MALLA_MQTT_BROKER_ADDRESS: your.broker.address
MALLA_MQTT_PORT: 1883
MALLA_MQTT_USERNAME: your_username
MALLA_MQTT_PASSWORD: your_passwordFor production use:
- Change default passwords in
.env - Use external database for better performance
- Configure reverse proxy (nginx/Apache)
- Set up SSL/TLS for secure connections
- Configure logging for monitoring
The system supports horizontal scaling:
- Multiple capture services for high-throughput networks
- Database clustering for large datasets
- Load balancing for web interface
- Message queue for async processing
- Tier B Pipeline - Write-optimized data processing
- Materialized Views - Pre-computed analytics
- Database Indexing - Optimized query performance
- Connection Pooling - Efficient database connections
- Caching - Reduced computation overhead
Check system health:
# View service logs
docker-compose logs -f
# Check database status
docker-compose exec postgres pg_isready -U malla
# Monitor resource usage
docker statsThis project extends the original Malla with Docker enhancements. All major issues have been resolved! The system is now fully functional.
- Database Schema Issues - Fixed PostgreSQL immutable function errors
- Table Creation - All required tables now create successfully
- Query Optimization - Improved database performance and indexing
- Service Integration - All services now work together seamlessly
- Performance Tuning - Further optimize database queries for large datasets
- UI Improvements - Enhanced user interface and visualization features
- Monitoring - Add health checks and monitoring capabilities
- Documentation - Expand user guides and API documentation
# Clone and setup
git clone https://github.com/n30nex/malla.git
cd malla
# Start development environment
docker-compose up --build
# Check service status
docker-compose ps
# View logs
docker-compose logs -f
# Access database
docker-compose exec postgres psql -U malla -d malla
# Run tests
docker-compose exec malla-web python -m pytest# Check if PostgreSQL is running
docker-compose ps postgres
# View database logs
docker-compose logs postgres
# Test database connection
docker-compose exec postgres pg_isready -U malla# Check web service status
docker-compose ps malla-web
# View web service logs
docker-compose logs malla-web
# Test web interface
curl http://localhost:8080# Check capture service
docker-compose logs malla-capture
# Verify MQTT broker connection
docker-compose logs mosquitto# Stop all services
docker-compose down
# Remove volumes (WARNING: This deletes all data)
docker-compose down -v
# Rebuild and restart
docker-compose up --buildFor better performance with large datasets:
# Increase PostgreSQL memory
# Add to docker-compose.yml under postgres service:
environment:
POSTGRES_SHARED_BUFFERS: 256MB
POSTGRES_EFFECTIVE_CACHE_SIZE: 1GB
# Monitor resource usage
docker statsThis project is licensed under the MIT License - see the LICENSE file for details.
-
Original Malla Project - zenitraM/malla
-
Meshtastic Community - For the amazing mesh networking platform
-
Contributors - All those who have helped improve this project
-
Issues - Report bugs and request features
-
Discussions - Community support and questions
-
Documentation - Check the original Malla documentation