Difference between revisions of "N8n"
From Notes_Wiki
| m | m | ||
| (3 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
| =Installation= | =Installation= | ||
| Install nodejs via: | ==On Rocky 9.x== | ||
| Install nodejs via below as root user: | |||
| <pre> | <pre> | ||
| sudo dnf -y  | curl -fsSL https://rpm.nodesource.com/setup_22.x -o nodesource_setup.sh | ||
| sudo -E bash nodesource_setup.sh | |||
| sudo dnf install -y nodejs | |||
| node -v | |||
| npm -v | |||
| </pre> | </pre> | ||
| Line 15: | Line 20: | ||
| sudo npm install n8n -g | sudo npm install n8n -g | ||
| </pre> | </pre> | ||
| ==On Ubuntu 24.04== | |||
| Install nodejs and npm as root.  Then install n8n also as root | |||
| <pre> | |||
| curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh | |||
| sudo -E bash nodesource_setup.sh | |||
| sudo apt install -y nodejs | |||
| node -v | |||
| npm -v | |||
| sudo npm install n8n -g | |||
| </pre> | |||
| Line 24: | Line 43: | ||
| Then open http://locahost:5678/ and create account to work with n8n workflows. | Then open http://locahost:5678/ and create account to work with n8n workflows. | ||
| =Sample Usage= | |||
| # Create a new workflow | |||
| # Add first step "Basic LLM chain".  Use "<-" from top left to go back to canvas | |||
| # Select model and select desired ollama model.  If required add a credential with base URL "http://localhost:11434" to connect to local ollama | |||
| # Add "Convert to file" with "Convert to html" node | |||
| # Add "Read/Write files to disk" with "Write file to disk"  | |||
| # Give file path.  Since we started n8n as root we can write almost anywhere but file will get created with root privileges.  Eg /home/user/Desktop/output.html | |||
| # Save and execute workflow to see query output saved on Desktop in html file | |||
| [[Main Page|Home]] > [[Local system based AI tools]] > [[N8n]] | [[Main Page|Home]] > [[Local system based AI tools]] > [[N8n]] | ||
Latest revision as of 10:54, 21 July 2025
Home > Local system based AI tools > N8n
About
n8n can be used to make AI workflows and execute them.
Installation
On Rocky 9.x
Install nodejs via below as root user:
curl -fsSL https://rpm.nodesource.com/setup_22.x -o nodesource_setup.sh sudo -E bash nodesource_setup.sh sudo dnf install -y nodejs node -v npm -v
To install N8n on local system we can use npn and install via root user using:
sudo npm install n8n -g
On Ubuntu 24.04
Install nodejs and npm as root. Then install n8n also as root
curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh sudo -E bash nodesource_setup.sh sudo apt install -y nodejs node -v npm -v sudo npm install n8n -g
Executing
Then we can start n8n service as root user via:
n8n start
Then open http://locahost:5678/ and create account to work with n8n workflows.
Sample Usage
- Create a new workflow
- Add first step "Basic LLM chain". Use "<-" from top left to go back to canvas
- Select model and select desired ollama model. If required add a credential with base URL "http://localhost:11434" to connect to local ollama
- Add "Convert to file" with "Convert to html" node
- Add "Read/Write files to disk" with "Write file to disk"
- Give file path. Since we started n8n as root we can write almost anywhere but file will get created with root privileges. Eg /home/user/Desktop/output.html
- Save and execute workflow to see query output saved on Desktop in html file

