Manage cookies that are used for advertising, such as ad personalization, remarketing, and ad effectiveness analysis.
2.10.5. Install and update n8n
Important points:
- For business hosting only.
- A 4G or higher plan is recommended; errors may occur with a 2G plan due to the high RAM requirements of n8n.
- Minimum Node.js version — 20 or higher.
- This article describes how to launch with the minimum required set of parameters. For a description of all parameters, see the official documentation.
n8n — open-source platform for automating various processes and interacting with external services.
Automatic install
See CMS auto-install.
Manual install
- In the "Linux configuration" section, set Node.js 20 or higher.
- Connect to the hosting via SSH.
- Go to the site directory:
cd ~/example.com/www - Install n8n:
npm install n8n - Install SSL certificate (if not installed).
- In the "Site settings" section, set the following settings:
- "Web server" — "Node.js".
- "Node.js version" — 20 or higher.
- "Traffic proxying" — "By IP address".
- Create environment for launching n8n:
- In the site root directory, create the
.envfile with the following environment parameters:N8N_LISTEN_ADDRESS=123.45.67.89 N8N_PORT=3000 N8N_HOST=example.com WEBHOOK_URL=https://example.com/ N8N_PROXY_HOPS=1 N8N_USER_FOLDER= N8N_RUNNERS_ENABLED=true N8N_RUNNERS_MODE=internal N8N_RUNNERS_BROKER_LISTEN_ADDRESS=123.45.67.89 N8N_RUNNERS_BROKER_PORT=3001 N8N_SMTP_HOST=mail.adm.tools N8N_SMTP_PORT=465 N8N_SMTP_USER=admin@example.com N8N_SMTP_PASS=password N8N_SMTP_SENDER=admin@example.com DB_SQLITE_POOL_SIZE=2 N8N_BLOCK_ENV_ACCESS_IN_NODE=true N8N_GIT_NODE_DISABLE_BARE_REPOS=trueIn the file, use your own data:
- Launch parameters:
N8N_LISTEN_ADDRESS— IP address from the "Node.js settings" section.N8N_PORT— port from the "Node.js settings" section.N8N_HOST— domain of your site.WEBHOOK_URL— URL of your site.
- Data storage:
N8N_USER_FOLDER— path for placing the.n8ndirectory, which stores user data such as databases and encryption keys (empty value = site root directory, which is useful for backups).
- Runner settings:
N8N_RUNNERS_BROKER_LISTEN_ADDRESS— IP address from the "Node.js settings" section.
- Sending mail:
N8N_SMTP_USER— mailbox name.N8N_SMTP_PASS— mailbox password.N8N_SMTP_SENDER— mailbox name.
- In site root directory, create the
package.jsonfile with the following content:{ "name": "n8n-app", "version": "1.0.0", "scripts": { "start": "./node_modules/n8n/bin/n8n" }, "dependencies": { "n8n": "^2.4.7" } }
- In the runner code, replace
127.0.0.1with the variable so that the runner uses the correct IP address during operation:sed -i 's/127\.0\.0\.1/${this.runnerConfig.listenAddress}/g' ./node_modules/n8n/dist/task-runners/task-runner-process-base.js - In the "Node.js settings" section, restart the app.
- Open your site in a browser and register as an administrator.
- Check the n8n operation.
Update
- Connect to the hosting via SSH.
- Go to the site directory:
cd ~/example.com/www - Update n8n:
npm update n8n - In the runner code, replace
127.0.0.1with the variable so that the runner uses the correct IP address during operation:sed -i 's/127\.0\.0\.1/${this.runnerConfig.listenAddress}/g' ./node_modules/n8n/dist/task-runners/task-runner-process-base.js - In the "Node.js settings" section, restart the app.
- Check the n8n operation.
(1)
Comments