DEV Community

Cover image for Deploying Flowise - Open-Source Visual LLM Workflow Builder
Sanskriti Harmukh for Vultr

Posted on with Aashish Chaurasiya Originally published at docs.vultr.com

Deploying Flowise - Open-Source Visual LLM Workflow Builder

Flowise is an open-source, low-code platform for building applications powered by large language models (LLMs) through a visual, drag-and-drop interface. Rather than writing custom integration code, developers connect prompts, models, memory, and external data sources as nodes on a canvas to build a working chatflow, supporting use cases such as chatbots, document question-and-answer systems, and internal automation pipelines. This guide deploys Flowise on a Linux server using Docker Compose, configures Traefik for automatic HTTPS, and builds and tests a chatflow combining a prompt template, chat model, conversation chain, and memory component. By the end, you'll have a working Flowise instance running a tested chatflow.


Prerequisites

Before you begin, you need to:

  • Have access to a Linux-based server with at least 2 CPU cores and 4 GB of RAM as a non-root user with sudo privileges.
  • Install Docker and Docker Compose.
  • Configure a domain A record, such as flowise.example.com, pointing to your server's IP address.
  • Have an API key from a supported LLM provider, or access to a self-hosted model endpoint.

Set Up the Directory Structure, Configuration, and Environment Variables

Flowise requires configuration for domain routing, authentication secrets, and database connectivity. These settings are defined using environment variables and consumed by Docker Compose during deployment. Storing them in an .env file keeps sensitive credentials separate from the compose manifest and simplifies configuration management.

1. Create the project directory and a subdirectory for persistent Flowise data:

$ mkdir -p ~/flowise/flowise-data
Enter fullscreen mode Exit fullscreen mode

In the above command:

  • flowise-data: Stores Flowise credentials, secrets, logs, and uploaded files, and is mounted into the container to persist this data across restarts.

2. Navigate to the project directory:

$ cd ~/flowise
Enter fullscreen mode Exit fullscreen mode

3. Generate the authentication secrets used to secure the application's login system:

$ openssl rand -hex 32
Enter fullscreen mode Exit fullscreen mode

Run this command 4 times. Copy each output for use in the next step.

4. Create an .env file to store your domain, authentication, and database configurations:

$ nano .env
Enter fullscreen mode Exit fullscreen mode

5. Add the following values:

# Domain and TLS
DOMAIN=flowise.example.com
LETSENCRYPT_EMAIL=admin@example.com

# Application
PORT=3000
APP_URL=https://flowise.example.com

# JWT Authentication Secrets
JWT_AUTH_TOKEN_SECRET=JWT-AUTH-TOKEN-SECRET
JWT_REFRESH_TOKEN_SECRET=JWT-REFRESH-TOKEN-SECRET
EXPRESS_SESSION_SECRET=EXPRESS-SESSION-SECRET
TOKEN_HASH_SECRET=TOKEN-HASH-SECRET

# Flowise Storage Paths
SECRETKEY_PATH=/root/.flowise
LOG_PATH=/root/.flowise/logs
BLOB_STORAGE_PATH=/root/.flowise/storage

# Database Connection (Flowise)
DATABASE_TYPE=postgres
DATABASE_HOST=postgres
DATABASE_PORT=5432
DATABASE_NAME=flowise
DATABASE_USER=flowise
DATABASE_PASSWORD=DB-PASSWORD

# PostgreSQL Container
POSTGRES_DB=flowise
POSTGRES_USER=flowise
POSTGRES_PASSWORD=DB-PASSWORD
Enter fullscreen mode Exit fullscreen mode

Replace:

  • flowise.example.com with your domain name that points to your server's IP address.
  • admin@example.com with your email address for Let's Encrypt notifications.
  • JWT-AUTH-TOKEN-SECRET, JWT-REFRESH-TOKEN-SECRET, EXPRESS-SESSION-SECRET, and TOKEN-HASH-SECRET with the four values generated in the previous step.
  • DB-PASSWORD with a strong password, used for both DATABASE_PASSWORD and POSTGRES_PASSWORD. Both values must match.

