Skip to main contentSkip to navigation
[email protected]
Client AreaSupport
Hosting Mammoth
HostingMammothYour Data, Our Responsibility
Home
Solutions
Hosting Services
Store
Pricing
About
Blog
API
Contact

Stay Ahead of the Curve

Get the latest insights on cybersecurity, AI innovations, and enterprise data solutions delivered to your inbox.

Hosting Mammoth
HostingMammothEnterprise Solutions

Enterprise-grade data solutions. Hosting, recovery, cybersecurity, and AI-powered services for businesses worldwide.

[email protected]
Sun - Fri, 9:00am - 5:00pm

Services

  • Cloud Hosting
  • Data Recovery
  • Cybersecurity
  • Legal Support
  • MSP Services
  • Web Development
  • AI Services
  • Free Server Migration

Hosting

  • VPS Hosting (NVMe SSD)
  • VDS Hosting (NVMe)
  • Storage VPS (High SSD)
  • GPU Servers
  • Managed Services
  • Cloud Firewall
  • Load Balancer
  • One-Click Apps
  • n8n Hosting
  • Object Storage
  • FAQ

Company

  • Store
  • Pricing
  • About Us
  • Locations
  • Blog
  • Testimonials
  • Contact
  • Affiliate Program
  • White-Label
  • Terms of Service
  • Privacy Policy
  • Browser Cookies
  • SLA

Support

  • Client Area
  • Submit Ticket
  • Knowledge Base
  • Server Status
  • API Documentation

© 2026 Hosting Mammoth. All rights reserved.

Knowledge Base
Getting StartedAccount ManagementVPS HostingGPU ServersStorage VPSCloud FirewallLoad BalancerServer ManagementBilling & PaymentsSupport & TicketsAffiliate ProgramReseller ProgramMarketplace & Appsn8n HostingManaged ServicesServer MigrationAPI & DevelopersSecurityTroubleshootingGlossaryInstall Guides
  1. Home
  2. /
  3. Support
  4. /
  5. Install Guides
  6. /
  7. How To Install Flowise Ubuntu
GUIDEInstall Guides

How to Install Flowise on Ubuntu 24.04 VPS: Visual LangChain Builder for LLM Workflows

30 min read

How to Install Flowise on Ubuntu 24.04 VPS: Visual LangChain Builder for LLM Workflows

Flowise turns LangChain into a drag-and-drop canvas. Instead of writing Python glue code to connect an LLM to a vector store, a retriever, a tool, and a memory buffer, you wire the nodes together visually, click Save, and every chatflow becomes a deployable REST API and embeddable chat widget. This guide walks you through installing Flowise on an Ubuntu 24.04 LTS VPS end to end: Node.js 20, PostgreSQL for persistent storage, PM2 for process supervision, and an Nginx TLS reverse proxy. By the end you will have a production-ready Flowise instance, your first RAG chatflow talking to a local Ollama model, and an embed snippet you can paste into any site.

Looking for a bigger AI stack? Pair Flowise with Ollama for local inference, Open WebUI for a polished chat UI, and n8n for workflow automation on the same VPS.

