Flowise supports multiple database systems including SQLite, PostgreSQL, MySQL, and MariaDB. This guide covers setup and configuration for each.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/yocxy2/Flowise/llms.txt
Use this file to discover all available pages before exploring further.
Supported Databases
Flowise uses TypeORM and supports the following databases:- SQLite - Default, no configuration required
- PostgreSQL - Recommended for production
- MySQL - Fully supported
- MariaDB - Fully supported
SQLite (Default)
SQLite is used by default with zero configuration. Great for development and small deployments.Set to
sqlite or leave unset for default SQLite databaseDirectory where
database.sqlite file will be createdDefault Location
By default, SQLite database is stored at:- Linux/macOS:
~/.flowise/database.sqlite - Windows:
C:\Users\{username}\.flowise\database.sqlite
SQLite is suitable for development and small deployments. For production environments with multiple instances or high traffic, use PostgreSQL.
PostgreSQL (Recommended for Production)
PostgreSQL is the recommended database for production deployments.Basic Configuration
Set to
postgres for PostgreSQLPostgreSQL server hostname or IP address (e.g.,
localhost, db.example.com)PostgreSQL server port
Name of the database to connect to
PostgreSQL username
PostgreSQL password
PostgreSQL Setup Steps
- Create Database and User
- Configure Flowise
.env file:
- Start Flowise
PostgreSQL with SSL
For secure connections to PostgreSQL:Enable SSL/TLS connection to PostgreSQL
Reject connections with invalid SSL certificates. Set to
false for self-signed certificates.Self-signed SSL certificate in BASE64 format
PostgreSQL Advanced Options
Flowise uses these additional PostgreSQL settings:- Connection pooling: Automatic
- Idle timeout: 120 seconds
- Logging: Errors, warnings, info, and log statements
- Application name:
Flowise
MySQL
MySQL is fully supported for Flowise deployments.Basic Configuration
Set to
mysql for MySQLMySQL server port
MySQL Setup Steps
- Create Database and User
- Configure Flowise
MySQL with SSL
Flowise automatically uses
utf8mb4 charset for MySQL to support full Unicode including emojis and special characters.MariaDB
MariaDB configuration is nearly identical to MySQL.Basic Configuration
Set to
mariadb for MariaDBMariaDB Setup Steps
Cloud Database Services
AWS RDS (PostgreSQL)
Google Cloud SQL (PostgreSQL)
Azure Database for PostgreSQL
Supabase (PostgreSQL)
Database Migrations
Flowise automatically handles database migrations:- First Startup: All tables and schemas are created
- Upgrades: Migrations run automatically when updating Flowise
- Rollback: Not supported - backup before upgrading
Manual Migration
Migrations run automatically, but you can check migration status:Database Entities
Flowise creates these main tables:chat_flow- Chatflow configurationschat_message- Chat history and messagescredential- Encrypted API credentialstool- Custom toolsassistant- OpenAI assistantsvariable- Global variablesdocument_store- Vector store documentsdocument_store_file_chunk- Document chunkslead- Lead capture datauser- User accounts (Enterprise)organization- Organizations (Enterprise)workspace- Workspaces (Enterprise)role- Roles and permissions (Enterprise)
Backup and Restore
SQLite Backup
PostgreSQL Backup
MySQL Backup
Performance Tuning
PostgreSQL Connection Pooling
Flowise uses TypeORM connection pooling with these defaults:- Idle timeout: 120 seconds
- Auto-reconnect: Enabled
MySQL Performance
Troubleshooting
Connection Refused
Problem: Cannot connect to database Solutions:- Verify database server is running
- Check firewall allows connection on database port
- Verify
DATABASE_HOSTandDATABASE_PORTare correct - Test connection manually:
Authentication Failed
Problem: Login error or access denied Solutions:- Verify
DATABASE_USERandDATABASE_PASSWORDare correct - Check user has correct permissions
- For MySQL, ensure user is created for correct host (
localhostvs%)
SSL/TLS Errors
Problem: SSL handshake failed Solutions:- Set
DATABASE_REJECT_UNAUTHORIZED=falsefor self-signed certificates - Verify
DATABASE_SSL_KEY_BASE64is correctly encoded - Check database server SSL configuration
Migration Errors
Problem: Migration failed on startup Solutions:- Backup database
- Check logs for specific error
- Verify database user has CREATE/ALTER table permissions
- Restore from backup and retry