Skip to main content
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:
1

Pull the latest image

docker pull flowiseai/flowise:latest
2

Run the container

docker run -d \
  --name flowise \
  -p 3000:3000 \
  -v ~/.flowise:/root/.flowise \
  flowiseai/flowise:latest
3

Access Flowise

Open http://localhost:3000 in your browser.

Managing the Container

docker stop flowise

Building from Source

Build Your Own Image

Build Flowise from the monorepo source:
1

Clone the repository

git clone https://github.com/FlowiseAI/Flowise.git
cd Flowise
2

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
3

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:
1

Navigate to docker folder

cd docker
2

Create environment file

cp .env.example .env
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
3

Start the services

docker compose up -d
4

Verify deployment

docker compose ps
Check health status:
docker compose logs flowise

Stop and Manage Services

docker compose stop

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

1

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)
2

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:
.env
# 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:
.env
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:
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:
# 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:
docker logs flowise
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

Performance Issues

Increase Node.js memory:
environment:
  - NODE_OPTIONS=--max-old-space-size=8192
Monitor container resources:
docker stats flowise

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

Build docs developers (and LLMs) love