Table of Contents

  • What is Flowise?
  • Why Self-Host Flowise?
  • Prerequisites
  • Step 1: Update System Packages
  • Step 2: Install Node.js 20 LTS
  • Step 3: Install Flowise
  • Step 4: Provision PostgreSQL for Production
  • Step 5: Create the Flowise Environment File
  • Step 6: Supervise Flowise with PM2
  • Step 7: Alternative — Run Flowise with Docker
  • Step 8: Configure Nginx with Let's Encrypt TLS
  • Step 9: Build Your First Chatflow
  • Step 10: Add Tools, Retrievers, and the Ollama Connector
  • Step 11: Call the Chatflow via API and Embed the Widget
  • Hardening and Backups
  • Troubleshooting
  • FAQ
  • Next Steps
  • What is Flowise?

    Flowise is an open-source, low-code platform for building LLM applications on top of LangChain and LlamaIndex. It ships as a Node.js server that exposes a React-based canvas in your browser. Each node represents a LangChain primitive — a chat model, a prompt template, a vector store retriever, a tool, an agent, a memory buffer, a document loader — and you compose them by dragging edges between inputs and outputs.

    Once a workflow is saved, Flowise does four useful things simultaneously. First, it gives you a live chat pane inside the canvas so you can test prompts without leaving the UI. Second, it exposes a REST prediction endpoint at /api/v1/prediction/{chatflowId} that any application can call with a POST request. Third, it generates a copy-paste embed script that drops a floating chat bubble onto any HTML page. Fourth, it persists versioned chatflows, credentials, API keys, document stores, and chat history in the configured database so nothing is lost on restart.

    The node library covers the full LangChain surface. You get chat models (OpenAI, Anthropic, Google Gemini, Groq, Mistral, Ollama, Bedrock, Azure OpenAI, vLLM), embeddings (OpenAI, Cohere, HuggingFace, Ollama, Voyage), vector stores (Pinecone, Qdrant, Chroma, Weaviate, Milvus, Postgres pgvector, Redis, Supabase), retrievers (self-query, contextual compression, multi-vector, parent document), chains (conversational, SQL, API, QA over docs), agents (OpenAI functions, ReAct, tool-calling, conversational), document loaders (PDF, DOCX, CSV, GitHub, Notion, Confluence, Airtable, S3, URL), text splitters, memory backends (buffer, conversation summary, vector-backed), and tools (calculator, web browser, SerpAPI, Brave Search, custom HTTP, OpenAPI specs).

    Typical Flowise use cases:

    • Customer support chatbot that answers from your knowledge base (RAG over PDFs and URLs).
    • Internal Q&A over company wikis, Notion, and Confluence, with per-team access keys.
    • AI agents that call your own REST APIs as tools and return structured answers.
    • Document analysis pipelines — upload a PDF, chunk it, embed it, query it.
    • Chat-to-SQL tools that let non-technical users query a database in natural language.
    • Prompt engineering sandbox shared across a team, with versioned workflows.

    Why Self-Host Flowise?

    Hosted LLM tooling looks convenient until you audit what it costs and what it exposes.

    • Data privacy — Prompts, uploaded documents, embeddings, and chat transcripts stay on your VPS. Nothing is logged by a third-party SaaS. For legal, healthcare, or regulated industries, this is often a hard requirement.
    • Credential control — OpenAI, Anthropic, and Pinecone keys live in your PostgreSQL database (encrypted at rest with FLOWISE_SECRETKEY_OVERWRITE) instead of being uploaded to someone else's platform.
    • Flat, predictable cost — A CloudCore Professional VPS at EUR 19.99/month runs dozens of chatflows serving hundreds of conversations per day without usage metering.
    • No rate caps — SaaS Flowise plans throttle predictions per month. A self-hosted instance is bounded only by your CPU, RAM, and whatever LLM backend you use.
    • Full extensibility — You can install custom LangChain community packages, add custom tool nodes, mount additional volumes, and connect Flowise to any database or message queue on the same VPS.
    • GDPR / data residency — Deploy in the EU region of your choice, point Flowise at a local Ollama, and your entire AI stack becomes on-premises.
    • Compose with the rest of your stack — Flowise works best next to n8n, Ollama, Open WebUI, Qdrant, and your existing Postgres. Self-hosting lets all of those talk over 127.0.0.1 at zero latency.

    Self-Hosted Flowise vs. SaaS

    DimensionFlowise Cloud (SaaS)Self-Hosted on VPS
    Monthly cost$35-$200+ per seat / usage tierEUR 19.99 flat
    Predictions per monthCapped by planUnbounded
    Data locationVendor's regionYour VPS region
    Custom nodes / packagesLimitedAny npm package
    Works with local OllamaNoYes (127.0.0.1:11434)
    PostgreSQL you controlNoYes
    Offline / air-gappedNoYes
    BackupsVendor-managedpg_dump + your rsync

    Prerequisites

    Before you begin you need:

    • An Ubuntu 24.04 LTS VPS with root or sudo access.
    • SSH access (Terminal on macOS/Linux, PuTTY or Windows Terminal on Windows).
    • A domain name pointing an A record at your VPS (for the TLS reverse proxy).
    • At least 2 GB of RAM for Flowise alone. 12 GB if you will also run Ollama on the same VPS.
    • At least 20 GB of disk space (more if you plan to store large document collections or embeddings).
    Recommended Plan: CloudCore Professional
    >
    For a Flowise + PostgreSQL + Nginx + Ollama stack on a single VPS, we recommend CloudCore Professional:
    >
    - 6 vCPU cores
    - 12 GB RAM
    - 100 GB NVMe SSD
    - Unmetered bandwidth
    - EUR 19.99/month
    >
    If you only call hosted APIs (OpenAI, Anthropic, Groq) and do not run a local LLM, a 4 GB plan is sufficient for small teams.

    Connect to your server:

    bash
    ssh root@your-server-ip

    Step 1: Update System Packages

    bash
    sudo apt update && sudo apt upgrade -y

    If the kernel was updated, reboot:

    bash
    sudo reboot

    Reconnect, then install a few baseline utilities you will need throughout the guide:

    bash
    sudo apt install -y curl git build-essential ca-certificates gnupg ufw

    Step 2: Install Node.js 20 LTS

    Flowise requires Node.js >= 18.15.0. We will install the current LTS (Node 20) from the official NodeSource repository, which is the version Flowise is tested against.

    bash
    curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
    sudo apt install -y nodejs

    Verify:

    bash
    node --version
    npm --version

    Expected output:

    text
    v20.18.1
    10.8.2

    (Optional) Use a Non-Root Node Path

    npm installs global packages under /usr/lib/node_modules by default, which requires sudo. If you prefer to avoid sudo npm install -g, reconfigure the global prefix for the current user:

    bash
    mkdir -p ~/.npm-global
    npm config set prefix ~/.npm-global
    echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
    source ~/.bashrc

    Step 3: Install Flowise

    Install the Flowise binary globally via npm:

    bash
    sudo npm install -g flowise

    The install pulls the flowise CLI plus every LangChain integration as peer dependencies. Expect the first install to take 2-5 minutes and download roughly 800 MB of packages into /usr/lib/node_modules/flowise.

    Verify:

    bash
    flowise --version

    Expected output (version will vary):

    text
    2.2.8

    Start Flowise Once to Smoke-Test

    Before wiring up PostgreSQL, Nginx, and PM2, confirm Flowise boots on SQLite:

    bash
    flowise start

    You should see:

    text
    Starting Flowise...
    Flowise Server Version: 2.2.8
    ⚡️ [server]: Flowise Server is listening at 3000

    Open http://your-server-ip:3000 in your browser. You should see the Flowise welcome screen. Press Ctrl+C in the terminal to stop it; we will reconfigure it properly in the next steps.

    Step 4: Provision PostgreSQL for Production

    Flowise supports SQLite (default), MySQL, MariaDB, and PostgreSQL. Always use PostgreSQL in production. SQLite is single-writer and prone to "database is locked" errors under concurrent API load, and MySQL has historically had subtle JSON-column quirks in Flowise.

    Install PostgreSQL 16

    bash
    sudo apt install -y postgresql postgresql-contrib
    sudo systemctl enable --now postgresql

    Verify:

    bash
    sudo systemctl status postgresql
    psql --version

    Create the Database and User

    bash
    sudo -u postgres psql <<'SQL'
    CREATE USER flowise WITH PASSWORD 'CHANGE_ME_STRONG_PASSWORD';
    CREATE DATABASE flowise OWNER flowise;
    GRANT ALL PRIVILEGES ON DATABASE flowise TO flowise;
    \c flowise
    GRANT ALL ON SCHEMA public TO flowise;
    SQL

    Replace CHANGE_ME_STRONG_PASSWORD with a 32+ character random string. Generate one with:

    bash
    openssl rand -base64 32

    Verify the connection works from the flowise user:

    bash
    PGPASSWORD='CHANGE_ME_STRONG_PASSWORD' psql -h 127.0.0.1 -U flowise -d flowise -c '\conninfo'

    Expected output:

    text
    You are connected to database "flowise" as user "flowise" on host "127.0.0.1"

    (Optional) Enable pgvector for Embeddings

    If you plan to store embeddings in Postgres instead of a dedicated vector store, install pgvector:

    bash
    sudo apt install -y postgresql-16-pgvector
    sudo -u postgres psql -d flowise -c 'CREATE EXTENSION IF NOT EXISTS vector;'

    You can now use the Postgres vector store node in Flowise with the same credentials.

    Step 5: Create the Flowise Environment File

    Flowise reads configuration from environment variables. We will store them in /etc/flowise/.env and load them via PM2.

    Create the directory and file:

    bash
    sudo mkdir -p /etc/flowise
    sudo tee /etc/flowise/.env > /dev/null <<'EOF'
    

    Server

    PORT=3000 FLOWISE_HOST=127.0.0.1

    Basic auth for the Flowise UI

    FLOWISE_USERNAME=admin FLOWISE_PASSWORD=CHANGE_ME_ADMIN_PASSWORD

    Database — PostgreSQL

    DATABASE_TYPE=postgres DATABASE_HOST=127.0.0.1 DATABASE_PORT=5432 DATABASE_NAME=flowise DATABASE_USER=flowise DATABASE_PASSWORD=CHANGE_ME_STRONG_PASSWORD DATABASE_SSL=false

    Encrypt credentials and API keys stored in the DB

    Generate with: openssl rand -hex 32

    FLOWISE_SECRETKEY_OVERWRITE=PUT_A_64_CHAR_HEX_STRING_HERE

    Persist API keys in the database instead of on the filesystem

    APIKEY_STORAGE_TYPE=db

    Storage (files, uploaded docs) — local disk by default

    STORAGE_TYPE=local BLOB_STORAGE_PATH=/var/lib/flowise/storage

    Logging

    LOG_LEVEL=info LOG_PATH=/var/log/flowise DEBUG=false

    Optional: disable anonymous telemetry

    DISABLE_FLOWISE_TELEMETRY=true

    Optional: override default model list refresh

    MODEL_LIST_CONFIG_JSON=/etc/flowise/models.json

    EOF

    Generate and substitute the secrets:

    bash
    # Admin password
    openssl rand -base64 24
    

    Database password (must match the one from Step 4)

    openssl rand -base64 32

    Secret key for encrypting stored credentials

    openssl rand -hex 32

    Lock down permissions — this file contains every secret Flowise uses:

    bash
    sudo chown root:root /etc/flowise/.env
    sudo chmod 600 /etc/flowise/.env

    Create the storage and log directories:

    bash
    sudo mkdir -p /var/lib/flowise/storage /var/log/flowise
    sudo chown -R $USER:$USER /var/lib/flowise /var/log/flowise

    What Each Variable Does

    • FLOWISE_USERNAME / FLOWISE_PASSWORD — HTTP Basic Auth for the Flowise canvas. Without these, anyone who can reach port 3000 can edit your chatflows.
    • DATABASE_TYPE=postgres — Switches from SQLite to PostgreSQL. Required for any multi-user or production deployment.
    • FLOWISE_SECRETKEY_OVERWRITE — AES key used to encrypt every credential (OpenAI key, Pinecone key, etc.) stored in the credential table. Back this up — without it, your stored credentials are unrecoverable.
    • APIKEY_STORAGE_TYPE=db — Stores Flowise-issued API keys (the ones that protect chatflow endpoints) in Postgres instead of a local JSON file. This makes Docker rebuilds and multi-instance deployments safe.
    • STORAGE_TYPE=local — Where uploaded documents live. Set to s3 with corresponding S3_* variables if you want object storage.
    • DISABLE_FLOWISE_TELEMETRY=true — Stops the anonymous usage ping.

    Step 6: Supervise Flowise with PM2

    Running flowise start in a terminal works for testing, but production needs auto-restart on crash, auto-start on boot, and log rotation. PM2 handles all three.

    Install PM2 globally:

    bash
    sudo npm install -g pm2

    Create a PM2 ecosystem file:

    bash
    sudo tee /etc/flowise/ecosystem.config.js > /dev/null <<'EOF'
    module.exports = {
      apps: [
        {
          name: 'flowise',
          script: '/usr/bin/flowise',
          args: 'start',
          env_file: '/etc/flowise/.env',
          instances: 1,
          exec_mode: 'fork',
          max_memory_restart: '2G',
          autorestart: true,
          watch: false,
          out_file: '/var/log/flowise/out.log',
          error_file: '/var/log/flowise/err.log',
          merge_logs: true,
          time: true
        }
      ]
    };
    EOF
    If which flowise returns something different from /usr/bin/flowise (for example /usr/local/bin/flowise or ~/.npm-global/bin/flowise), update the script path accordingly.

    Start Flowise under PM2:

    bash
    pm2 start /etc/flowise/ecosystem.config.js
    pm2 logs flowise --lines 30

    You should see the Flowise banner and Flowise Server is listening at 3000. Press Ctrl+C to stop tailing logs (Flowise stays running).

    Enable PM2 auto-start on boot:

    bash
    pm2 save
    sudo env PATH=$PATH:/usr/bin pm2 startup systemd -u $USER --hp $HOME

    Copy-paste the sudo env ... command PM2 prints if it differs from the above. After running it, reboot to confirm PM2 relaunches Flowise automatically:

    bash
    sudo reboot
    

    After reconnecting:

    pm2 status

    Expected output:

    text
    ┌────┬───────────┬────────┬───────┬──────────┬──────┬──────────┬────────┐
    │ id │ name      │ mode   │ pid   │ status   │ cpu  │ memory   │ uptime │
    ├────┼───────────┼────────┼───────┼──────────┼──────┼──────────┼────────┤
    │ 0  │ flowise   │ fork   │ 1234  │ online   │ 0.5% │ 260 MB   │ 1m     │
    └────┴───────────┴────────┴───────┴──────────┴──────┴──────────┴────────┘

    Step 7: Alternative — Run Flowise with Docker

    If you prefer containers, skip Steps 3, 5, and 6 and use Docker Compose instead. This is a good fit if you are already running Docker for Ollama, Qdrant, or Open WebUI.

    Install Docker:

    bash
    curl -fsSL https://get.docker.com | sh
    sudo usermod -aG docker $USER
    newgrp docker

    Create a compose file:

    bash
    mkdir -p ~/flowise && cd ~/flowise
    cat > docker-compose.yml <<'EOF'
    services:
      flowise:
        image: flowiseai/flowise:latest
        container_name: flowise
        restart: unless-stopped
        ports:
          - "127.0.0.1:3000:3000"
        environment:
          PORT: 3000
          FLOWISE_USERNAME: admin
          FLOWISE_PASSWORD: CHANGE_ME_ADMIN_PASSWORD
          DATABASE_TYPE: postgres
          DATABASE_HOST: postgres
          DATABASE_PORT: 5432
          DATABASE_NAME: flowise
          DATABASE_USER: flowise
          DATABASE_PASSWORD: CHANGE_ME_STRONG_PASSWORD
          APIKEY_STORAGE_TYPE: db
          FLOWISE_SECRETKEY_OVERWRITE: PUT_A_64_CHAR_HEX_STRING_HERE
          DISABLE_FLOWISE_TELEMETRY: "true"
        volumes:
          - flowise_data:/root/.flowise
        depends_on:
          - postgres

    postgres: image: postgres:16 container_name: flowise-postgres restart: unless-stopped environment: POSTGRES_DB: flowise POSTGRES_USER: flowise POSTGRES_PASSWORD: CHANGE_ME_STRONG_PASSWORD volumes: - postgres_data:/var/lib/postgresql/data

    volumes: flowise_data: postgres_data: EOF

    docker compose up -d docker compose logs -f flowise

    The Nginx step below works identically whether Flowise is native or containerized — the reverse proxy just hits 127.0.0.1:3000.

    Step 8: Configure Nginx with Let's Encrypt TLS

    Flowise listens on plain HTTP. Never expose port 3000 directly to the internet — put Nginx and a Let's Encrypt certificate in front.

    Install Nginx and Certbot:

    bash
    sudo apt install -y nginx certbot python3-certbot-nginx

    Open firewall ports:

    bash
    sudo ufw allow OpenSSH
    sudo ufw allow 'Nginx Full'
    sudo ufw --force enable
    sudo ufw status

    Point a DNS A record for flowise.yourdomain.com at your VPS IP, wait for propagation (usually under 5 minutes), then create the Nginx site:

    bash
    sudo tee /etc/nginx/sites-available/flowise > /dev/null <<'EOF'
    server {
        listen 80;
        server_name flowise.yourdomain.com;

    # Certbot will replace this with an HTTPS redirect + TLS config. location / { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1;

    # WebSocket upgrade — required for Flowise streaming responses proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";

    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;

    # Streaming prediction responses — disable buffering proxy_buffering off; proxy_read_timeout 600s; proxy_send_timeout 600s;

    # Allow large file uploads (PDFs, CSVs for document stores) client_max_body_size 100m; } } EOF

    sudo ln -s /etc/nginx/sites-available/flowise /etc/nginx/sites-enabled/ sudo nginx -t && sudo systemctl reload nginx

    Issue the TLS certificate:

    bash
    sudo certbot --nginx -d flowise.yourdomain.com

    Certbot rewrites the site to force HTTPS, sets up auto-renewal, and reloads Nginx. Verify in a browser: https://flowise.yourdomain.com should present the Flowise login with a valid certificate. Log in with the FLOWISE_USERNAME / FLOWISE_PASSWORD you set in Step 5.

    Step 9: Build Your First Chatflow

    Log into Flowise and click Chatflows → Add New. You land on an empty canvas. We will build a minimal "Chat with an LLM" workflow to confirm everything works end to end.

  • Click the + icon on the left sidebar to open the node palette.
  • Search for ChatOpenAI (or ChatAnthropic, ChatOllama, whatever you prefer) and drag it onto the canvas.
  • Click the node, open its credential dropdown, and Create New. Paste your API key — Flowise encrypts it with FLOWISE_SECRETKEY_OVERWRITE before storing it in Postgres.
  • Pick a model (e.g. gpt-4o-mini), set temperature to 0.3.
  • Add a Conversation Chain node (search "Conversation Chain"). This gives you multi-turn memory.
  • Add a Buffer Memory node and connect it to the Conversation Chain's Memory input.
  • Connect the ChatOpenAI node's output to the Conversation Chain's Chat Model input.
  • Click Save Chatflow in the top-right, give it a name, and save.
  • A chat pane appears on the right side of the canvas. Type "hello" — if the LLM responds, the full loop (browser → Nginx → Flowise → OpenAI → Postgres for memory → back) is working.

    Step 10: Add Tools, Retrievers, and the Ollama Connector

    The real value of Flowise shows up when you wire an LLM to your own data and tools. Here is a compact RAG example that answers questions from a PDF using a local Ollama model.

    Wire Up Ollama

    If you followed the Ollama install guide on the same VPS, Flowise can reach it on http://127.0.0.1:11434.

  • From the node palette, drag ChatOllama onto the canvas.
  • Set Base URL to http://127.0.0.1:11434.
  • Set Model Name to llama3.1 (or whatever you pulled with ollama pull).
  • Set Temperature to 0.2 for factual Q&A.
  • If Flowise is running under PM2 on the host, 127.0.0.1 is correct. If Flowise is in Docker, use http://host.docker.internal:11434 (Linux Docker requires adding extra_hosts: ["host.docker.internal:host-gateway"] to the compose file), or run Ollama in the same Docker network and use http://ollama:11434.

    Build the RAG Pipeline

  • Document Loader: drag a PDF File loader. Upload a PDF through its input.
  • Text Splitter: drag Recursive Character Text Splitter. Set chunk size to 1000, overlap 200. Connect the PDF loader's output to its input.
  • Embeddings: drag Ollama Embeddings. Point it at http://127.0.0.1:11434 and model nomic-embed-text (run ollama pull nomic-embed-text on the host first).
  • Vector Store: drag In-Memory Vector Store (for a quick test) or Qdrant / Postgres (pgvector, for production). Connect the splitter's output to Document and the embeddings' output to Embeddings.
  • Retriever: the vector store exposes a retriever output. Drag a Conversational Retrieval QA Chain node. Connect:
  • - ChatOllama → Chat Model - Vector Store retriever → Vector Store Retriever - Buffer Memory → Memory
  • Save, then ask a question about the PDF in the chat pane. Flowise embeds the query, retrieves the top-k chunks from the vector store, stuffs them into the prompt, and asks Llama 3.1 to answer grounded in the retrieved context.
  • Add Tools to Create an Agent

    If you want the model to decide when to fetch data or call APIs, swap the chain for an agent:

  • Drag Tool Agent or OpenAI Function Agent (Ollama also supports tool calling with llama3.1 and qwen2.5).
  • Add tool nodes: Calculator, SerpAPI (web search), Custom Tool (arbitrary JavaScript), or Request (HTTP calls to any API you own).
  • Connect each tool to the agent's Tools array input.
  • The agent now inspects the user question, picks a tool, executes it, and loops until it has an answer.
  • Step 11: Call the Chatflow via API and Embed the Widget

    Every chatflow in Flowise is a deployable API endpoint and an embeddable widget the moment you save it.

    Generate an API Key

  • In the Flowise sidebar, click API Keys → Add New.
  • Name it (e.g. website-embed) and copy the generated key — you will not see it again.
  • Because you set APIKEY_STORAGE_TYPE=db, this key persists across restarts and container rebuilds.

    Secure the Chatflow

  • Open your chatflow, click the gear icon, then API Keys in the chatflow settings.
  • Select the API key you just created. Only requests bearing this key are now accepted.
  • Call the Prediction Endpoint

    In the chatflow canvas, click the API Endpoint tab. Flowise shows you ready-to-copy snippets. The curl form looks like:

    bash
    curl -X POST https://flowise.yourdomain.com/api/v1/prediction/CHATFLOW_ID \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "question": "Summarise the uploaded PDF in 3 bullet points.",
        "overrideConfig": {
          "sessionId": "user-123"
        }
      }'

    Expected response:

    json
    {
      "text": "- The document introduces ...\n- It then argues that ...\n- Finally it concludes ...",
      "question": "Summarise the uploaded PDF in 3 bullet points.",
      "chatId": "abc-123",
      "chatMessageId": "msg-456",
      "sessionId": "user-123",
      "sourceDocuments": [...]
    }

    The sessionId field is how you keep per-user memory separate. Pass a stable user identifier from your application and each user gets their own conversation history.

    Python Example

    python
    import requests

    r = requests.post( "https://flowise.yourdomain.com/api/v1/prediction/CHATFLOW_ID", headers={"Authorization": "Bearer YOUR_API_KEY"}, json={"question": "What's our refund policy?", "overrideConfig": {"sessionId": "user-42"}}, timeout=120, ) print(r.json()["text"])

    Embed the Chat Widget

    Click the Embed tab in the chatflow view. Flowise generates a script tag:

    html
    <script type="module">
      import Chatbot from "https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js";
      Chatbot.init({
        chatflowid: "CHATFLOW_ID",
        apiHost: "https://flowise.yourdomain.com",
        chatflowConfig: {},
        theme: {
          button: { backgroundColor: "#3B81F6", right: 20, bottom: 20 },
          chatWindow: { welcomeMessage: "Hi! Ask me anything about our docs." }
        }
      });
    </script>

    Paste that into any HTML page (your marketing site, WordPress theme footer, SaaS app shell) and a floating chat bubble appears that talks directly to your self-hosted Flowise. The embed also supports a full-page mode via Chatbot.initFull({...}) if you want the chatflow to fill its own page.

    Hardening and Backups

    A production Flowise deployment needs three more things: regular backups, secret-key storage, and basic monitoring.

    Back Up PostgreSQL

    Create a daily dump:

    bash
    sudo tee /etc/cron.daily/flowise-backup > /dev/null <<'EOF'
    #!/bin/bash
    set -e
    BACKUP_DIR=/var/backups/flowise
    mkdir -p $BACKUP_DIR
    STAMP=$(date +%F)
    PGPASSWORD='CHANGE_ME_STRONG_PASSWORD' pg_dump -h 127.0.0.1 -U flowise flowise \
      | gzip > $BACKUP_DIR/flowise-$STAMP.sql.gz
    find $BACKUP_DIR -name 'flowise-*.sql.gz' -mtime +14 -delete
    EOF
    sudo chmod +x /etc/cron.daily/flowise-backup

    Back up /var/lib/flowise/storage (uploaded documents) with the same cron job or via rsync to another server.

    Protect FLOWISE_SECRETKEY_OVERWRITE

    Store /etc/flowise/.env in a password manager or an encrypted backup. If you lose this key, every credential in the credential table becomes unrecoverable and you will have to re-enter every API key.

    Rate-Limit the API

    Add rate limiting to the Nginx config to blunt brute-force attempts against the prediction endpoint:

    nginx
    limit_req_zone $binary_remote_addr zone=flowise_api:10m rate=60r/m;

    server { # ... existing config ...

    location /api/ { limit_req zone=flowise_api burst=30 nodelay; proxy_pass http://127.0.0.1:3000; # ... existing proxy headers ... } }

    Monitor with Uptime Kuma

    Point an HTTP(s) monitor at https://flowise.yourdomain.com/api/v1/ping every 60 seconds. Flowise returns pong. Configure alerts so you know before your users do.

    Troubleshooting

    ProblemCauseSolution
    flowise: command not found after npm install -gGlobal npm prefix not on PATHwhich node && npm root -g, then add that bin directory to PATH, or reinstall using sudo npm install -g flowise
    ECONNREFUSED 127.0.0.1:5432 on startupPostgreSQL not running or wrong passwordsudo systemctl status postgresql; test with psql -h 127.0.0.1 -U flowise -d flowise
    relation "chat_flow" does not existFlowise could not run migrations because user lacks schema permissions\c flowise then GRANT ALL ON SCHEMA public TO flowise;
    Login screen loops back after submittingMissing or mismatched FLOWISE_USERNAME/FLOWISE_PASSWORD envConfirm both variables are set in /etc/flowise/.env and that PM2 was restarted: pm2 restart flowise --update-env
    Streaming responses stall in the browserNginx buffering enabledEnsure proxy_buffering off; and proxy_http_version 1.1; are present, reload Nginx
    Error: Invalid credentials when clicking an LLM nodeFLOWISE_SECRETKEY_OVERWRITE changed after credentials were storedRestore the original key from backup, or delete and re-enter each credential in the UI
    413 Request Entity Too Large when uploading PDFsclient_max_body_size too smallSet client_max_body_size 100m; in the Nginx server block and reload
    Ollama node returns fetch failedFlowise in Docker, Ollama on hostUse http://host.docker.internal:11434 and add extra_hosts in compose
    PM2 says online but port 3000 does not respondFlowise crashed after boot with exit code 1pm2 logs flowise --err --lines 100 — usually a DB connection issue
    EADDRINUSE: address already in use :::3000Another process bound to 3000sudo lsof -i :3000, stop the conflicting process or change PORT in .env

    Useful PM2 Commands

    bash
    pm2 logs flowise                   # Tail all logs
    pm2 logs flowise --err             # Error log only
    pm2 restart flowise --update-env   # Reload after editing /etc/flowise/.env
    pm2 stop flowise                   # Stop without removing
    pm2 delete flowise                 # Remove from PM2
    pm2 monit                          # Interactive CPU/RAM monitor

    FAQ

    What is Flowise used for?

    Flowise is an open-source, low-code visual builder for LangChain and LlamaIndex. Teams use it to design chatbots, retrieval-augmented generation (RAG) pipelines, AI agents, document Q&A systems, and LLM-powered internal tools without writing Python or TypeScript. Each saved workflow becomes a REST API endpoint at /api/v1/prediction/{chatflowId} and an embeddable chat widget, so you can ship an internal tool or a customer-facing bot from the same canvas.

    How much RAM does Flowise need?

    Flowise itself is lightweight — a freshly booted instance with PostgreSQL idle uses about 250-400 MB. Memory requirements grow with what you plug into it. If you run a local LLM such as Llama 3.1 8B on the same VPS via Ollama, budget 12 GB total (8 GB for the model, ~2 GB for Flowise + Postgres + Nginx, rest for the OS). If you only call hosted APIs (OpenAI, Anthropic, Groq, Google), a 4 GB VPS is enough for small teams; scale to 8 GB once you start storing embeddings in Qdrant or pgvector on the same box.

    Should I use SQLite or PostgreSQL in production?

    Use PostgreSQL. SQLite is fine for local evaluation and single-user prototyping, but it is a single-writer engine — under concurrent API load you will hit "database is locked" errors, especially on streaming predictions that hold write transactions. PostgreSQL gives you concurrent access, point-in-time recovery with pg_basebackup + WAL archiving, proper connection pooling, and the option to turn on pgvector and store embeddings in the same database you already back up. The performance difference is negligible for Flowise workloads; the reliability difference is not.

    How do I call a Flowise chatflow from my application?

    Every chatflow exposes a prediction endpoint at POST /api/v1/prediction/{chatflowId}. Send a JSON body with a question field (and optionally overrideConfig.sessionId to keep per-user memory separate), include a bearer API key if the chatflow is protected, and Flowise returns the model output plus any sourceDocuments from retrievers. The Flowise UI generates copy-paste snippets for curl, Python (requests), and JavaScript (fetch) in the API Endpoint tab of every chatflow. For streaming, open a POST with "streaming": true and parse the newline-delimited events the server sends.

    Can Flowise use Ollama for local inference?

    Yes. Flowise ships ChatOllama and Ollama Embeddings nodes out of the box. Point them at http://127.0.0.1:11434 (or your remote Ollama server), pick a model such as llama3.1, mistral, or qwen2.5, and you have a fully local RAG or agent workflow with no external API keys required. Make sure to ollama pull both your chat model and an embeddings model (e.g. nomic-embed-text) before wiring them into the canvas. Combined with a local vector store like pgvector or Qdrant, the entire inference path stays on your VPS.

    How does Flowise compare to LangFlow and n8n?

    Flowise and LangFlow are both visual builders on top of LangChain. Flowise (TypeScript, Node.js) tends to be more stable, has a bigger integration library, and is easier to self-host behind Nginx. LangFlow (Python) is closer to the LangChain source and better for teams that want to read and extend the Python code directly. n8n is a general workflow automation tool (think Zapier) with LangChain nodes added recently — it is the right choice when most of your flow is "when a form is submitted, write to Airtable, then ask an LLM to summarise, then post to Slack." Use Flowise for LLM-heavy workflows and n8n for integration-heavy workflows; many teams run both side by side and let n8n call Flowise chatflows via HTTP when it needs an AI step. See the n8n install guide for a matching setup.

    How do I back up everything Flowise needs to restore?

    Three things: the PostgreSQL database (dump with pg_dump flowise | gzip), the storage directory /var/lib/flowise/storage (uploaded documents), and the .env file — specifically FLOWISE_SECRETKEY_OVERWRITE, which is the AES key used to decrypt every stored credential. Losing the database loses your chatflows and API keys. Losing the secret key means the encrypted credentials in the database are unrecoverable and you have to re-enter every OpenAI / Pinecone / Anthropic key manually.

    Next Steps

    Your Flowise instance is now running behind TLS, storing state in PostgreSQL, and supervised by PM2. Recommended things to do next:

    • Install Ollama for local inference — follow the Ollama install guide to run Llama 3.1, Mistral, or Gemma 2 on the same VPS and wire them into Flowise via the ChatOllama node.
    • Add a polished chat UI — Open WebUI gives your team a ChatGPT-style interface that can point at either Flowise chatflows or Ollama directly, with user accounts and conversation history.
    • Automate around Flowise with n8n — deploy n8n and use its HTTP node to call Flowise chatflows from Slack, Telegram, email inboxes, form submissions, or scheduled jobs.
    • Move embeddings into pgvector or Qdrant — the in-memory vector store is great for demos but resets on every restart. A persistent store lets you index a knowledge base once and query it for months.
    • Explore marketplace chatflows — the official Flowise docs ship dozens of ready-made chatflow templates (customer support agent, SQL agent, PDF Q&A, web scraper agent) you can import with one click and adapt.
    • Add observability — Flowise has a built-in Analytics panel, and it also exports OpenTelemetry traces. Point it at your existing Grafana/Tempo stack if you have one.

    Deploy Flowise on a production-grade VPS
    >
    Our CloudCore Professional plan gives you exactly the right shape of machine for Flowise plus a local LLM stack:
    >
    - 6 vCPU cores, 12 GB RAM, 100 GB NVMe SSD
    - Unmetered bandwidth, EU or US locations
    - Pre-installed Ubuntu 24.04 LTS
    - Full root access, hourly snapshots available
    - EUR 19.99/month
    >
    Launch a CloudCore Professional VPS and have Flowise running in 25 minutes.

    Was this article helpful?

    ← Back to Install GuidesBrowse all categories →

    Still have questions?

    Contact Support →Submit a Ticket