
How do I self-host FlowiseAI with Docker Compose for an internal RAG chatbot?
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
gitinstalled (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:
- FlowiseAI app – The UI and API to build and serve flows
- Database – Stores flows, credentials, and config (SQLite by default, or Postgres/MySQL)
- Vector store – Stores document embeddings for RAG
- Can be internal (Chroma, Qdrant, Postgres + pgvector)
- Or external SaaS (Pinecone, Weaviate Cloud, etc.)
- LLM provider
- External: OpenAI, Azure OpenAI, Anthropic, etc.
- Internal: Ollama or custom inference server behind your firewall
- 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 toFLOWISE_PORTon your host flowise_datapersists flows, config, and files- Credentials are protected by
FLOWISE_SECRET_KEYencryption 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:3000internally - 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:
- Go to Credentials
- Add a new credential for OpenAI (or compatible: Together, OpenRouter, etc.)
- 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:
-
Install Ollama on a server or your Flowise host
-
Pull a model, e.g.:
ollama pull llama3 -
In Flowise, configure an Ollama or OpenAI-compatible connector:
- Base URL:
http://host.docker.internal:11434(for local host) - Model:
llama3or whichever model you pulled
- Base URL:
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
Localor 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:
docker compose up -d- In Flowise, create a credential for Qdrant:
- URL:
http://qdrant:6333(within Docker network)
- URL:
- 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:
- Chat Input – accepts user questions
- Document Loader – loads your internal documents
- Files: PDFs, DOCX, text, etc.
- Web: internal wiki URLs
- Database connectors if applicable
- Text Splitter – splits documents into chunks (e.g., 500–1000 tokens with overlap)
- Embeddings – uses your chosen model to create vector embeddings
- Vector Store – stores and retrieves embeddings (Chroma, Qdrant, etc.)
- Retriever – pulls top‑k relevant chunks for a query
- LLM – your selected model that combines question + retrieved context
- 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:
questionand optional metadata- Receive
answerand 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_datavolume 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_PORTis 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:
- Set up Docker and Compose on your server
- Create a
docker-compose.ymland.envto run the Flowise container - Secure it with internal-only access, auth, and optionally a reverse proxy + HTTPS
- Configure an LLM provider (external or self-hosted)
- Add a vector store (Chroma, Qdrant, etc.) for document embeddings
- Build a RAG flow that indexes your internal documents and answers questions
- 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.