Deploying FlowFuse
Introduction
FlowFuse is an enterprise-grade platform built on Node-RED that transforms how industrial teams develop, deploy, and manage automation applications at scale. As the industrial application platform for the modern era, FlowFuse extends Node-RED’s intuitive flow-based programming with AI-assisted development, collaborative team features, remote device management, and enterprise security—making it the go-to solution for bridging IT and OT systems in manufacturing, energy, logistics, and industrial operations.
With FlowFuse, you can connect any machine using any industrial protocol (Modbus, OPC-UA, MQTT, and hundreds more), transform raw data into structured information models, build interactive dashboards, and deploy applications to edge devices—all while maintaining governance, version control, and centralized management. The platform’s AI-powered FlowFuse Expert copilot accelerates development by generating Node-RED flows, data transformations, and dashboard components from natural language descriptions, turning weeks of development time into hours.
Deploying FlowFuse on Klutch.sh provides infrastructure-as-code simplicity with production-ready features: automated SSL/TLS termination, persistent storage for application data, environment-based configuration management, and seamless integration with PostgreSQL databases. This guide walks you through containerizing FlowFuse with Docker, configuring database backends, setting up email notifications, deploying to Klutch.sh, and implementing production best practices for industrial-scale Node-RED deployments.
Why Deploy FlowFuse on Klutch.sh
Running FlowFuse on Klutch.sh delivers several advantages for industrial teams:
- Simplified Infrastructure: No Kubernetes complexity—deploy containerized FlowFuse with automatic service discovery and load balancing
- Managed Database Integration: Connect to PostgreSQL databases with built-in connection pooling and backup strategies
- Persistent Storage: Attach volumes for Node-RED flows, credentials, project data, and file storage with configurable sizing
- Zero-Trust Security: Environment-based secrets management keeps credentials, API keys, and database passwords out of code
- Custom Domain Support: Map your industrial domains (
flows.yourcompany.com) with automatic SSL certificate provisioning - Cost-Effective Scaling: Pay for compute and storage you use without per-seat licensing from SaaS alternatives
- GitOps Compatibility: Deploy from GitHub with automatic rebuilds on push for true infrastructure-as-code workflows
- Production Monitoring: Built-in health checks, logging, and metrics collection for operational visibility
Prerequisites
Before deploying FlowFuse on Klutch.sh, ensure you have:
- A Klutch.sh account (sign up here)
- A GitHub repository for your FlowFuse deployment configuration
- Access to the Klutch.sh dashboard
- Basic understanding of Docker, Node-RED, and database concepts
- A PostgreSQL database instance (see PostgreSQL deployment guide)
- (Optional) SMTP server credentials for email notifications and team invitations
- (Optional) Domain name for custom branding and access
Understanding FlowFuse Architecture
FlowFuse consists of several interconnected components that work together to provide comprehensive Node-RED management:
Core Components
- FlowFuse Application: Main web application serving the management UI, API endpoints, and orchestration logic
- PostgreSQL Database: Stores user accounts, teams, projects, instance configurations, audit logs, and metadata
- Node-RED Instances: Isolated Node-RED containers managed by FlowFuse, one per project/application
- File Storage Service: Provides persistent file system access for Node-RED instances to store data files
- MQTT Broker (optional): Team-level message broker for inter-instance communication
- Device Agent (optional): Remote agent software for managing Node-RED on edge devices
Architecture Flow
- Users access FlowFuse web UI to create teams and projects
- FlowFuse provisions isolated Node-RED instances in containers
- Each instance connects to shared PostgreSQL for context storage
- File Storage Service provides
/datadirectory access to instances - Instances communicate via Team Broker (MQTT) when configured
- Device Agents connect remote installations to central management
- All configuration, snapshots, and audit trails stored in PostgreSQL
When deployed on Klutch.sh, FlowFuse automatically detects your Dockerfile and builds a container image. The platform manages HTTP traffic routing to port 3000 (FlowFuse’s default port), provides SSL termination, and offers persistent volume options for file storage data.
Project Structure
A minimal repository structure for deploying FlowFuse on Klutch.sh:
flowfuse-deployment/├── Dockerfile├── .dockerignore├── .gitignore├── README.md└── config/ └── flowfuse.yml.templateImportant: Keep secrets and credentials out of Git. All sensitive configuration should be injected via environment variables in Klutch.sh.
Creating Your Dockerfile
Klutch.sh automatically detects a Dockerfile in the root directory of your repository. Create a Dockerfile that uses the official FlowFuse image:
Option 1: Simple Dockerfile (Quick Start)
FROM flowfuse/forge:latest
# Expose FlowFuse web application portEXPOSE 3000
# FlowFuse runs as non-root user by defaultCMD ["npm", "start"]Option 2: Production Dockerfile with Custom Configuration
FROM flowfuse/forge:2.25
WORKDIR /usr/src/forge
# Copy custom configuration template (secrets via env vars)COPY config/flowfuse.yml.template /usr/src/forge/etc/
# Install additional dependencies if neededUSER rootRUN apt-get update && \ apt-get install -y --no-install-recommends \ postgresql-client \ curl \ && rm -rf /var/lib/apt/lists/*
# Switch back to forge user for securityUSER forge
# Expose HTTP portEXPOSE 3000
# Health check for monitoringHEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD curl --fail http://localhost:3000/api/v1/ping || exit 1
# Start FlowFuse applicationCMD ["npm", "start"]Option 3: Advanced Dockerfile with File Storage
FROM flowfuse/forge:2.25
WORKDIR /usr/src/forge
# Create directories for persistent dataUSER rootRUN mkdir -p /opt/flowfuse/var/files /opt/flowfuse/var/context && \ chown -R forge:forge /opt/flowfuse
# Copy configuration templatesCOPY --chown=forge:forge config/flowfuse.yml.template /usr/src/forge/etc/
# Install runtime dependenciesRUN apt-get update && \ apt-get install -y --no-install-recommends \ postgresql-client \ curl \ ca-certificates \ && rm -rf /var/lib/apt/lists/*
# Switch to forge userUSER forge
# Expose application portEXPOSE 3000
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD curl --fail http://localhost:3000/api/v1/ping || exit 1
# Start applicationCMD ["npm", "start"]Important Notes:
- FlowFuse’s web application runs on port 3000 by default
- The official image runs as a non-root user (
forge) for security - Configuration can be provided via
flowfuse.ymlfile or environment variables - PostgreSQL client is useful for database initialization and health checks
Configuration Template
Create a config/flowfuse.yml.template file for FlowFuse configuration. Sensitive values will be injected via environment variables:
# FlowFuse Configuration Template# Sensitive values should be provided via environment variables
# Base URL for the platform (required)base_url: ${FLOWFUSE_BASE_URL}
# Port to listen onport: 3000
# Database configuration (PostgreSQL)db: type: postgres host: ${DB_HOST} port: ${DB_PORT} database: ${DB_NAME} user: ${DB_USER} password: ${DB_PASSWORD}
# Logging configurationlogging: level: ${LOG_LEVEL:-info} pretty: false
# Email/SMTP configuration (optional)email: enabled: ${EMAIL_ENABLED:-false} from: ${EMAIL_FROM} smtp: host: ${SMTP_HOST} port: ${SMTP_PORT} secure: ${SMTP_SECURE:-true} tls: rejectUnauthorized: ${SMTP_TLS_VERIFY:-true} auth: user: ${SMTP_USER} pass: ${SMTP_PASSWORD}
# File storage configurationfileStore: type: 'localfs' options: root: '/opt/flowfuse/var/files'
# Driver configuration for Node-RED instancesdriver: type: 'stub'
# Rate limitingrate_limits: enabled: true timeWindow: 60000 max: 1000
# Telemetry (optional - disable for privacy)telemetry: enabled: ${TELEMETRY_ENABLED:-false}Database Setup
FlowFuse requires PostgreSQL for storing platform data. You need to set up two databases:
Deploy PostgreSQL on Klutch.sh
-
Follow the PostgreSQL deployment guide to create a database instance on Klutch.sh.
-
Connect to your PostgreSQL instance and create the required databases:
-- Create FlowFuse main databaseCREATE DATABASE flowfuse;
-- Create FlowFuse context database (for Node-RED context storage)CREATE DATABASE flowfuse_context;
-- Create user with appropriate permissionsCREATE USER flowfuse_user WITH ENCRYPTED PASSWORD 'your-secure-password-here';
-- Grant privilegesGRANT ALL PRIVILEGES ON DATABASE flowfuse TO flowfuse_user;GRANT ALL PRIVILEGES ON DATABASE flowfuse_context TO flowfuse_user;
-- Grant schema permissions\c flowfuseGRANT ALL ON SCHEMA public TO flowfuse_user;
\c flowfuse_contextGRANT ALL ON SCHEMA public TO flowfuse_user;- Note your database connection details:
- Host: Your PostgreSQL app URL (e.g.,
postgres-app.klutch.sh) - Port:
8000(Klutch.sh TCP routing port) - Database names:
flowfuseandflowfuse_context - Username:
flowfuse_user - Password: Your secure password
- Host: Your PostgreSQL app URL (e.g.,
Deploying to Klutch.sh
Follow these detailed steps to deploy FlowFuse on Klutch.sh with full configuration.
Deployment Steps
-
Create Your Repository
Create a new GitHub repository and add your Dockerfile:
Terminal window mkdir flowfuse-deploymentcd flowfuse-deployment# Create Dockerfilecat > Dockerfile << 'EOF'FROM flowfuse/forge:2.25WORKDIR /usr/src/forgeUSER rootRUN mkdir -p /opt/flowfuse/var/files /opt/flowfuse/var/context && \chown -R forge:forge /opt/flowfuse && \apt-get update && \apt-get install -y --no-install-recommends postgresql-client curl && \rm -rf /var/lib/apt/lists/*USER forgeEXPOSE 3000HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \CMD curl --fail http://localhost:3000/api/v1/ping || exit 1CMD ["npm", "start"]EOF# Create .gitignorecat > .gitignore << 'EOF'node_modules/*.log.env.env.local*.key*.pem/var//opt/.DS_StoreEOF# Create .dockerignorecat > .dockerignore << 'EOF'node_modulesnpm-debug.log.git.gitignoreREADME.md.env.env.localEOF# Initialize git and pushgit initgit add .git commit -m "Initial FlowFuse deployment setup"git remote add origin https://github.com/YOUR_USERNAME/flowfuse-deployment.gitgit push -u origin main -
Access the Klutch.sh Dashboard
Navigate to klutch.sh/app and log in to your account.
-
Create a New Project
- Click “New Project” in the dashboard
- Enter a project name (e.g., “Industrial IoT Platform”)
- Select your preferred region for deployment
-
Create a New Application
- Within your project, click “New App”
- Name your application (e.g., “FlowFuse”)
- Connect your GitHub repository containing the Dockerfile
-
Configure Traffic Settings
- In the app settings, select HTTP as the traffic type
- FlowFuse serves web traffic on HTTP for both the UI and API
- Set the internal port to 3000 (FlowFuse’s default HTTP port)
-
Set Up Persistent Storage
FlowFuse requires persistent storage for file operations and context data:
- In the app settings, navigate to the “Volumes” section
- Click “Add Volume” for file storage:
- Mount path:
/opt/flowfuse/var/files - Size: 10GB (adjust based on expected usage)
- Mount path:
- Click “Add Volume” for context storage:
- Mount path:
/opt/flowfuse/var/context - Size: 5GB (adjust based on number of instances)
- Mount path:
Important: These directories store:
/opt/flowfuse/var/files: File nodes data, uploaded files, persistent storage for Node-RED instances/opt/flowfuse/var/context: Node-RED context data across instances
-
Configure Environment Variables
Add the following environment variables for FlowFuse configuration:
Core Configuration:
Terminal window # Base URL (use your Klutch.sh app URL or custom domain)FLOWFUSE_BASE_URL=https://flowfuse-app.klutch.sh# LoggingLOG_LEVEL=infoDatabase Configuration:
Terminal window # PostgreSQL connection detailsDB_HOST=postgres-app.klutch.shDB_PORT=8000DB_NAME=flowfuseDB_USER=flowfuse_userDB_PASSWORD=your-secure-database-passwordEmail Configuration (Optional but Recommended):
Terminal window # Enable email functionalityEMAIL_ENABLED=trueEMAIL_FROM=noreply@yourdomain.com# SMTP configuration (example using Gmail)SMTP_HOST=smtp.gmail.comSMTP_PORT=587SMTP_SECURE=falseSMTP_USER=your-email@gmail.comSMTP_PASSWORD=your-app-specific-passwordSMTP_TLS_VERIFY=trueOptional Configuration:
Terminal window # Disable telemetry for privacyTELEMETRY_ENABLED=false# Session configurationSESSION_SECRET=generate-random-64-char-string-hereGenerate secure secrets:
Terminal window # Generate SESSION_SECRETopenssl rand -hex 32# Generate strong database passwordopenssl rand -base64 32 -
Deploy the Application
- Review all configuration settings
- Click “Deploy” to start the build process
- Klutch.sh will automatically detect your Dockerfile, build the container, and deploy it
- Monitor the build logs for any errors
- Initial deployment takes 2-3 minutes for image download and startup
-
Verify Deployment
Once deployment completes:
- Access FlowFuse at your Klutch.sh URL (e.g.,
https://flowfuse-app.klutch.sh) - You should see the FlowFuse setup wizard
- Check the health endpoint:
https://flowfuse-app.klutch.sh/api/v1/ping
- Access FlowFuse at your Klutch.sh URL (e.g.,
-
Complete Initial Setup
On first access, FlowFuse will guide you through:
- Creating the platform administrator account
- Setting up your first team
- Configuring default project settings
- Creating your first Node-RED instance
First Run Configuration
After accessing FlowFuse for the first time, complete the setup wizard:
Administrator Account Setup
- Navigate to your FlowFuse URL
- Create the administrator account:
- Username: Choose a memorable admin username
- Email: Your administrative email
- Password: Strong password (minimum 8 characters)
- Full Name: Your name
Platform Configuration
Configure platform-wide settings:
// Example: Default stack configuration{ "name": "Node-RED 3.1", "properties": { "cpu": 100, // 0.1 CPU cores "memory": 256 // 256MB RAM }, "container": "flowfuse/node-red:3.1"}Create Your First Team
- Click “Create Team” in the dashboard
- Configure team settings:
- Team name: Your organization or department name
- Team type: Choose based on your subscription
- Team slug: URL-friendly identifier
Create Your First Project
- Within your team, click “Create Project”
- Configure project settings:
- Project name: Descriptive name for your application
- Stack: Select Node-RED version and resources
- Template: Choose starting template or blank
Creating Node-RED Instances
FlowFuse manages individual Node-RED instances for each project:
Via Web UI
- Navigate to your team dashboard
- Click “Create Instance”
- Configure instance:
- Name: Descriptive name (e.g., “Production Gateway”)
- Stack: Node-RED version and resource allocation
- Template: Starting configuration template
- Credentials: Auto-generated secure credentials
Instance Configuration Options
# Example instance configurationinstance: name: "Factory Floor Gateway" stack: "node-red-3.1" settings: httpAdminRoot: "/admin" httpNodeRoot: "/" credentialSecret: "auto-generated-by-flowfuse" flowFile: "flows.json" userDir: "/data" resources: cpu: "0.5" memory: "512Mi" environment: - name: "TZ" value: "America/New_York" - name: "NODE_OPTIONS" value: "--max-old-space-size=460"Connecting to Your Instances
Access your deployed Node-RED instances:
Direct Access
Each instance gets a unique URL:
https://instance-name-team-slug.flowfuse-app.klutch.shAPI Access
Use FlowFuse API to manage instances programmatically:
# Get list of instancescurl -X GET https://flowfuse-app.klutch.sh/api/v1/teams/{teamId}/projects \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# Get instance detailscurl -X GET https://flowfuse-app.klutch.sh/api/v1/projects/{projectId} \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# Start/stop instancecurl -X POST https://flowfuse-app.klutch.sh/api/v1/projects/{projectId}/actions/start \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"Node.js Client Example
const FlowFuseClient = require('@flowfuse/flowfuse-client');
const client = new FlowFuseClient({ baseURL: 'https://flowfuse-app.klutch.sh', accessToken: process.env.FLOWFUSE_TOKEN});
async function listProjects(teamId) { try { const projects = await client.teams.getProjects(teamId); console.log('Projects:', projects);
for (const project of projects) { console.log(`Project: ${project.name}`); console.log(`URL: ${project.url}`); console.log(`Status: ${project.state}`); } } catch (error) { console.error('Error fetching projects:', error); }}
// List all projects for a teamlistProjects('your-team-id');Python Client Example
import requestsimport os
FLOWFUSE_URL = "https://flowfuse-app.klutch.sh"ACCESS_TOKEN = os.getenv("FLOWFUSE_TOKEN")
headers = { "Authorization": f"Bearer {ACCESS_TOKEN}", "Content-Type": "application/json"}
def list_team_projects(team_id): """List all projects for a team""" response = requests.get( f"{FLOWFUSE_URL}/api/v1/teams/{team_id}/projects", headers=headers )
if response.status_code == 200: projects = response.json() for project in projects['projects']: print(f"Project: {project['name']}") print(f"URL: {project['url']}") print(f"Status: {project['state']}") else: print(f"Error: {response.status_code}") print(response.text)
# Usagelist_team_projects("your-team-id")Installing Custom Node Packages
Add custom Node-RED nodes to your instances:
Via FlowFuse UI
- Navigate to instance settings
- Go to “Palette Management”
- Search for nodes in the Node-RED catalog
- Click “Install” on desired packages
Programmatically via API
# Install a node packagecurl -X POST https://flowfuse-app.klutch.sh/api/v1/projects/{projectId}/nodes \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "module": "node-red-contrib-modbus", "version": "5.x" }'Common Industrial Nodes
// Popular packages for industrial IoTconst industrialNodes = [ 'node-red-contrib-modbus', // Modbus TCP/RTU 'node-red-contrib-opcua', // OPC-UA client/server 'node-red-contrib-s7', // Siemens S7 PLCs 'node-red-contrib-influxdb', // InfluxDB time-series 'node-red-dashboard', // Dashboard UI 'node-red-contrib-mqtt-broker', // MQTT broker '@flowfuse/node-red-dashboard' // FlowFuse Dashboard 2.0];Snapshots and Version Control
FlowFuse provides built-in snapshot functionality for version control:
Create Snapshot
# Create snapshot of current flowscurl -X POST https://flowfuse-app.klutch.sh/api/v1/projects/{projectId}/snapshots \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Production Release v1.2.0", "description": "Added temperature monitoring flows" }'Restore from Snapshot
# Restore project to a snapshotcurl -X POST https://flowfuse-app.klutch.sh/api/v1/projects/{projectId}/actions/rollback \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "snapshotId": "snapshot-id-here" }'DevOps Pipelines
Set up development, staging, and production pipeline:
- Create three projects:
dev,staging,production - Develop flows in
devenvironment - Create snapshot when ready
- Deploy snapshot to
stagingfor testing - After validation, deploy to
production
// Example pipeline automationasync function promoteToProd(devProjectId, prodProjectId) { // Create snapshot of dev environment const snapshot = await client.projects.createSnapshot(devProjectId, { name: `Promotion-${Date.now()}`, description: 'Automated promotion to production' });
// Deploy snapshot to production await client.projects.deploySnapshot(prodProjectId, snapshot.id);
console.log('Successfully promoted to production');}Device Agent Configuration
FlowFuse Device Agent enables remote Node-RED management on edge devices:
Installing Device Agent
On your edge device (Raspberry Pi, industrial PC, etc.):
# Install Node.js (if not present)curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -sudo apt-get install -y nodejs
# Install FlowFuse Device Agentsudo npm install -g @flowfuse/device-agent
# Create device configurationsudo mkdir -p /opt/flowfuse-devicecd /opt/flowfuse-device
# Initialize device configurationflowfuse-device-agent --initRegister Device with FlowFuse
- In FlowFuse UI, navigate to your team
- Go to “Devices” section
- Click “Add Device”
- Copy the device registration token
On the device:
# Configure devicecat > device.yml << EOFdeviceId: your-device-idtoken: your-device-tokenforgeURL: https://flowfuse-app.klutch.shcredentialSecret: generate-random-secretEOF
# Start device agentflowfuse-device-agent --config device.ymlDeploy Flows to Devices
# Create device snapshotcurl -X POST https://flowfuse-app.klutch.sh/api/v1/devices/{deviceId}/snapshots/deploy \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "snapshotId": "snapshot-id-to-deploy" }'Team Broker (MQTT) Setup
Enable Team Broker for inter-instance communication:
Configuration
Add to your FlowFuse configuration:
# Team Broker configurationbroker: enabled: true port: 1883 websocket: enabled: true port: 8083 auth: type: 'flowfuse'Using Team Broker in Node-RED
// MQTT configuration for Team Brokerconst mqtt = { broker: 'mqtt://flowfuse-app.klutch.sh', port: 1883, clientId: 'instance-name', username: 'team:team-slug:instance-name', password: 'auto-generated-token'};
// In Node-RED flow[ { "id": "mqtt-in", "type": "mqtt in", "broker": "team-broker", "topic": "sensors/temperature", "qos": "1" }, { "id": "mqtt-out", "type": "mqtt out", "broker": "team-broker", "topic": "actuators/valve", "qos": "1" }]Email Configuration
Configure SMTP for team invitations and notifications:
Gmail Configuration
# Gmail SMTP settingsEMAIL_ENABLED=trueEMAIL_FROM=your-app@gmail.comSMTP_HOST=smtp.gmail.comSMTP_PORT=587SMTP_SECURE=falseSMTP_USER=your-app@gmail.comSMTP_PASSWORD=your-app-specific-passwordSendGrid Configuration
# SendGrid SMTP settingsEMAIL_ENABLED=trueEMAIL_FROM=noreply@yourdomain.comSMTP_HOST=smtp.sendgrid.netSMTP_PORT=587SMTP_USER=apikeySMTP_PASSWORD=your-sendgrid-api-keyAmazon SES Configuration
# Amazon SES SMTP settingsEMAIL_ENABLED=trueEMAIL_FROM=noreply@yourdomain.comSMTP_HOST=email-smtp.us-east-1.amazonaws.comSMTP_PORT=587SMTP_USER=your-ses-smtp-usernameSMTP_PASSWORD=your-ses-smtp-passwordCustom Domain Configuration
Map your own domain to FlowFuse:
DNS Setup
-
Add Custom Domain in Klutch.sh
- Navigate to your FlowFuse app settings
- Go to “Domains” section
- Add your domain (e.g.,
flows.yourdomain.com) - Note the CNAME target provided
-
Configure DNS Records
Add CNAME record in your DNS provider:
Type: CNAMEName: flowsValue: your-app.klutch.shTTL: 3600 -
Update FlowFuse Configuration
Update the
FLOWFUSE_BASE_URLenvironment variable:Terminal window FLOWFUSE_BASE_URL=https://flows.yourdomain.com -
Wildcard Domain for Instances
Add wildcard CNAME for instance subdomains:
Type: CNAMEName: *.flowsValue: your-app.klutch.shTTL: 3600This enables URLs like:
instance-name.flows.yourdomain.com
Monitoring and Logging
Health Checks
FlowFuse provides health endpoints:
# Check platform healthcurl https://flowfuse-app.klutch.sh/api/v1/ping
# Expected response{ "status": "okay", "version": "2.25.0"}Application Logs
Monitor FlowFuse logs through Klutch.sh dashboard:
- Platform startup and initialization
- User authentication events
- Instance creation and management
- Database connection status
- API request logs
Metrics Collection
Enable Prometheus metrics:
# Add to configurationtelemetry: enabled: true prometheus: enabled: true port: 9090Access metrics at: https://flowfuse-app.klutch.sh/metrics
Key metrics to monitor:
flowfuse_instances_total: Total number of Node-RED instancesflowfuse_instances_active: Currently running instancesflowfuse_api_requests_total: API request countflowfuse_api_request_duration_seconds: API response timeflowfuse_db_connections: Database connection pool status
Backup and Recovery
Database Backup
Regularly backup your PostgreSQL databases:
# Backup FlowFuse main databasepg_dump -h postgres-app.klutch.sh -p 8000 -U flowfuse_user flowfuse \ > flowfuse-backup-$(date +%Y%m%d).sql
# Backup context databasepg_dump -h postgres-app.klutch.sh -p 8000 -U flowfuse_user flowfuse_context \ > flowfuse-context-backup-$(date +%Y%m%d).sqlFile Storage Backup
Backup persistent volumes containing file data:
# Create backup of file storagetar -czf flowfuse-files-backup-$(date +%Y%m%d).tar.gz \ /opt/flowfuse/var/filesDisaster Recovery
To restore FlowFuse after failure:
- Deploy new FlowFuse instance on Klutch.sh
- Restore PostgreSQL databases from backups
- Restore file storage volumes
- Update database connection strings
- Restart FlowFuse application
- Verify all instances are accessible
Troubleshooting
Common Issues
Issue: Cannot access FlowFuse UI
- Verify the app is running in Klutch.sh dashboard
- Check port 3000 is correctly configured as internal port
- Review application logs for startup errors
- Verify health endpoint:
curl https://your-app.klutch.sh/api/v1/ping
Issue: Database connection errors
Error: Connection refused to PostgreSQL- Verify database credentials in environment variables
- Check PostgreSQL is running and accessible
- Ensure database host and port are correct (host:8000 for Klutch.sh)
- Test connection:
psql -h postgres-app.klutch.sh -p 8000 -U flowfuse_user -d flowfuse
Issue: Email notifications not sending
- Verify
EMAIL_ENABLED=trueis set - Check SMTP credentials are correct
- Test SMTP connection from container
- Review email logs for delivery errors
- Check spam folders for test emails
Issue: Node-RED instances fail to start
- Check instance logs in FlowFuse UI
- Verify sufficient resources (CPU/memory) allocated
- Ensure file storage volume is attached and writable
- Review stack configuration for errors
Issue: Unable to install custom nodes
- Verify internet connectivity from container
- Check npm registry accessibility
- Review package compatibility with Node-RED version
- Check for conflicting node dependencies
Issue: Device Agent not connecting
- Verify device token is correct
- Check
forgeURLpoints to correct FlowFuse instance - Ensure firewall allows outbound HTTPS
- Review device agent logs for connection errors
Debug Mode
Enable debug logging for troubleshooting:
# Set log level to debugLOG_LEVEL=debugOr for specific components:
# Debug database queriesDEBUG=flowfuse:db:*
# Debug authenticationDEBUG=flowfuse:auth:*
# Debug all componentsDEBUG=flowfuse:*Database Issues
Check database connectivity:
# Test PostgreSQL connectiondocker exec -it flowfuse-container psql \ -h postgres-app.klutch.sh \ -p 8000 \ -U flowfuse_user \ -d flowfuse \ -c "SELECT version();"Performance Diagnostics
Monitor resource usage:
# Check container statsdocker stats flowfuse-container
# Review memory usagedocker exec -it flowfuse-container free -h
# Check disk spacedocker exec -it flowfuse-container df -hProduction Best Practices
Security Hardening
- Use strong passwords: Generate complex passwords for database and admin accounts
- Enable HTTPS: Always use SSL/TLS in production (automatic with Klutch.sh)
- Rotate secrets: Regularly update session secrets and database passwords
- Implement RBAC: Use FlowFuse’s role-based access control for team members
- Audit logging: Enable comprehensive audit trails for compliance
- Network isolation: Restrict database access to FlowFuse container only
Performance Optimization
- Database connection pooling: Configure appropriate connection limits
db: pool: min: 2 max: 10 acquire: 30000 idle: 10000- Resource allocation: Size instances based on flow complexity
# Light flows: 0.1 CPU, 256MB RAM# Medium flows: 0.5 CPU, 512MB RAM# Heavy flows: 1 CPU, 1GB RAM- Caching: Enable Redis for session caching (optional)
- File storage: Use external object storage (S3-compatible) for large deployments
High Availability
For mission-critical deployments:
- Database replication: Set up PostgreSQL primary-replica configuration
- Load balancing: Deploy multiple FlowFuse instances behind load balancer
- Backup automation: Schedule regular automated backups
- Monitoring alerts: Set up alerting for downtime and errors
- Disaster recovery: Document and test recovery procedures
Scaling Strategy
As your deployment grows:
- Vertical scaling: Increase CPU/memory for FlowFuse container
- Horizontal scaling: Deploy multiple FlowFuse instances (requires shared database)
- Database optimization: Add read replicas for reporting queries
- File storage: Migrate to object storage for unlimited capacity
- Instance distribution: Distribute Node-RED instances across multiple FlowFuse servers
Cost Optimization
Resource Sizing
FlowFuse resource requirements:
- Small deployment (< 10 instances): 1 CPU, 2GB RAM, 10GB storage
- Medium deployment (10-50 instances): 2 CPU, 4GB RAM, 50GB storage
- Large deployment (50+ instances): 4+ CPU, 8GB+ RAM, 100GB+ storage
Storage Management
- Regularly clean up old snapshots
- Archive inactive projects
- Compress log files
- Monitor file storage usage
Database Optimization
- Implement data retention policies
- Archive historical audit logs
- Optimize indexes for query performance
- Regular
VACUUMoperations
Migration from FlowFuse Cloud
To migrate from FlowFuse Cloud to self-hosted on Klutch.sh:
- Export Projects: Download snapshots of all projects
- Export Teams: Document team structure and memberships
- Deploy FlowFuse: Follow this guide to deploy on Klutch.sh
- Import Snapshots: Upload snapshots to new FlowFuse instance
- Migrate Users: Invite team members to new platform
- Update DNS: Point custom domains to new deployment
- Verify: Test all flows and integrations
- Cutover: Shut down Cloud instances after verification
Getting Started Checklist
Before going to production with FlowFuse:
- PostgreSQL database deployed and configured
- Both
flowfuseandflowfuse_contextdatabases created - Persistent volumes attached for file and context storage
- Environment variables configured with secure secrets
- SMTP configured for email notifications
- Custom domain configured (optional)
- First administrator account created
- Team structure planned and created
- Project templates configured
- Stack configurations defined
- Backup strategy implemented
- Monitoring and alerting configured
- Documentation created for team
- Test instance deployed and verified
- Production rollout plan documented
Resources
- FlowFuse Official Documentation
- FlowFuse Docker Installation Guide
- FlowFuse API Documentation
- FlowFuse GitHub Repository
- FlowFuse Docker Hub
- FlowFuse Community Forum
- Node-RED Documentation
- PostgreSQL Deployment Guide
- Klutch.sh Volumes Documentation
- Klutch.sh Networking Guide
Conclusion
Deploying FlowFuse on Klutch.sh provides enterprise-grade Node-RED management with simplified infrastructure, persistent storage, and database integration. By following this guide, you’ve set up a production-ready industrial application platform capable of managing hundreds of Node-RED instances, connecting thousands of industrial devices, and serving teams of developers building the next generation of industrial IoT applications. With AI-assisted development, collaborative workflows, and centralized management, FlowFuse on Klutch.sh empowers your team to bridge the IT/OT divide and accelerate digital transformation initiatives across your industrial operations.