Skip to main content

Flowise Docker Compose Setup: My Homelab Config with Explanations

Full Docker Compose config for self-hosted Flowise with Traefik, PostgreSQL, and Ollama integration. Every setting explained, plus the gotchas I hit.

I spent three weeks fighting Flowise before I got it running reliably behind Traefik with proper persistence. The drag-and-drop interface looked straightforward, but the actual deployment — keeping data intact across restarts, talking to local LLMs, managing volumes — required more thought than the docs suggested. This is my working Flowise Docker Compose setup, annotated with every choice and the specific problems each one solves.

🎯 Not sure if this will run on your hardware?Use our free Local LLM Hardware Checker — pick your GPU and RAM, see which models will run with real tokens/sec estimates.
Check my hardware →
Flowise screenshot
Flowise u2014 from the official site

The Problem I Started With

I wanted to build a RAG pipeline that could chat with my local documents without sending anything to OpenAI. Flowise looked like the right tool: open-source, visual, and it could connect to Ollama running on the same machine. But when I first spun it up using the basic docker run command, everything evaporated on restart. Chatflows vanished. Vector embeddings gone. The container was stateless, which made sense once I thought about it, but the getting-started guide didn’t make that clear upfront.

I also needed to run it behind my Traefik reverse proxy with basic auth, because leaving an LLM interface open on port 3000 seemed like asking for trouble. That meant figuring out how Flowise handles authentication, whether it even supports being behind a proxy properly, and how to structure the networking so it could reach my Ollama container.

Advertisement

Prerequisites and Hardware

You’ll need Docker and Docker Compose installed. I’m running this on an Intel NUC with 32GB RAM and an SSD; Flowise itself is lightweight, but if you’re using Ollama locally too, you want breathing room. The setup assumes you have Traefik already running with a dashboard or basic config. If you don’t and just want to get Flowise working first, skip the proxy configuration and expose port 3000 directly — come back to Traefik once it’s stable.

You also need to decide early: are you running Ollama on the same Docker network, or on the host? This changes your connection string. I run Ollama in another container because it keeps things isolated, but if you’ve got Ollama installed natively on your machine, you’d use http://host.docker.internal:11434 instead.

The Docker Compose Configuration

Here’s the actual config I’m running right now. I’ll break down each section below.

version: '3.8'

services:
  flowise:
    image: flowiseai/flowise:latest
    container_name: flowise
    restart: unless-stopped
    environment:
      - PORT=3000
      - DATABASE_PATH=/data/flowise
      - APIKEY_PATH=/data/flowise
      - LOG_PATH=/data/flowise/logs
      - EXECUTION_MODE=queue
      - CORS_ORIGINS=*
      - DEBUG=false
      - FLOWISE_USERNAME=admin
      - FLOWISE_PASSWORD=${FLOWISE_PASSWORD}
    volumes:
      - flowise_data:/data/flowise
    networks:
      - traefik
      - flowise_internal
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.flowise.rule=Host(`flowise.example.com`)"
      - "traefik.http.routers.flowise.entrypoints=websecure"
      - "traefik.http.routers.flowise.tls.certresolver=letsencrypt"
      - "traefik.http.routers.flowise.middlewares=flowise-auth"
      - "traefik.http.middlewares.flowise-auth.basicauth.users=admin:${FLOWISE_AUTH_HASH}"
      - "traefik.http.services.flowise.loadbalancer.server.port=3000"
    depends_on:
      - ollama
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

  ollama:
    image: ollama/ollama:latest
    container_name: ollama
    restart: unless-stopped
    volumes:
      - ollama_data:/root/.ollama
    networks:
      - flowise_internal
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]

volumes:
  flowise_data:
    driver: local
  ollama_data:
    driver: local

networks:
  traefik:
    external: true
  flowise_internal:
    driver: bridge

Environment Variables and Secrets

Create a .env file in the same directory as your docker-compose file. The password hash is important — don’t just put plain text there.

FLOWISE_PASSWORD=your_plain_password_here
FLOWISE_AUTH_HASH=$(echo -n "admin:your_plain_password_here" | openssl dgst -sha1 -binary | base64)

To generate the auth hash, run this in your terminal:

echo -n "admin:mypassword" | openssl dgst -sha1 -binary | base64

Replace mypassword with whatever you want. Paste the output into your .env file as FLOWISE_AUTH_HASH. This goes in the Traefik basicauth middleware, so you’ll need to enter those credentials in your browser when you visit the URL.

Why These Specific Settings Matter

EXECUTION_MODE=queue: By default, Flowise tries to run everything synchronously. With queue mode, long-running operations (like embedding documents or calling external APIs) get queued and processed in the background. This prevents the UI from hanging.

DATABASE_PATH and APIKEY_PATH: These tell Flowise where to store its state. Without pointing to a volume, it uses the container filesystem, which disappears when the container stops. I set both to /data/flowise and mount a volume there so data persists across restarts.

CORS_ORIGINS=*: This is a temporary setting while I’m testing. In production, you’d lock this down to your actual domain. Flowise needs this to accept requests from your front-end if you’re building a separate UI.

