A complete beginner-friendly guide to installing and running n8n on your local machine
You'll need Node.js (version 14.x or higher) installed on your machine.
node -v
You'll need either npm (comes with Node.js) or yarn installed.
npm -v
yarn -v
Install n8n globally using npm (recommended for most users).
npm install n8n -g
Install n8n globally using yarn (alternative to npm).
yarn global add n8n
Run n8n in a Docker container (recommended for production).
docker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n
If you encounter permission issues on Windows, try running your terminal as Administrator or use the following command:
npm install n8n -g --production --unsafe-perm
After installation, you can start n8n with this simple command:
n8n
This will start n8n and make it available at:
http://localhost:5678
On first run, n8n will create configuration files in:
%APPDATA%\n8n~/.n8nFor security, it's recommended to set up basic authentication:
n8n --user=YOUR_USERNAME --password=YOUR_PASSWORD
Replace YOUR_USERNAME and YOUR_PASSWORD with your credentials.
If port 5678 is already in use, you can specify a different port:
n8n --port=8080
Replace 8080 with your preferred port number.
Once n8n is running, open your web browser and navigate to:
http://localhost:5678
Congratulations! You should now see the n8n web interface.
When you access n8n for the first time:
n8n supports many configuration options. Common ones include:
--tunnel - Create a public URL (using localtunnel)
--skip-webhook-registration - Skip webhook registration
--help - See all available options
Installing n8n locally gives you complete control over your data and workflows. It's especially useful when:
Permission errors typically occur when npm/yarn doesn't have write access to the global installation directory. Try these solutions:
sudo npm install n8n -g
npm config set prefix ~/.npm-global~/.npm-global/bin to your PATH
When you close your terminal, n8n will stop running. To keep it running in the background:
Use nohup:
nohup n8n &
Or use a process manager like pm2:
npm install pm2 -gpm2 start n8n
Run as a service or use:
start /B n8n
Or install a process manager like pm2:
npm install pm2 -gpm2 start n8n
To update n8n to the latest version, run the same installation command with the -g flag:
npm install n8n -g
yarn global add n8n
After updating, restart n8n to use the new version.
By default, n8n stores your workflows in the configuration directory:
%APPDATA%\n8n
~/.n8n
The database file is named database.sqlite and contains all your workflows and credentials.
Comprehensive guides and API references
Get help from the n8n community
Source code and issue tracking
Video guides and walkthroughs
Explore these ready-to-use workflows to get started quickly: