Skip to main content

Deploying Flowise to Fly.io

Flowise is an amazing tool for building AI flows quickly and Fly.io is a great platform for deploying your applications. In this guide, we will show you how to deploy a Flowise server to the Fly.io network.

Architecture Overview

Here's how Flowise runs on Fly.io:

graph TB
    subgraph "Internet"
        Users[AI Flow Builders]
        APIs[External AI APIs<br/>OpenAI, Anthropic, etc.]
    end
    
    subgraph "Fly.io Platform"
        Proxy[Fly Proxy<br/>HTTPS Termination]
        
        subgraph "Flowise Container"
            Flowise[Flowise Server<br/>Port 3000]
            WebUI[Web Interface<br/>Flow Builder]
            FlowEngine[Flow Execution Engine]
        end
        
        subgraph "Persistent Storage"
            Volume[(Fly Volume<br/>/data)]
            DB[SQLite Database]
            Blobs[File Storage]
            Keys[API Keys & Secrets]
        end
    end
    
    Users -->|HTTPS| Proxy
    Proxy -->|Port 3000| Flowise
    Flowise <--> WebUI
    Flowise <--> FlowEngine
    
    FlowEngine <-->|Execute Flows| APIs
    
    Flowise <-->|Store Data| Volume
    Volume --> DB
    Volume --> Blobs
    Volume --> Keys
    
    style Flowise fill:#90EE90
    style Volume fill:#87CEEB
    style Proxy fill:#FFE4B5

Create the docker file

Start by copying the below code into a Dockerfile and make modifications as needed. This guide is setup to use the latest version of Flowise and assumes you are not using a separate database. It is super short and pretty much all it does is set up the right folders for you and install the packages.

FROM node:20-bookworm-slim

USER root

# You can install a specific version like: [email protected]
WORKDIR /app
RUN npm install flowise

ENV PATH="/usr/bin/npx:$PATH"

EXPOSE 3000
CMD ["npx","flowise","start"]

Now you can create your Fly.toml file. This file is used to configure your Fly.io deployment. Here is an example of what you might use. You shouldn't have to modify much on it. The Paths are important to make sure your data gets preserved between deployments.

app = 'your-flowise-app'
primary_region = 'ord'

[build]

[env]
  FLOWISE_PASSWORD = 'super-secret-password'
  FLOWISE_USERNAME = 'your-username'
  BLOB_STORAGE_PATH = '/data'
  DATABASE_PATH = '/data'
  SECRETKEY_PATH = '/data'
  APIKEY_PATH = '/data'

[[mounts]]
  source = 'flowise_vol'
  destination = '/data'

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 1

  [http_service.concurrency]
    type = 'connections'
    hard_limit = 100
    soft_limit = 50

[[vm]]
  cpu_kind = 'shared'
  cpus = 1
  memory_mb = 512

Launching your Flowise server

You are almost there, nice job! Just a few more commands left to run to set up your volume and launch the server. When you launch the app, tell it to use the current settings found in the toml file. The deployment takes a few minutes, so be patient.

flyctl launch
flyctl volumes create flowise_vol -r ord -size 1
flyctl deploy

That's it! You should now have a Flowise server running on the Fly.io network!

You can use the following command to check the status and logs of your server.

flyctl status
flyctl logs

Updates

The Flowise team is great about keeping their software up to date. If you want to update your server, you can do so by running the following commands.

flyctl deploy

And that is it!

Need help with your project or have questions?

We specialize in AI automation, custom integrations, and intelligent workflows tailored to your business needs.

Whether you need help deploying, building, implementing, or creating a solution - or just want expert guidance on your project - we're here to help.

Contact us today to discuss your project.