@@ -24,6 +24,7 @@ English | [繁體中文](./i18n/README-TW.md) | [简体中文](./i18n/README-ZH.
2424## 📚 Table of Contents
2525
2626- [ ⚡ Quick Start] ( #-quick-start )
27+ - [ Troubleshooting: Node.js Version] ( #troubleshooting-nodejs-version )
2728- [ 🐳 Docker] ( #-docker )
2829- [ 👨💻 Developers] ( #-developers )
2930- [ 🌱 Env Variables] ( #-env-variables )
@@ -36,7 +37,7 @@ English | [繁體中文](./i18n/README-TW.md) | [简体中文](./i18n/README-ZH.
3637
3738## ⚡Quick Start
3839
39- Download and Install [ NodeJS] ( https://nodejs.org/en/download ) >= 18.15 .0
40+ Download and Install [ NodeJS] ( https://nodejs.org/en/download ) >= 20.0 .0
4041
41421 . Install Flowise
4243 ``` bash
@@ -50,6 +51,227 @@ Download and Install [NodeJS](https://nodejs.org/en/download) >= 18.15.0
5051
51523. Open [http://localhost:3000](http://localhost:3000)
5253
54+ # ## Troubleshooting: Node.js Version
55+
56+ If you encounter ` ReferenceError: File is not defined` or similar errors, your Node.js version is likely below v20.
57+
58+ < details>
59+ < summary> Upgrade Node.js using NVM (Recommended)< /summary>
60+
61+ 1. ** Install NVM (Node Version Manager)** :
62+ ` ` ` bash
63+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
64+ source ~ /.bashrc
65+ ` ` `
66+
67+ 2. ** Install and use Node.js v20** :
68+ ` ` ` bash
69+ nvm install 20
70+ nvm use 20
71+ nvm alias default 20
72+ ` ` `
73+
74+ 3. ** Verify installation** :
75+ ` ` ` bash
76+ node -v
77+ # should show v20.x.x
78+ ` ` `
79+
80+ 4. ** Reinstall Flowise** :
81+ ` ` ` bash
82+ npm install -g flowise
83+ ` ` `
84+
85+ < /details>
86+
87+ < details>
88+ < summary> Alternative: Install via NodeSource (APT)< /summary>
89+
90+ ` ` ` bash
91+ curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
92+ sudo apt-get install -y nodejs
93+ ` ` `
94+
95+ < /details>
96+
97+ < details>
98+ < summary> Clean Up Old Node.js Versions (Linux)< /summary>
99+
100+ After upgrading via NVM, remove any system-installed Node.js to avoid conflicts:
101+
102+ ` ` ` bash
103+ sudo apt-get remove --purge nodejs npm
104+ sudo apt-get autoremove
105+ ` ` `
106+
107+ Verify NVM' s Node is active:
108+ ```bash
109+ which node
110+ # Should show: ~/.nvm/versions/node/v20.x.x/bin/node
111+ ```
112+
113+ </details>
114+
115+ <details>
116+ <summary>Run Flowise as a Background Service</summary>
117+
118+ #### Option A: Using pm2 (Recommended)
119+
120+ `pm2` is a process manager for Node.js that keeps apps alive and restarts them on failure.
121+
122+ 1. **Install pm2**:
123+ ```bash
124+ npm install -g pm2
125+ ```
126+
127+ 2. **Start Flowise**:
128+ ```bash
129+ pm2 start "npx flowise start" --name flowise
130+ ```
131+
132+ 3. **Enable auto-start on reboot**:
133+ ```bash
134+ pm2 save
135+ pm2 startup
136+ ```
137+ Follow the printed instructions (usually a `sudo` command).
138+
139+ 4. **Useful commands**:
140+ ```bash
141+ pm2 list # Check status
142+ pm2 logs flowise # View logs
143+ pm2 restart flowise
144+ pm2 stop flowise
145+ ```
146+
147+ #### Option B: Using systemd (Native Linux)
148+
149+ 1. **Create a systemd service file**:
150+ ```bash
151+ sudo nano /etc/systemd/system/flowise.service
152+ ```
153+
154+ 2. **Add the following** (replace `YOUR_USERNAME` with your actual username):
155+ ```ini
156+ [Unit]
157+ Description=Flowise AI Service
158+ After=network.target
159+
160+ [Service]
161+ Type=simple
162+ User=YOUR_USERNAME
163+ WorkingDirectory=/home/YOUR_USERNAME
164+ ExecStart=/bin/bash -c ' export NVM_DIR=" /home/YOUR_USERNAME/.nvm" && [ -s " $NVM_DIR /nvm.sh" ] && . " $NVM_DIR /nvm.sh" && npx flowise start'
165+ Restart=always
166+ RestartSec=10
167+
168+ [Install]
169+ WantedBy=multi-user.target
170+ ```
171+
172+ 3. **Enable and start the service**:
173+ ```bash
174+ sudo systemctl daemon-reload
175+ sudo systemctl enable flowise
176+ sudo systemctl start flowise
177+ ```
178+
179+ 4. **Check status**:
180+ ```bash
181+ sudo systemctl status flowise
182+ ```
183+
184+ </details>
185+
186+ <details>
187+ <summary>Nginx Reverse Proxy Setup</summary>
188+
189+ Set up Nginx to access Flowise via a custom domain (e.g., `http://flowise.local`).
190+
191+ 1. **Install Nginx**:
192+ ```bash
193+ sudo apt update && sudo apt install nginx -y
194+ ```
195+
196+ 2. **Create server block**:
197+ ```bash
198+ sudo nano /etc/nginx/sites-available/flowise
199+ ```
200+
201+ Add:
202+ ```nginx
203+ server {
204+ listen 80;
205+ server_name flowise.local;
206+
207+ location / {
208+ proxy_pass http://localhost:3000;
209+ proxy_http_version 1.1;
210+ proxy_set_header Upgrade $http_upgrade;
211+ proxy_set_header Connection ' upgrade' ;
212+ proxy_set_header Host $host;
213+ proxy_cache_bypass $http_upgrade;
214+ }
215+ }
216+ ```
217+
218+ 3. **For local testing**, add to `/etc/hosts`:
219+ ```bash
220+ echo "127.0.0.1 flowise.local" | sudo tee -a /etc/hosts
221+ ```
222+
223+ 4. **Enable and reload**:
224+ ```bash
225+ sudo ln -s /etc/nginx/sites-available/flowise /etc/nginx/sites-enabled/
226+ sudo nginx -t
227+ sudo systemctl reload nginx
228+ ```
229+
230+ 5. **Access**: Open `http://flowise.local`
231+
232+ #### Enable HTTPS with Let' s Encrypt
233+
234+ For production with a real domain:
235+ ` ` ` bash
236+ sudo apt install certbot python3-certbot-nginx -y
237+ sudo certbot --nginx -d flowise.example.com
238+ ` ` `
239+
240+ Verify auto-renewal:
241+ ` ` ` bash
242+ sudo certbot renew --dry-run
243+ ` ` `
244+
245+ # ### Add Basic Authentication
246+
247+ 1. ** Create password file** :
248+ ` ` ` bash
249+ sudo apt install apache2-utils -y
250+ sudo htpasswd -c /etc/nginx/.htpasswd your_username
251+ ` ` `
252+
253+ 2. ** Update Nginx config** — add inside ` location / { }` :
254+ ` ` ` nginx
255+ auth_basic " Restricted Access" ;
256+ auth_basic_user_file /etc/nginx/.htpasswd;
257+ ` ` `
258+
259+ 3. ** Reload** :
260+ ` ` ` bash
261+ sudo nginx -t && sudo systemctl reload nginx
262+ ` ` `
263+
264+ # ### Flowise Built-in Authentication
265+
266+ Alternatively, use Flowise' s native auth by setting environment variables:
267+ ```bash
268+ # In your .env file or service config
269+ FLOWISE_USERNAME=admin
270+ FLOWISE_PASSWORD=your_secure_password
271+ ```
272+
273+ </details>
274+
53275## 🐳 Docker
54276
55277### Docker Compose
0 commit comments