Docker provides the most consistent and portable way to deploy Flowise. This guide covers simple container deployment, Docker Compose setup, and advanced queue mode configuration.
Quick Start with Docker
Using Pre-built Image
The fastest way to run Flowise in Docker:
Pull the latest image
docker pull flowiseai/flowise:latest
Run the container
docker run -d \
--name flowise \
-p 3000:3000 \
-v ~/.flowise:/root/.flowise \
flowiseai/flowise:latest
Managing the Container
Stop Container
Start Container
View Logs
Remove Container
Building from Source
Build Your Own Image
Build Flowise from the monorepo source:
Clone the repository
git clone https://github.com/FlowiseAI/Flowise.git
cd Flowise
Build the image
docker build --no-cache -t flowise .
This uses the Dockerfile at the project root which:
Installs system dependencies (Chromium, Cairo, Pango)
Sets up Node.js 20 Alpine environment
Installs pnpm and builds the monorepo
Configures Puppeteer for Chromium
Run your custom image
docker run -d -p 3000:3000 flowise
The build process requires 8GB+ of RAM. The NODE_OPTIONS=--max-old-space-size=8192 is set in the Dockerfile.
Docker Compose Deployment
Standard Setup
Docker Compose provides the recommended way to deploy Flowise with data persistence:
Navigate to docker folder
Create environment file
Edit .env and configure your settings: PORT = 3000
DATABASE_PATH = /root/.flowise
LOG_PATH = /root/.flowise/logs
SECRETKEY_PATH = /root/.flowise
BLOB_STORAGE_PATH = /root/.flowise/storage
Verify deployment
Check health status: docker compose logs flowise
Stop and Manage Services
Stop Services
Start Services
View Logs
Restart Services
Remove Everything
Remove with Volumes
Queue Mode (Advanced)
Queue mode enables distributed processing for high-traffic production environments using Redis for job coordination.
Architecture
Main Instance : Handles HTTP requests, UI, and API
Worker Instance(s) : Process chatflow executions asynchronously
Redis : Message queue for job distribution
Shared Storage : Database and files accessible to all instances
Using Pre-built Images
Start queue mode with pre-built images
docker compose -f docker-compose-queue-prebuilt.yml up -d
This starts:
Redis container (port 6379)
Flowise main instance (port 3000)
Flowise worker instance (port 5566)
Monitor health
docker compose -f docker-compose-queue-prebuilt.yml ps
All containers should show “healthy” status:
flowise-redis
flowise-main
flowise-worker
Building from Source
For custom builds in queue mode:
docker compose -f docker-compose-queue-source.yml up -d
Monitor the build and deployment:
docker compose -f docker-compose-queue-source.yml logs -f
Queue Configuration
Key environment variables for queue mode:
# Enable queue mode
MODE = queue
# Queue settings
QUEUE_NAME = flowise-queue
WORKER_CONCURRENCY = 100000
REMOVE_ON_AGE = 86400
REMOVE_ON_COUNT = 10000
# Redis connection
REDIS_URL = redis://redis:6379
# OR individual settings:
REDIS_HOST = localhost
REDIS_PORT = 6379
REDIS_USERNAME =
REDIS_PASSWORD =
# Optional: BullMQ Dashboard
ENABLE_BULLMQ_DASHBOARD = true
Ensure Redis is properly secured in production environments. Configure authentication and network isolation.
Data Persistence
Volume Mounting
The Docker Compose configuration mounts ~/.flowise to persist:
volumes :
- ~/.flowise:/root/.flowise
This includes:
SQLite database (if using)
Encryption keys
Uploaded files
Log files
Database Configuration
For production, use PostgreSQL or MySQL:
DATABASE_TYPE = postgres
DATABASE_HOST = your-postgres-host
DATABASE_PORT = 5432
DATABASE_NAME = flowise
DATABASE_USER = flowise_user
DATABASE_PASSWORD = secure_password
DATABASE_SSL = true
Cloud Storage
Configure S3 or Google Cloud Storage for uploaded files:
AWS S3
Google Cloud Storage
STORAGE_TYPE = s3
S3_STORAGE_BUCKET_NAME = flowise-storage
S3_STORAGE_ACCESS_KEY_ID = your-access-key
S3_STORAGE_SECRET_ACCESS_KEY = your-secret-key
S3_STORAGE_REGION = us-east-1
Production Configuration
Health Checks
The Docker Compose configuration includes health checks:
healthcheck :
test : [ 'CMD' , 'curl' , '-f' , 'http://localhost:3000/api/v1/ping' ]
interval : 10s
timeout : 5s
retries : 5
start_period : 30s
Environment Variables
Essential production settings:
Security
CORS & Origins
Logging
Metrics
# Generate with: openssl rand -hex 32
JWT_AUTH_TOKEN_SECRET = your-jwt-secret
JWT_REFRESH_TOKEN_SECRET = your-refresh-secret
EXPRESS_SESSION_SECRET = your-session-secret
TOKEN_HASH_SECRET = your-token-hash-secret
# Security settings
SECURE_COOKIES = true
TRUST_PROXY = true
HTTP_SECURITY_CHECK = true
Scaling Worker Instances
Scale workers horizontally in queue mode:
docker compose -f docker-compose-queue-prebuilt.yml up -d --scale flowise-worker= 3
This runs 3 worker instances, all connected to the same Redis queue.
Troubleshooting
Container Won’t Start
Check logs for errors:
Common issues:
Port 3000 already in use: Change PORT in .env
Permission errors: Ensure volume mount permissions
Memory issues: Increase Docker memory allocation
Database Connection Errors
Verify database settings:
docker compose exec flowise env | grep DATABASE
Test database connectivity from container:
docker compose exec flowise sh
# Then test connection to your database
Queue Mode Issues
Verify Redis connectivity:
docker compose exec flowise sh -c 'curl redis:6379'
Check worker logs:
docker compose logs flowise-worker -f
Increase Node.js memory:
environment :
- NODE_OPTIONS=--max-old-space-size=8192
Monitor container resources:
Docker Compose Reference
The docker-compose.yml includes:
Image : flowiseai/flowise:latest
Restart Policy : always
Health Checks : Automatic monitoring
Volume Mounts : Data persistence
Environment Variables : Full configuration support
Port Mapping : Configurable via .env
Next Steps
Environment Variables Complete environment configuration reference
Cloud Deployment Deploy to AWS, Azure, GCP, and more
Production Best Practices Security and scaling considerations
API Documentation Integrate with Flowise APIs