How To Setup n8n: Cloud, NPM, and Docker
1. The Easiest Path: n8n Cloud
If you are just starting out with workflow automation and don't want to deal with server maintenance, command lines, or environment variables, the officially managed n8n Cloud is by far your best option.
Simply navigate to app.n8n.cloud, sign up for an account, and your private workspace will be instantly provisioned. That is literally all it takes. Because the infrastructure team handles everything behind the scenes, you can immediately begin dragging and dropping nodes onto the canvas.
2. Local Execution: Installing via NPM
If you are a developer looking to experiment or build workflows locally before deploying them, the NPM (Node Package Manager) method is incredibly fast, especially on Windows.
Assuming you have Node.js installed, open your command prompt or terminal and run the global installation command:
npm install -g n8n
Once the download completes, initializing the engine is as simple as typing the following into your terminal and pressing Enter:
n8n
This command automatically boots up a local server on your machine. You can then access the full n8n editor interface by opening your web browser directly to http://localhost:5678.
3. Production Grade: Installing via Docker
When you are ready to deploy n8n permanently on a VPS (like a DigitalOcean Droplet or AWS EC2), Docker is the absolute industry standard. It isolates the engine entirely, making backups and version upgrades deeply reliable.
Assuming you have Docker installed on your host machine, you can launch the container using the following standard bash command:
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
docker.n8n.io/n8nio/n8n
This command binds exactly to port 5678 and crucially mounts a local storage volume (~/.n8n) so that all your workflow data and credentials persist permanently, even if the container receives a reboot or version update.