Skip to main content

Configuration

Environment Configuration

Ubuntu Configuration:

bash
# Create environment file
sudo mkdir -p /etc/flowise
sudo cat > /etc/flowise/flowise.env << 'EOF'
# Server Configuration
PORT=3000
HOST=0.0.0.0
# Authentication
FLOWISE_USERNAME=admin
FLOWISE_PASSWORD=your_secure_password
FLOWISE_SECRETKEY_OVERWRITE=your_secret_key_here
# Database Configuration
DATABASE_TYPE=sqlite
DATABASE_PATH=/var/lib/flowise/database.sqlite
# File Storage
BLOB_STORAGE_PATH=/var/lib/flowise/storage
# Logging
LOG_LEVEL=info
LOG_PATH=/var/log/flowise
# API Keys Storage
APIKEY_PATH=/var/lib/flowise/api
# Tool Configuration
TOOL_FUNCTION_BUILTIN_DEP=crypto,fs,path
TOOL_FUNCTION_EXTERNAL_DEP=axios,moment
# Security
CORS_ORIGINS=*
IFRAME_ORIGINS=*
EOF
# Create directories
sudo mkdir -p /var/lib/flowise /var/log/flowise
sudo chown -R flowise:flowise /var/lib/flowise /var/log/flowise

RHEL8 Configuration:

bash
# Create environment file
sudo mkdir -p /etc/flowise
sudo cat > /etc/flowise/flowise.env << 'EOF'
# Server Configuration
PORT=3000
HOST=0.0.0.0
# Authentication
FLOWISE_USERNAME=admin
FLOWISE_PASSWORD=your_secure_password
FLOWISE_SECRETKEY_OVERWRITE=your_secret_key_here
# Database Configuration
DATABASE_TYPE=sqlite
DATABASE_PATH=/var/lib/flowise/database.sqlite
# File Storage
BLOB_STORAGE_PATH=/var/lib/flowise/storage
# Logging
LOG_LEVEL=info
LOG_PATH=/var/log/flowise
# API Keys Storage
APIKEY_PATH=/var/lib/flowise/api
# Tool Configuration
TOOL_FUNCTION_BUILTIN_DEP=crypto,fs,path
TOOL_FUNCTION_EXTERNAL_DEP=axios,moment
# Security
CORS_ORIGINS=*
IFRAME_ORIGINS=*
EOF
# Create directories with SELinux context
sudo mkdir -p /var/lib/flowise /var/log/flowise
sudo chown -R flowise:flowise /var/lib/flowise /var/log/flowise
sudo setsebool -P httpd_exec_enable 1
sudo semanage fcontext -a -t bin_t "/usr/local/bin/flowise"
sudo restorecon -v /usr/local/bin/flowise

Database Configuration

PostgreSQL Setup (Ubuntu):

bash

# Install PostgreSQL
sudo apt install -y postgresql postgresql-contrib
# Start and enable service
sudo systemctl start postgresql
sudo systemctl enable postgresql
# Create database and user
sudo -u postgres psql << 'EOF'
CREATE DATABASE flowise;
CREATE USER flowise WITH ENCRYPTED PASSWORD 'flowise_password';
GRANT ALL PRIVILEGES ON DATABASE flowise TO flowise;
\q
EOF
# Update environment file
sudo tee -a /etc/flowise/flowise.env << 'EOF'
DATABASE_TYPE=postgres
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USERNAME=flowise
DATABASE_PASSWORD=flowise_password
DATABASE_NAME=flowise
EOF

PostgreSQL Setup (RHEL8):

bash

# Install PostgreSQL
sudo dnf install -y postgresql postgresql-server postgresql-contrib
# Initialize database
sudo postgresql-setup --initdb
# Start and enable service
sudo systemctl start postgresql
sudo systemctl enable postgresql
# Configure authentication
sudo sed -i 's/ident/md5/g' /var/lib/pgsql/data/pg_hba.conf
sudo systemctl restart postgresql
# Create database and user
sudo -u postgres psql << 'EOF'
CREATE DATABASE flowise;
CREATE USER flowise WITH ENCRYPTED PASSWORD 'flowise_password';
GRANT ALL PRIVILEGES ON DATABASE flowise TO flowise;
\q
EOF
# Update environment file
sudo tee -a /etc/flowise/flowise.env << 'EOF'
DATABASE_TYPE=postgres
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USERNAME=flowise
DATABASE_PASSWORD=flowise_password
DATABASE_NAME=flowise
EOF
SSL/TLS Configuration
## Ubuntu SSL Setup:

bash

# Install Nginx
sudo apt install -y nginx certbot python3-certbot-nginx
# Create Nginx configuration
sudo cat > /etc/nginx/sites-available/flowise << 'EOF'
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
}
EOF
# Enable site
sudo ln -s /etc/nginx/sites-available/flowise /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
# Get SSL certificate
sudo certbot --nginx -d your-domain.com

RHEL8 SSL Setup:

bash

# Install Nginx
sudo dnf install -y nginx certbot python3-certbot-nginx
# Configure firewall
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
# Create Nginx configuration
sudo cat > /etc/nginx/conf.d/flowise.conf << 'EOF'
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
}
EOF
# Test and restart Nginx
sudo nginx -t
sudo systemctl enable nginx
sudo systemctl restart nginx
# Get SSL certificate
sudo certbot --nginx -d your-domain.com