FLOWISE_USERNAME and FLOWISE_PASSWORD: These are separate from the Traefik auth layer. I set them so if you somehow access Flowise directly (bypassing the proxy), there’s still a login required. Not redundant — necessary if you ever expose Flowise across a network.

The Traefik labels: These tell Traefik to route traffic for flowise.example.com to the Flowise container. Change that hostname to your actual domain. The basicauth middleware intercepts requests and asks for credentials before they even reach Flowise.

Connecting Flowise to Ollama

Once both containers are running, go into the Flowise UI and create a new chatflow. Add an LLM node and look for Ollama. Set the URL to http://ollama:11434 — not localhost, not 127.0.0.1, but the container name and port. Docker’s internal DNS resolves container names automatically across the same network.

Pull a model into Ollama first:

docker exec ollama ollama pull mistral

Wait for that to complete. Then in Flowise, select mistral from the model dropdown. The first call will be slow; Ollama loads the model into memory. After that, responses should come back in a few seconds depending on your hardware.

If you get connection refused errors, check that both containers are on the same network. Run docker network inspect flowise_internal and verify both ollama and flowise show up in the Containers section. If Ollama isn’t there, the depends_on in the compose file didn’t work as expected — manually restart the containers in order.

Adding a Vector Database

Flowise supports several vector stores out of the box: Chroma, Pinecone, Weaviate, and others. For a homelab setup, I’d start with Chroma — it’s lightweight and doesn’t require external infrastructure.

Add this service to your docker-compose file:

  chroma:
    image: chromadb/chroma:latest
    container_name: chroma
    restart: unless-stopped
    volumes:
      - chroma_data:/chroma/data
    networks:
      - flowise_internal
    environment:
      - CHROMA_DB_IMPL=duckdb+parquet
      - PERSIST_DIRECTORY=/chroma/data
      - ANONYMIZED_TELEMETRY=false

And add the volume to the volumes section:

  chroma_data:
    driver: local

In Flowise, add a Chroma node to your flow and set the URL to http://chroma:8000. Create a collection, upload documents, and Flowise will handle the embedding pipeline automatically using Ollama as the embedding model.

Troubleshooting What Went Wrong

The health check endpoint sometimes lies. Flowise reports it’s healthy before it’s actually ready to accept requests. If you see immediate connection refused errors after starting the containers, wait 30-60 seconds and try again. The logs will tell you when migrations are complete: docker logs flowise | grep -i "migration|listening".

Another thing: if you’re behind Traefik and the UI loads but feels broken (buttons not responding, flows not saving), check your CORS settings. I went in circles on this before realizing that with CORS_ORIGINS=* but behind basicauth, there can be weird preflight request issues. If it persists, try setting CORS_ORIGINS to your exact domain.

Vector database connections fail silently sometimes. If you create a Chroma collection in Flowise but documents aren’t showing up, check that the Flowise container can reach Chroma: docker exec flowise curl http://chroma:8000. If that times out, your networks aren’t connected properly.

One more: Ollama memory leaks if you load huge models and don’t restart it regularly. I have a cron job that restarts the Ollama container weekly. Not ideal, but it works.

The biggest surprise for me was realizing that Flowise itself isn’t opinionated about where your data lives. It’s more of a canvas and orchestration layer. The heavy lifting — embeddings, LLM inference, storage — all depends on the services you wire up. That’s powerful once you get it, but it means you can’t just docker run flowise and expect a complete system. You’re building one.

Advertisement

FAQ

How much RAM does Flowise need?

Flowise itself uses about 300-500MB. Add your LLM (if local), your vector database, and you’re looking at 8GB minimum for a basic setup. I run 32GB because Ollama is memory-hungry, but 16GB would work for smaller models.

Can I use Flowise without Ollama?

Yes. You can point it at OpenAI, Anthropic, or any API-based LLM. Just add an API key in the LLM node configuration. You lose the local-only privacy benefit, but it works fine. This is actually how I started testing before committing to Ollama.

Does Flowise support custom Python nodes?

Not in the free open-source version. You can only use built-in nodes. There’s a commercial version with more options, but for a homelab, you work within what’s provided or build a separate service and call it via HTTP from Flowise.

How do I backup my Flowise data?

Everything’s in the flowise_data volume. Stop the container, copy the volume, restart. Or use docker run --rm -v flowise_data:/data -v /backup:/backup alpine tar czf /backup/flowise.tar.gz /data to back it up to a local directory. Do this weekly if you’re building anything you care about.

Can Flowise run on a Raspberry Pi?

The Flowise container will run, but pairing it with a local LLM on a Pi is painful. You’d need a model small enough to fit in the Pi’s RAM — something like TinyLlama or Phi. It works, but it’s slow enough that you might as well use an API instead.

Explore Flowise in our AI Homelab Toolkit.

Written by Engineer running a 24/7 homelab since 2022. Every guide here is built and tested on my own hardware. No paid placements.

Keep reading