Save and close the file.

Deploy Flowise with Docker Compose

This deployment uses Docker Compose to run PostgreSQL as the backend for Flowise data and the Flowise server for building and running chatflows. Traefik acts as a reverse proxy for HTTPS and domain routing. Flowise's built-in authentication secures access to the web interface and API.

1. If your user account isn't already in the docker group, add it now:

$ sudo usermod -aG docker $USER
Enter fullscreen mode Exit fullscreen mode

2. Apply the new group membership to the current shell session:

$ newgrp docker
Enter fullscreen mode Exit fullscreen mode

3. Create the Docker Compose manifest file:

$ nano docker-compose.yaml
Enter fullscreen mode Exit fullscreen mode

4. Add the following contents:

services:
  traefik:
    image: traefik:v3.6
    container_name: traefik
    restart: unless-stopped
    command:
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      - "--certificatesresolvers.le.acme.httpchallenge=true"
      - "--certificatesresolvers.le.acme.httpchallenge.entrypoint=web"
      - "--certificatesresolvers.le.acme.email=${LETSENCRYPT_EMAIL}"
      - "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./letsencrypt:/letsencrypt

  postgres:
    image: postgres:16
    container_name: postgres
    restart: unless-stopped
    environment:
      POSTGRES_DB: ${POSTGRES_DB}
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    volumes:
      - postgres-data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
      interval: 10s
      timeout: 5s
      retries: 5

  flowise:
    image: flowiseai/flowise:3.1.3
    container_name: flowise
    restart: unless-stopped
    environment:
      PORT: ${PORT}
      APP_URL: ${APP_URL}
      JWT_AUTH_TOKEN_SECRET: ${JWT_AUTH_TOKEN_SECRET}
      JWT_REFRESH_TOKEN_SECRET: ${JWT_REFRESH_TOKEN_SECRET}
      EXPRESS_SESSION_SECRET: ${EXPRESS_SESSION_SECRET}
      TOKEN_HASH_SECRET: ${TOKEN_HASH_SECRET}
      SECRETKEY_PATH: ${SECRETKEY_PATH}
      LOG_PATH: ${LOG_PATH}
      BLOB_STORAGE_PATH: ${BLOB_STORAGE_PATH}
      DATABASE_TYPE: ${DATABASE_TYPE}
      DATABASE_HOST: ${DATABASE_HOST}
      DATABASE_PORT: ${DATABASE_PORT}
      DATABASE_NAME: ${DATABASE_NAME}
      DATABASE_USER: ${DATABASE_USER}
      DATABASE_PASSWORD: ${DATABASE_PASSWORD}
    volumes:
      - ./flowise-data:/root/.flowise
    depends_on:
      postgres:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:${PORT}/api/v1/ping"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 30s
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.flowise.rule=Host(`${DOMAIN}`)"
      - "traefik.http.routers.flowise.entrypoints=websecure"
      - "traefik.http.routers.flowise.tls=true"
      - "traefik.http.routers.flowise.tls.certresolver=le"
      - "traefik.http.services.flowise.loadbalancer.server.port=${PORT}"

volumes:
  postgres-data:
Enter fullscreen mode Exit fullscreen mode

Save and close the file.

In the above manifest:

flowise service

  • Runs the official flowiseai/flowise image, pinned to version 3.1.3.
  • Connects to PostgreSQL using the DATABASE_* variables, and does not start until the postgres service reports a healthy status.
  • Uses a persistent volume mount, ./flowise-data:/root/.flowise, to retain credentials, secrets, logs, and uploaded files across restarts.
  • Includes a health check against the /api/v1/ping endpoint to confirm the application has started successfully.
  • Has no ports exposed directly to the host. Traefik discovers Flowise through Docker labels and routes traffic for ${DOMAIN} to its internal port 3000.

postgres service

  • Runs the official postgres:16 image.
  • Stores database files in a named volume, postgres-data, so data persists across container restarts.
  • Includes a health check using pg_isready, which Flowise's depends_on condition waits on before starting.

