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.
Stable and Beta versions
n8n releases a new minor version most weeks. The stable version is for production use. beta is the most recent release. The beta version may be unstable. To report issues, use the forum.
Current stable: 2.9.4
Current beta: 2.10.2
Try n8n with npx#
You can try n8n without installing it using npx.
From the terminal, run:
1 | |
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:
1 | |
To install or update to a specific version of n8n use the @ syntax to specify the version. For example:
1 | |
To install next:
1 | |
After the installation, start n8n by running:
1 2 3 | |
Next steps#
Try out n8n using the Quickstarts.
Updating#
To update your n8n instance to the latest version, run:
1 | |
To install the next version:
1 | |
n8n with tunnel#
Danger
Use this for local development and testing. It isn't safe to use it in production.
Development tooling
The tunnel feature is a convenience tool for local development. The underlying implementation may change between n8n versions.
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:
Docker required
The tunnel uses cloudflared, which runs as a Docker container. Make sure Docker is installed on your machine, even when running n8n via npm.
For npm installations, use the services only approach. Start cloudflared as a standalone service, then run n8n locally:
1 2 3 4 5 | |
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:
1 | |
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:
- Check the feature documentation and release notes to see if there are any manual changes you need to make.
- Run
n8n db:reverton 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.