Huginn
Build agents that monitor and act on your behalf.
Overview
Huginn is an open-source automation platform that enables users to build intelligent agents that monitor websites, APIs, and data sources, then perform actions based on specific triggers and conditions. Originally created as a self-hosted alternative to commercial services like IFTTT and Zapier, Huginn provides granular control over data flows and automation workflows without relying on third-party services or API limitations. The platform operates on an agent-based architecture where each agent performs a specific function, from web scraping and RSS monitoring to sending notifications and processing data transformations.
This Huginn deployment pairs with MySQL 8.0 to provide a robust, scalable foundation for complex automation workflows. MySQL serves as the persistent storage layer for agent configurations, event histories, and workflow states, while Huginn's web interface runs on port 3000 for agent management and monitoring. The combination allows for sophisticated multi-step automation scenarios where agents can pass data between each other, creating powerful workflow chains that can handle everything from simple RSS-to-email notifications to complex data processing pipelines involving multiple APIs and services.
This stack is ideal for power users, system administrators, and organizations seeking complete control over their automation workflows without vendor lock-in or API rate limits. Unlike cloud-based automation services, this self-hosted approach provides unlimited agent creation, custom scheduling, and the ability to process sensitive data entirely within your own infrastructure, making it particularly valuable for privacy-conscious users and enterprise environments with strict data governance requirements.
Key Features
- Agent-based automation architecture with 50+ built-in agent types including RSS, web scraping, email, webhooks, and API integrations
- Visual scenario builder for creating complex multi-step workflows that chain agents together with conditional logic
- Real-time event streaming and processing with configurable scheduling from minutes to months
- Custom JavaScript execution environment for data transformation and advanced logic operations
- Web-based management interface with agent monitoring, event logging, and debugging tools
- MySQL-powered event history and agent state persistence with configurable retention policies
- Built-in credential management system for securely storing API keys and authentication tokens
- Liquid templating engine for dynamic content generation and data formatting across agents
Common Use Cases
- 1Home automation monitoring by tracking IoT device APIs and triggering notifications or actions based on sensor readings
- 2Competitive intelligence gathering through automated web scraping of competitor websites and price monitoring
- 3Social media content aggregation and cross-posting by monitoring multiple platforms and reposting relevant content
- 4IT infrastructure monitoring with custom agents that check service availability and send alerts via multiple channels
- 5E-commerce inventory management by monitoring supplier APIs and automatically updating product availability
- 6Research and journalism workflows that track news sources, filter content, and compile reports automatically
- 7Personal productivity automation including email filtering, calendar management, and task creation from various triggers
Prerequisites
- Docker and Docker Compose installed with at least 2GB available RAM for MySQL and Huginn containers
- Port 3000 available for Huginn web interface access and basic understanding of web-based administration
- Environment variables configured for database credentials including DB_NAME, DB_USER, DB_PASSWORD, and DB_ROOT_PASSWORD
- Basic knowledge of agent concepts, webhooks, and API interactions for effective automation workflow creation
- Understanding of Liquid templating syntax for advanced data transformation between agents
- Familiarity with cron-like scheduling expressions for configuring agent execution intervals
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 huginn: 3 image: huginn/huginn:latest4 container_name: huginn5 restart: unless-stopped6 environment: 7 MYSQL_PORT_3306_TCP_ADDR: mysql8 HUGINN_DATABASE_NAME: ${DB_NAME}9 HUGINN_DATABASE_USERNAME: ${DB_USER}10 HUGINN_DATABASE_PASSWORD: ${DB_PASSWORD}11 ports: 12 - "3000:3000"13 depends_on: 14 - mysql15 networks: 16 - huginn1718 mysql: 19 image: mysql:8.020 container_name: huginn-mysql21 environment: 22 MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}23 MYSQL_DATABASE: ${DB_NAME}24 MYSQL_USER: ${DB_USER}25 MYSQL_PASSWORD: ${DB_PASSWORD}26 volumes: 27 - mysql_data:/var/lib/mysql28 networks: 29 - huginn3031volumes: 32 mysql_data: 3334networks: 35 huginn: 36 driver: bridge.env Template
.env
1DB_ROOT_PASSWORD=rootpassword2DB_NAME=huginn3DB_USER=huginn4DB_PASSWORD=changemeUsage Notes
- 1Docs: https://github.com/huginn/huginn/wiki
- 2Web UI at http://localhost:3000, default: admin / password
- 3Create agents that watch for events and trigger actions
- 4Agent types: RSS, web scraping, email, webhooks, Twitter, etc.
- 5Scenarios chain agents together for complex workflows
- 6Self-hosted IFTTT/Zapier alternative with full control
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
huginn
huginn:
image: huginn/huginn:latest
container_name: huginn
restart: unless-stopped
environment:
MYSQL_PORT_3306_TCP_ADDR: mysql
HUGINN_DATABASE_NAME: ${DB_NAME}
HUGINN_DATABASE_USERNAME: ${DB_USER}
HUGINN_DATABASE_PASSWORD: ${DB_PASSWORD}
ports:
- "3000:3000"
depends_on:
- mysql
networks:
- huginn
mysql
mysql:
image: mysql:8.0
container_name: huginn-mysql
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
networks:
- huginn
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 huginn:5 image: huginn/huginn:latest6 container_name: huginn7 restart: unless-stopped8 environment:9 MYSQL_PORT_3306_TCP_ADDR: mysql10 HUGINN_DATABASE_NAME: ${DB_NAME}11 HUGINN_DATABASE_USERNAME: ${DB_USER}12 HUGINN_DATABASE_PASSWORD: ${DB_PASSWORD}13 ports:14 - "3000:3000"15 depends_on:16 - mysql17 networks:18 - huginn1920 mysql:21 image: mysql:8.022 container_name: huginn-mysql23 environment:24 MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}25 MYSQL_DATABASE: ${DB_NAME}26 MYSQL_USER: ${DB_USER}27 MYSQL_PASSWORD: ${DB_PASSWORD}28 volumes:29 - mysql_data:/var/lib/mysql30 networks:31 - huginn3233volumes:34 mysql_data:3536networks:37 huginn:38 driver: bridge39EOF4041# 2. Create the .env file42cat > .env << 'EOF'43DB_ROOT_PASSWORD=rootpassword44DB_NAME=huginn45DB_USER=huginn46DB_PASSWORD=changeme47EOF4849# 3. Start the services50docker compose up -d5152# 4. View logs53docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/huginn/run | bashTroubleshooting
- Database connection failed error: Ensure MySQL container is fully initialized before Huginn starts by checking mysql logs and verifying database credentials match environment variables
- Agent execution timeout or memory errors: Increase Docker container memory limits and adjust Huginn's DELAYED_JOB_MAX_RUNTIME environment variable for long-running agents
- Web scraping agents returning empty results: Check if target websites require user agents or headers, and configure agent options with appropriate browser simulation settings
- Webhook agents not receiving data: Verify firewall rules allow incoming connections on port 3000 and check agent URLs are correctly formatted with proper authentication
- High CPU usage during agent execution: Review agent scheduling intervals and consider spreading execution times to avoid concurrent resource-intensive operations
- MySQL storage growing too large: Configure event retention policies through Huginn admin interface and set up automated cleanup for old event data
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download