部署与运维

Install with npm

npm is a quick way to get started with n8n on your local machine. You must have Node.js installed. n8n requires a Node.js version between 20.19 and 24.x, inclusive.

Try n8n with npx

You can try n8n without installing it using npx.

From the terminal, run:

bash
npx n8n

This command will download everything that's needed to start n8n. You can then access n8n and start building workflows by opening <http://localhost:5678>.

Install globally with npm

To install n8n globally, use npm:

bash
npm install n8n -g

To install or update to a specific version of n8n use the @ syntax to specify the version. For example:

bash
npm install -g n8n@0.126.1

To install next:

bash
npm install -g n8n@next

After the installation, start n8n by running:

bash
n8n
# or
n8n start

Next steps

Try out n8n using the Quickstarts.

Updating

To update your n8n instance to the latest version, run:

bash
npm update -g n8n

To install the next version:

bash
npm install -g n8n@next

n8n with tunnel&#x20;

To use webhooks for trigger nodes of external services like GitHub, n8n has to be reachable from the web. n8n provides a tunnel service using cloudflared that redirects requests from the web to your local n8n instance. Docker must be installed for the tunnel to work.

There are two ways to use the tunnel, depending on how you run n8n:

For npm installations, use the services only approach. Start cloudflared as a standalone service, then run n8n locally:

bash
# Terminal 1: Start the cloudflared tunnel service
pnpm --filter n8n-containers services --services cloudflared

# Terminal 2: Start n8n locally
pnpm dev

The services command starts cloudflared, fetches the public tunnel URL, and writes a .env file to packages/cli/bin/.env with WEBHOOK_URL and N8N_PROXY_HOPS=1. n8n picks up this .env automatically on startup.

Clean up when done:

bash
pnpm --filter n8n-containers services:clean

For the full stack approach (n8n and cloudflared both in containers), refer to the Docker tunnel setup.

Reverting an upgrade

Install the older version that you want to go back to.

If the upgrade involved a database migration:

  1. Check the feature documentation and release notes to see if there are any manual changes you need to make.
  2. Run n8n db:revert on your current version to roll back the database. If you want to revert more than one database migration, you need to repeat this process.

Windows troubleshooting

If you are experiencing issues running n8n on Windows, make sure your Node.js environment is correctly set up. Follow Microsoft's guide to Install NodeJS on Windows.

官方原文和授权

本页来自 N8N 英文官方网站固定快照,并转换成 xueai 静态页面。内容以 N8N 持续更新的官方页面为准。

来源、授权与修改

本站保留许可证、固定提交号、社区作者和修改说明,不代表 n8n 对本站背书。

查看许可证查看来源和修改说明