0 Comments

  • Node.js v22.19.0 to /usr/local/bin/node
  • npm v10.9.3 to /usr/local/bin/npm

Make sure that /usr/local/bin is in your $PATH.

http://host.docker.internal:11434

https://nodejs.org/en/download

Flowise on Mac (M1/M2/M3) with Docker + Local Ollama

Last updated: 2025-08-31

This guide shows how to run Flowise on an Apple Silicon Mac (M1/M2/M3) using Docker, persist your data,
and connect Flowise to Ollama running on the host.


Overview

  • Recommended: Docker Compose setup that just works on macOS
  • Persistence: SQLite DB + configs under ./flowise_data (easy to back up)
  • Auth: FLOWISE_USERNAME / FLOWISE_PASSWORD
  • Ollama: Flowise container talks to host’s Ollama at http://host.docker.internal:11434
  • Known CLI pitfalls are avoided (no -c / extra start args in Compose)

Quick Start (Docker)

  1. Create a new folder (e.g., flowise_ai_m3_laptop) and place these two files in it:

    docker-compose.yml

    services:
      flowise:
        image: flowiseai/flowise:latest
        restart: unless-stopped
        environment:
          - PORT=${PORT}
          - FLOWISE_USERNAME=${FLOWISE_USERNAME}
          - FLOWISE_PASSWORD=${FLOWISE_PASSWORD}
          - LOG_PATH=/root/.flowise/logs
          - LOG_LEVEL=info
          - DATABASE_PATH=/root/.flowise/flowise.sqlite
          # Preconfigure Ollama endpoint on the host (Docker Desktop: host.docker.internal)
          - OLLAMA_BASE_URL=${OLLAMA_BASE_URL}
        ports:
          - "${PORT}:${PORT}"
        volumes:
          - ./flowise_data:/root/.flowise
        healthcheck:
          test: ["CMD", "wget", "-qO-", "http://localhost:${PORT}/api/v1/config"]
          interval: 15s
          timeout: 5s
          retries: 10
          start_period: 15s
    

    .env (create from this example)

    PORT=4444
    FLOWISE_USERNAME=user
    FLOWISE_PASSWORD=changeme-strong
    # Docker on macOS can reach the host via this DNS name
    OLLAMA_BASE_URL=http://host.docker.internal:11434
    
  2. Start:
    docker compose up -d
  3. Open:
    http://localhost:4444

Data is persisted in the flowise_data/ folder next to your compose file:

flowise_data/
  ├─ flowise.sqlite    # main DB (persisted)
  ├─ logs/             # logs
  └─ files/ …          # uploads, etc.

Connect Flowise to Ollama (host)

Ensure Ollama is running locally on the Mac:

# start Ollama if not already running
ollama serve

# optional: list models (OpenAI-style)
curl -s http://127.0.0.1:11434/v1/models | jq .

From the container, verify connectivity to the host:

docker compose exec flowise wget -qO- http://host.docker.internal:11434/v1/models | head

In Flowise UI:

  • Add LLM → Ollama (or OpenAI (Compatible)).
  • Base URL: http://host.docker.internal:11434
  • Model: name of your local model (e.g., llama3.1:8b, a 7B-parameter local model, etc.).
  • No API key required for local Ollama.

Optional: Run Flowise without Docker (npx)

If you prefer local Node:

  1. Install Node 18.15+ or 20+ (e.g., via Homebrew).
  2. Start Flowise with the correct flags (note the uppercase --PORT=):
npx flowise start --PORT=4444 --FLOWISE_USERNAME=user --FLOWISE_PASSWORD=1234

If you hit missing-module errors on macOS (e.g., Cannot find module 'turndown'), try:

npm uninstall -g flowise || true
npm cache clean --force
npm install -g flowise
npm install -g turndown @opentelemetry/exporter-trace-otlp-proto @opentelemetry/exporter-trace-otlp-grpc @opentelemetry/sdk-trace-node langchainhub
npx flowise start --PORT=4444 --FLOWISE_USERNAME=user --FLOWISE_PASSWORD=1234

To avoid permission issues with Homebrew’s prefix, set a user-local npm prefix:

mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zprofile
source ~/.zprofile
npm install -g flowise

Backups

Simple backup of the SQLite DB:

docker compose stop flowise
cp flowise_data/flowise.sqlite flowise_data/flowise.sqlite.bak.$(date +%F)
docker compose start flowise

Troubleshooting

  • CLI arg errors (-c or extra start unexpected)
    Don’t pass custom command: in Compose. The official image already starts Flowise via its ENTRYPOINT.
    The compose above omits command: on purpose.
  • version: key warning
    Newer Compose ignores the top-level version: key. Remove it to silence the warning.
  • Port already in use
    Change PORT in .env and re-up:
    docker compose down
    PORT=4488 docker compose up -d
    
  • Ollama not reachable
    • Confirm ollama serve is active on the Mac.
    • From the container, wget -qO- http://host.docker.internal:11434/v1/models should return JSON.
    • Double-check any firewall or VPN rules.

Security Notes

  • Change FLOWISE_PASSWORD to a strong secret.
  • If exposing beyond localhost, place Flowise behind a reverse proxy (Traefik/Caddy/Nginx) with TLS.
  • Consider disabling telemetry if required by your policy (see Flowise docs).

Stop / Update

docker compose stop              # stop
docker compose down              # stop + remove
docker compose pull && docker compose up -d  # update image and restart
docker compose logs -f flowise   # follow logs

That’s it! You now have a reproducible Flowise setup on Apple Silicon with durable storage and direct
access to your host’s Ollama.

Related Posts