How do I self-host FlowiseAI with Docker Compose for an internal RAG chatbot?
AI Agent Automation Platforms

How do I self-host FlowiseAI with Docker Compose for an internal RAG chatbot?

10 min read

Self-hosting FlowiseAI with Docker Compose is one of the easiest ways to spin up an internal RAG (Retrieval Augmented Generation) chatbot that runs on your own infrastructure. With Docker, you avoid installing Node.js, databases, or system dependencies manually, while keeping everything reproducible and portable for development or production.

Below is a step‑by‑step guide that covers planning, Docker setup, security, RAG configuration, and internal access so you can confidently run FlowiseAI as an internal knowledge chatbot.


What is FlowiseAI and why self-host it for RAG?

FlowiseAI is an open-source visual builder for LLM workflows. You design flows by connecting nodes (LLMs, vector stores, tools, data loaders) to quickly build:

  • RAG chatbots over your internal documents
  • Question-answering tools over knowledge bases
  • Custom assistants integrating APIs, databases, and more

Self-hosting FlowiseAI with Docker Compose for an internal RAG chatbot gives you:

  • Data control – keep documents and embeddings on your own servers or VPC
  • Network isolation – expose the chatbot only on your LAN or VPN
  • Configurable models – point to OpenAI, Azure OpenAI, Anthropic, or self-hosted models (e.g. Ollama, vLLM)
  • Repeatable setup – Docker Compose manages Flowise, database, and optional vector DB together

Prerequisites

Before you self-host FlowiseAI with Docker Compose for an internal RAG chatbot, make sure you have:

  • A Linux server, VM, or local machine (Windows/macOS/Linux)
  • Docker Engine and Docker Compose installed
  • git installed (optional but convenient)
  • 2–4 GB RAM minimum (more for larger models or many docs)
  • An API key for your LLM provider (OpenAI, Azure, etc.) or a local LLM server

For production, consider:

  • A reverse proxy (Nginx, Traefik, Caddy)
  • HTTPS certificates (Let’s Encrypt or internal CA)
  • Private network / VPN access

Plan your internal RAG chatbot architecture

When you self-host FlowiseAI with Docker Compose for an internal RAG chatbot, define a basic architecture:

  1. FlowiseAI app – The UI and API to build and serve flows
  2. Database – Stores flows, credentials, and config (SQLite by default, or Postgres/MySQL)
  3. Vector store – Stores document embeddings for RAG
    • Can be internal (Chroma, Qdrant, Postgres + pgvector)
    • Or external SaaS (Pinecone, Weaviate Cloud, etc.)
  4. LLM provider
    • External: OpenAI, Azure OpenAI, Anthropic, etc.
    • Internal: Ollama or custom inference server behind your firewall
  5. Network scope
    • Accessible only from your internal subnet or VPN
    • Optional SSO or password auth for the Flowise UI

Create a Docker Compose file for FlowiseAI

FlowiseAI publishes official Docker images, so you can deploy it with a minimal docker-compose.yml.

1. Create a project directory

mkdir flowise-rag-chatbot
cd flowise-rag-chatbot

2. Create an .env file for configuration

You’ll store environment variables used by Docker Compose here:

nano .env

Example contents:

# Core Flowise settings
FLOWISE_PORT=3000
FLOWISE_DATABASE_PATH=/root/.flowise
FLOWISE_LOG_LEVEL=info

# Credentials encryption key (generate a long random string)
FLOWISE_SECRET_KEY=change_this_to_a_secure_random_string

# Auth (optional but recommended for internal deployments)
FLOWISE_USERNAME=admin
FLOWISE_PASSWORD=strong_internal_password

# Node environment
NODE_ENV=production

# If using Postgres or other DBs, you can add them later

Save and exit.

3. Create docker-compose.yml

nano docker-compose.yml

Example configuration using the official Flowise image and a volume for persistent data:

version: "3.9"

services:
  flowise:
    image: flowiseai/flowise:latest
    container_name: flowise
    restart: unless-stopped
    ports:
      - "${FLOWISE_PORT}:3000"
    environment:
      - PORT=3000
      - FLOWISE_SECRET_KEY=${FLOWISE_SECRET_KEY}
      - FLOWISE_USERNAME=${FLOWISE_USERNAME}
      - FLOWISE_PASSWORD=${FLOWISE_PASSWORD}
      - NODE_ENV=${NODE_ENV}
      - FLOWISE_LOG_LEVEL=${FLOWISE_LOG_LEVEL}
      - FLOWISE_FILE_STORAGE_PATH=/root/.flowise
    volumes:
      - flowise_data:/root/.flowise

