Skip to main content
Flowise is built as a monorepo with three main modules. This guide will help you set up your local development environment.

Prerequisites

Before you begin, ensure you have the following installed:
  • Node.js >= 18.15.0 (or v20+)
  • PNPM v10.26.0 or higher
Install PNPM globally if you haven’t already:
npm i -g pnpm
The project is configured to use pnpm v10. Using other package managers may cause issues.

Repository Structure

Flowise has 3 different modules in a single mono repository:
  • server: Node.js backend to serve API logics
  • ui: React frontend
  • components: Third-party nodes integrations
  • api-documentation: Auto-generated swagger-ui API docs from express

Setup Instructions

1

Clone the repository

git clone https://github.com/FlowiseAI/Flowise.git
cd Flowise
2

Install dependencies

Install all dependencies for all modules:
pnpm install
3

Build the code

Build all the code:
pnpm build
Exit code 134 (JavaScript heap out of memory)?If you encounter this error, increase the Node.js heap size:
export NODE_OPTIONS="--max-old-space-size=4096"
pnpm build
4

Start the application

Start Flowise in production mode:
pnpm start
You can now access the app on http://localhost:3000

Development Mode

For active development with hot reloading:
1

Configure environment variables

Create .env files for both UI and server packages:In packages/ui/.env:
VITE_PORT=8080
In packages/server/.env:
PORT=3000
Refer to .env.example files in each package for all available options.
2

Start development server

Run the development build:
pnpm dev
Any code changes will automatically reload the app on http://localhost:8080
3

Rebuilding components

For changes made in packages/concepts/nodes-and-edges, you need to rebuild:
pnpm build
The build process will pick up your changes and make them available in the UI.

Testing Your Changes

Before submitting your changes, ensure everything works in production mode:
pnpm build
pnpm start
Verify that your changes work correctly on http://localhost:3000

Common Development Tasks

Running specific package scripts

You can run scripts in specific packages using pnpm filters:
# Run build only in the server package
pnpm --filter server build

# Run dev only in the ui package
pnpm --filter ui dev

Cleaning build artifacts

# Clean all packages
pnpm clean

# Complete cleanup including node_modules
pnpm nuke

Linting and formatting

# Run ESLint
pnpm lint

# Fix linting issues
pnpm lint-fix

# Format code with Prettier
pnpm format

Environment Variables

Flowise supports various environment variables for configuration. Here are some commonly used ones:
VariableDescriptionDefault
PORTThe HTTP port Flowise runs on3000
VITE_PORTThe port for development UI8080
DEBUGPrint logs from components-
DATABASE_TYPEType of database (sqlite, mysql, postgres)sqlite
DATABASE_PATHLocation where database is saved~/.flowise
LOG_LEVELLog level (error, info, verbose, debug)info
For a complete list of environment variables, see the Environment Variables documentation.

Troubleshooting

Port already in use

If you get a port conflict error, either:
  • Kill the process using the port
  • Change the port in your .env files

Build failures

If you encounter build failures:
  1. Clear the cache: pnpm clean
  2. Remove node_modules: pnpm nuke
  3. Reinstall: pnpm install
  4. Rebuild: pnpm build

Components not updating

If your component changes aren’t reflected:
  1. Stop the dev server
  2. Run pnpm build to rebuild components
  3. Start the dev server again with pnpm dev

Next Steps

Build docs developers (and LLMs) love