traefik service

  • Acts as the reverse proxy and TLS terminator for Flowise.
  • Listens on ports 80 and 443 on the host, and automatically redirects HTTP traffic to HTTPS.
  • Stores Let's Encrypt ACME certificates in the ./letsencrypt directory.
  • Uses the Docker socket (read-only) to discover services and apply routing rules dynamically.

5. Start the services:

$ docker compose up -d
Enter fullscreen mode Exit fullscreen mode

6. Check that the containers are running:

$ docker compose ps
Enter fullscreen mode Exit fullscreen mode

The output displays three running containers. Flowise and PostgreSQL should both report a healthy status.

7. Check the Flowise logs to confirm the application started successfully:

$ docker compose logs flowise
Enter fullscreen mode Exit fullscreen mode

A successful startup includes messages confirming the database connection, authentication system, and node pool were all initialized, ending with a message indicating the server is listening on port 3000. The log may include Error during initDatabase entries for individual agent nodes such as ReActAgentChat or ReActAgentLLM, referencing a missing ./utils/uuid export. These come from a dependency resolution issue in the bundled @langchain/core package, not from this deployment, and don't prevent the server from starting.

Access and Configure Flowise

Flowise requires an administrator account, created directly through the web interface on first launch.

  1. Open your web browser and navigate to https://flowise.example.com, replacing flowise.example.com with your configured domain name.

Flowise Setup Screen

On first launch, Flowise displays a setup page prompting you to create your administrator account.

  1. Enter an administrator name, email address, and password, then submit the form to create the account and access the dashboard.

  2. Verify that the dashboard is accessible and that a Chatflows section is visible in the navigation.

Build and Test a Chatflow

A chatflow connects nodes on the canvas into a working pipeline. A prompt template shapes the input sent to the model, a chat model generates the response, a memory component persists the conversation history between turns, and a conversation chain wires the three together so each response accounts for prior messages.

  1. From the dashboard, click + Add New to create a chatflow.

Flowise Blank Canvas

  1. Add a Chat Prompt Template node to the canvas. Click the circular button in the upper-left corner of the canvas to open the Add Nodes panel, search for Chat Prompt Template under the LangChain category, then drag it onto the canvas. Set the following fields:
  • System Message: You are a helpful assistant.
  • Human Message: {input}

The Human Message field must use {input} as the variable name. The Conversation Chain node added later in this guide passes the user's chat message into a variable named input.

  1. Add a chat model node to the canvas for your LLM provider. Search for your provider's name under the LangChain category, select the matching node listed under Chat Models, then drag it onto the canvas.

  2. Click Connect Credential, then - Create New -. Enter a Credential Name and your LLM provider's API key, then click Add.

  3. Enter a model identifier in the Model Name field, such as openai/gpt-3.5-turbo.

  4. Search for Buffer Memory under the LangChain category and drag it onto the canvas to give the chatflow conversation history.

  5. Search for Conversation Chain under the LangChain category and drag it onto the canvas. This node wires the prompt template, chat model, and memory together in the next step.

  6. Drag a connection line from each node's output dot to the matching input dot on Conversation Chain:

  • Chat Prompt Template output to the Conversation Chain's Chat Prompt Template input.
  • Chat model output to the Conversation Chain's Chat Model input.
  • Buffer Memory output to the Conversation Chain's Memory input.
  1. Save the chatflow using the save button in the top right corner of the canvas.

On first save, you are prompted to name the chatflow. Any further changes to the chatflow must be saved again using the same button.

Flowise Chartflow

  1. Open the built-in chat panel and send a test message, such as What is Flowise?.

    A valid response from the model confirms that the prompt, chat model, and conversation chain are connected correctly.

Next Steps

  • Connect document loaders and a vector store to build a document question-and-answer chatflow
  • Integrate external APIs as custom tools for agent-based chatflows
  • Scale the server resources for production traffic and concurrent chatflow sessions
  • Explore Flowise's API endpoints to embed chatflows directly into your own applications

For the full guide with additional tips, visit the original article on Vultr Docs.

Top comments (0)