volumes:
  flowise_data:

Key points:

  • The container always listens on port 3000, mapped to FLOWISE_PORT on your host
  • flowise_data persists flows, config, and files
  • Credentials are protected by FLOWISE_SECRET_KEY encryption and optional username/password

If you want Flowise accessible only locally for testing, you can bind to 127.0.0.1:

    ports:
      - "127.0.0.1:${FLOWISE_PORT}:3000"

Start FlowiseAI with Docker Compose

From the project directory:

docker compose up -d

Check logs:

docker compose logs -f

Once Flowise is running, open:

  • http://localhost:3000 (on the server)
  • Or http://<server-ip>:3000 (from your machine, if port is open)

Log in using FLOWISE_USERNAME and FLOWISE_PASSWORD if you enabled auth.


Secure Flowise for internal use

Even when self-hosting FlowiseAI with Docker Compose for an internal RAG chatbot, you should still harden the setup.

1. Restrict access to internal networks

On the server firewall, allow only internal IP ranges to reach the Flowise port:

Example with UFW:

sudo ufw allow from 10.0.0.0/8 to any port 3000
sudo ufw allow from 192.168.0.0/16 to any port 3000
sudo ufw enable

If you’re behind a VPN or corporate network, coordinate with your network team to scope access.

2. Use a reverse proxy and HTTPS (optional but recommended)

Run Nginx or Traefik in front of Flowise:

  • Terminate TLS at the proxy (Let’s Encrypt or internal CA)
  • Keep Flowise bound to 127.0.0.1:3000 internally
  • Optionally enforce basic auth or SSO at the proxy layer

Basic Nginx server block (example):

