Apache Superset BI Platform
Modern data exploration and visualization platform with SQL IDE.
Overview
Apache Superset is a modern data exploration and visualization platform originally developed by Airbnb and later open-sourced under the Apache Software Foundation. It provides a rich web interface for creating interactive dashboards, exploring datasets through SQL Lab, and building complex visualizations without requiring extensive programming knowledge. Superset supports dozens of databases and data sources, making it a versatile business intelligence solution for organizations of all sizes.
This stack combines Superset with PostgreSQL as the metadata database, Redis for caching and session storage, and Celery workers for handling asynchronous tasks like report generation and alert processing. PostgreSQL stores Superset's configuration, user permissions, and dashboard metadata, while Redis accelerates chart rendering and manages user sessions. The Celery worker processes background jobs, preventing long-running queries or report exports from blocking the main web interface.
Data teams, analysts, and organizations seeking to democratize data access should consider this configuration. The combination provides enterprise-grade performance with Redis caching reducing dashboard load times, PostgreSQL ensuring data integrity for user management and metadata, and Celery workers enabling scalable report generation. This setup is particularly valuable for teams transitioning from expensive commercial BI tools or those needing a self-hosted alternative to cloud-based analytics platforms.
Key Features
- SQL Lab IDE with syntax highlighting, query history, and result export capabilities
- Drag-and-drop dashboard builder with 50+ visualization types including maps and time-series charts
- Native database connectivity to PostgreSQL, MySQL, SQLite, and 30+ other data sources
- Redis-powered chart caching reducing dashboard load times by up to 80%
- Celery task queue for background report generation and scheduled dashboard exports
- Row-level security and column-level permissions using PostgreSQL's robust access control
- Real-time dashboard updates with WebSocket support and automatic refresh intervals
- Jinja templating in SQL queries for dynamic filtering and parameterized reports
Common Use Cases
- 1Business intelligence dashboards for sales, marketing, and operations teams
- 2Self-service analytics platform for non-technical users to explore company data
- 3Data exploration and visualization for data science teams working with large datasets
- 4Embedded analytics in SaaS applications using Superset's REST API and iframe embedding
- 5Real-time monitoring dashboards for application metrics and KPIs
- 6Financial reporting and compliance dashboards with scheduled PDF exports
- 7Customer-facing analytics portals with white-label customization options
Prerequisites
- Docker and Docker Compose installed with at least 4GB RAM available for the stack
- Port 8088 available for Superset web interface access
- Basic SQL knowledge for creating queries and connecting to data sources
- Environment variables configured: SUPERSET_SECRET_KEY, POSTGRES credentials, ADMIN_PASSWORD
- Understanding of your target databases and their connection parameters
- Familiarity with business intelligence concepts like dimensions, measures, and filters
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 superset: 3 image: apache/superset:latest4 ports: 5 - "8088:8088"6 environment: 7 SUPERSET_SECRET_KEY: ${SUPERSET_SECRET_KEY}8 SQLALCHEMY_DATABASE_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}9 REDIS_HOST: redis10 REDIS_PORT: 637911 volumes: 12 - superset_home:/app/superset_home13 depends_on: 14 postgres: 15 condition: service_healthy16 redis: 17 condition: service_started18 networks: 19 - superset-net20 restart: unless-stopped21 command: >22 bash -c "superset db upgrade &&23 superset fab create-admin --username admin --firstname Admin --lastname User --email admin@example.com --password ${ADMIN_PASSWORD} || true &&24 superset init &&25 gunicorn --bind 0.0.0.0: 8088 --workers 4 'superset.app:create_app()'"2627 superset-worker: 28 image: apache/superset:latest29 environment: 30 SUPERSET_SECRET_KEY: ${SUPERSET_SECRET_KEY}31 SQLALCHEMY_DATABASE_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}32 REDIS_HOST: redis33 REDIS_PORT: 637934 volumes: 35 - superset_home:/app/superset_home36 depends_on: 37 - superset38 command: celery --app=superset.tasks.celery_app:app worker --pool=prefork -O fair -c 439 networks: 40 - superset-net41 restart: unless-stopped4243 postgres: 44 image: postgres:16-alpine45 environment: 46 POSTGRES_USER: ${POSTGRES_USER}47 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}48 POSTGRES_DB: ${POSTGRES_DB}49 volumes: 50 - postgres_data:/var/lib/postgresql/data51 healthcheck: 52 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]53 interval: 10s54 timeout: 5s55 retries: 556 networks: 57 - superset-net58 restart: unless-stopped5960 redis: 61 image: redis:7-alpine62 volumes: 63 - redis_data:/data64 networks: 65 - superset-net66 restart: unless-stopped6768volumes: 69 superset_home: 70 postgres_data: 71 redis_data: 7273networks: 74 superset-net: 75 driver: bridge.env Template
.env
1# Superset Configuration2SUPERSET_SECRET_KEY=$(openssl rand -base64 42)3ADMIN_PASSWORD=secure_admin_password45# PostgreSQL6POSTGRES_USER=superset7POSTGRES_PASSWORD=secure_postgres_password8POSTGRES_DB=supersetUsage Notes
- 1Superset at http://localhost:8088
- 2Login with admin account created on startup
- 3Connect to your databases via SQL Lab
- 4Create dashboards and visualizations
Individual Services(4 services)
Copy individual services to mix and match with your existing compose files.
superset
superset:
image: apache/superset:latest
ports:
- "8088:8088"
environment:
SUPERSET_SECRET_KEY: ${SUPERSET_SECRET_KEY}
SQLALCHEMY_DATABASE_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
REDIS_HOST: redis
REDIS_PORT: 6379
volumes:
- superset_home:/app/superset_home
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
networks:
- superset-net
restart: unless-stopped
command: |
bash -c "superset db upgrade &&
superset fab create-admin --username admin --firstname Admin --lastname User --email admin@example.com --password ${ADMIN_PASSWORD} || true &&
superset init &&
gunicorn --bind 0.0.0.0:8088 --workers 4 'superset.app:create_app()'"
superset-worker
superset-worker:
image: apache/superset:latest
environment:
SUPERSET_SECRET_KEY: ${SUPERSET_SECRET_KEY}
SQLALCHEMY_DATABASE_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
REDIS_HOST: redis
REDIS_PORT: 6379
volumes:
- superset_home:/app/superset_home
depends_on:
- superset
command: celery --app=superset.tasks.celery_app:app worker --pool=prefork -O fair -c 4
networks:
- superset-net
restart: unless-stopped
postgres
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}
interval: 10s
timeout: 5s
retries: 5
networks:
- superset-net
restart: unless-stopped
redis
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
networks:
- superset-net
restart: unless-stopped
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 superset:5 image: apache/superset:latest6 ports:7 - "8088:8088"8 environment:9 SUPERSET_SECRET_KEY: ${SUPERSET_SECRET_KEY}10 SQLALCHEMY_DATABASE_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}11 REDIS_HOST: redis12 REDIS_PORT: 637913 volumes:14 - superset_home:/app/superset_home15 depends_on:16 postgres:17 condition: service_healthy18 redis:19 condition: service_started20 networks:21 - superset-net22 restart: unless-stopped23 command: >24 bash -c "superset db upgrade &&25 superset fab create-admin --username admin --firstname Admin --lastname User --email admin@example.com --password ${ADMIN_PASSWORD} || true &&26 superset init &&27 gunicorn --bind 0.0.0.0:8088 --workers 4 'superset.app:create_app()'"2829 superset-worker:30 image: apache/superset:latest31 environment:32 SUPERSET_SECRET_KEY: ${SUPERSET_SECRET_KEY}33 SQLALCHEMY_DATABASE_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}34 REDIS_HOST: redis35 REDIS_PORT: 637936 volumes:37 - superset_home:/app/superset_home38 depends_on:39 - superset40 command: celery --app=superset.tasks.celery_app:app worker --pool=prefork -O fair -c 441 networks:42 - superset-net43 restart: unless-stopped4445 postgres:46 image: postgres:16-alpine47 environment:48 POSTGRES_USER: ${POSTGRES_USER}49 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}50 POSTGRES_DB: ${POSTGRES_DB}51 volumes:52 - postgres_data:/var/lib/postgresql/data53 healthcheck:54 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]55 interval: 10s56 timeout: 5s57 retries: 558 networks:59 - superset-net60 restart: unless-stopped6162 redis:63 image: redis:7-alpine64 volumes:65 - redis_data:/data66 networks:67 - superset-net68 restart: unless-stopped6970volumes:71 superset_home:72 postgres_data:73 redis_data:7475networks:76 superset-net:77 driver: bridge78EOF7980# 2. Create the .env file81cat > .env << 'EOF'82# Superset Configuration83SUPERSET_SECRET_KEY=$(openssl rand -base64 42)84ADMIN_PASSWORD=secure_admin_password8586# PostgreSQL87POSTGRES_USER=superset88POSTGRES_PASSWORD=secure_postgres_password89POSTGRES_DB=superset90EOF9192# 3. Start the services93docker compose up -d9495# 4. View logs96docker 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/apache-superset/run | bashTroubleshooting
- Superset fails to start with 'cannot connect to database': Verify PostgreSQL container is healthy and SQLALCHEMY_DATABASE_URI environment variable is correct
- Dashboard charts load slowly or timeout: Check Redis container status and increase Celery worker count by modifying the '-c 4' parameter
- Permission denied when creating datasets: Ensure admin user was created successfully and check superset-worker container logs for Celery task failures
- 'Secret key not found' error: Generate a strong SUPERSET_SECRET_KEY using 'openssl rand -base64 42' and add to environment variables
- Database connection test fails in SQL Lab: Verify database driver compatibility and check if target database allows connections from Docker network IP range
- Charts show 'No data' despite successful queries: Clear Redis cache by restarting redis container and check for timezone mismatches in date fields
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
Components
supersetpostgresqlrediscelery
Tags
#superset#bi#visualization#data-exploration#dashboards
Category
Monitoring & ObservabilityAd Space
Shortcuts: C CopyF FavoriteD Download