server {
    listen 443 ssl;
    server_name flowise.internal.example.com;

    ssl_certificate /etc/ssl/certs/flowise.crt;
    ssl_certificate_key /etc/ssl/private/flowise.key;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Configure an LLM provider in Flowise

After starting FlowiseAI, you need a model for your internal RAG chatbot.

1. Use OpenAI or compatible APIs

In Flowise:

  1. Go to Credentials
  2. Add a new credential for OpenAI (or compatible: Together, OpenRouter, etc.)
  3. Enter your API key and model name (gpt-4.1, gpt-4.1-mini, gpt-4o-mini, etc.)

If your organization uses an OpenAI-compatible internal gateway, point Flowise at that base URL.

2. Use self-hosted models (Ollama example)

If you want to keep everything internal:

  1. Install Ollama on a server or your Flowise host

  2. Pull a model, e.g.:

    ollama pull llama3
    
  3. In Flowise, configure an Ollama or OpenAI-compatible connector:

    • Base URL: http://host.docker.internal:11434 (for local host)
    • Model: llama3 or whichever model you pulled

If Flowise runs in a different container, you may need to:

  • Put Ollama and Flowise on the same Docker network
  • Use the service name instead of host.docker.internal

Add a vector store for RAG

For an internal RAG chatbot, you must store embeddings in a vector database.

Flowise supports many options; two common internal choices:

Option 1: Built-in vector DBs (simple internal use)

Flowise can use local vector stores like Chroma or built-in memory. This is simpler for small to medium datasets.

  • In your flow, add a Vector Store node (e.g., Chroma)
  • Use Local or container-local paths for storage

This keeps things minimal when you self-host FlowiseAI with Docker Compose for an internal RAG chatbot.

Option 2: Self-hosted Qdrant with Docker Compose

Add Qdrant to docker-compose.yml:

services:
  flowise:
    # ... existing config ...
    depends_on:
      - qdrant

  qdrant:
    image: qdrant/qdrant:v1.12.4
    container_name: qdrant
    restart: unless-stopped
    ports:
      - "6333:6333"
    volumes:
      - qdrant_data:/qdrant/storage

volumes:
  flowise_data:
  qdrant_data:

Then:

  1. docker compose up -d
  2. In Flowise, create a credential for Qdrant:
    • URL: http://qdrant:6333 (within Docker network)
  3. In your flow, add a Qdrant vector store node and select that credential

Qdrant keeps your embeddings in a dedicated high-performance store, suitable for larger document sets.


Build an internal RAG chatbot flow in Flowise

Now that Flowise is running and connected to an LLM and vector store, create your RAG flow.

1. Create a new flow

  • Click New Flow
  • Give it a name, e.g. Internal Knowledge Chatbot

2. Add nodes for a typical RAG pipeline

A minimalist pipeline using Flowise nodes might include:

  1. Chat Input – accepts user questions
  2. Document Loader – loads your internal documents
    • Files: PDFs, DOCX, text, etc.
    • Web: internal wiki URLs
    • Database connectors if applicable
  3. Text Splitter – splits documents into chunks (e.g., 500–1000 tokens with overlap)
  4. Embeddings – uses your chosen model to create vector embeddings
  5. Vector Store – stores and retrieves embeddings (Chroma, Qdrant, etc.)
  6. Retriever – pulls top‑k relevant chunks for a query
  7. LLM – your selected model that combines question + retrieved context
  8. Chat Output – displays answer and optional source citations

Link nodes in order, making sure the query flows through the retriever into the LLM with context.

3. Index your internal documents

For a one-time bulk ingestion:

  • Add a “Document Loader + Ingest” flow or use Flowise’s existing templates
  • Or use Flowise’s ingestion nodes/tools that push chunks into your vector store

For ongoing updates, schedule a job (cron / CI pipeline) that calls Flowise’s API or runs a Flowise ingestion flow via HTTP to keep the index fresh.


Deploy the internal RAG chatbot as an API or widget

Once your flow is tested inside Flowise, you can expose it:

1. Use the Flowise Chat UI

  • Inside Flowise, open your flow and click Chat
  • Share the Flowise URL only within your internal network or VPN
  • Optionally add Flowise login credentials for access control

2. Embed a widget in an internal portal

Flowise can generate embed code (iframe or script) for your flow:

  • Go to the Embed or Share options in your flow
  • Copy the embed snippet into your internal wiki, intranet, or application

This is ideal for internal teams accessing your RAG chatbot from existing tools.

3. Call the Flowise API from custom apps

Flowise exposes a REST API and sometimes OpenAPI specs (depending on version):

  • Deploy the flow as a chat endpoint
  • Your internal apps send:
    • question and optional metadata
    • Receive answer and possibly references or debug info

This allows you to integrate your internal RAG chatbot into support tools, dashboards, or custom frontends.


Persistence, backups, and updates

For a stable internal deployment, plan how you’ll manage data and upgrades when you self-host FlowiseAI with Docker Compose for an internal RAG chatbot.

1. Persistent volumes

  • flowise_data volume holds flows and config
  • If using Qdrant / Postgres / other DBs, also configure volumes for those

2. Backups

Regularly backup volumes:

docker run --rm \
  -v flowise_data:/data \
  -v $(pwd)/backups:/backup \
  alpine tar czf /backup/flowise_data_$(date +%F).tgz -C /data .

Use similar commands for qdrant_data or DB volumes.

3. Upgrading Flowise

To update to latest:

docker compose pull
docker compose up -d

Always test upgrades in staging first if you rely on this internal RAG chatbot for critical workflows.


Troubleshooting common issues

When you self-host FlowiseAI with Docker Compose for an internal RAG chatbot, you may run into a few common issues:

Flowise container keeps restarting

Check logs:

docker compose logs flowise

Common causes:

  • Missing FLOWISE_SECRET_KEY
  • Permission issues on volume
  • Port conflict if FLOWISE_PORT is already in use

Unable to connect to LLM provider

  • Ensure network egress is allowed from your server to the provider
  • Validate API key in Flowise credentials
  • Check that your company proxy / outbound firewall allows the connection

Vector store connection errors

  • Confirm the vector DB container is running: docker ps
  • Verify service name in Flowise matches the container name in Docker Compose (e.g., qdrant:6333)
  • Ensure both services share the same Docker network (default is fine if in same docker-compose.yml)

Summary

To self-host FlowiseAI with Docker Compose for an internal RAG chatbot, you:

  1. Set up Docker and Compose on your server
  2. Create a docker-compose.yml and .env to run the Flowise container
  3. Secure it with internal-only access, auth, and optionally a reverse proxy + HTTPS
  4. Configure an LLM provider (external or self-hosted)
  5. Add a vector store (Chroma, Qdrant, etc.) for document embeddings
  6. Build a RAG flow that indexes your internal documents and answers questions
  7. Expose the chatbot via Flowise UI, an embedded widget, or an internal API

This approach gives you an internal, controllable RAG chatbot with a visual builder, while leveraging Docker Compose for simple deployment, updates, and portability.