What N8n Is and Where to Install It
N8n is a workflow automation tool that lets you connect different apps and services so they talk to each other without writing code. Instead of manually moving data between tools — copying information from a form into a spreadsheet, or sending a message when a task is created — N8n handles it automatically. You can run N8n on your own computer for testing, on a server you control, or through their hosted cloud version.
The installation method you choose depends on what you want to do. If you are testing N8n or using it for a small team, running it locally on your computer is the fastest way to start. If you need it running all the time and accessible to multiple people, you will install it on a server — either one you own or rent from a hosting provider. The cloud version requires no installation at all, but costs money and means your workflows run on N8n's servers instead of yours.
Key Takeaways
- N8n requires Node.js to run, which you must install first before N8n itself will work.
- Local installation on Windows, Mac, or Linux takes about 10 minutes once Node.js is in place, using a single command in your terminal.
- Server installation uses Docker, a containerization tool that packages N8n so it runs the same way on any server, and requires basic familiarity with command-line tools.
- After installation, you access N8n through a web browser at localhost:5678 for local setups, or at your server's address for hosted versions.
- N8n stores your workflows and data in a database; local installs use SQLite by default, while server installs typically use PostgreSQL for reliability.
Installing Node.js First
N8n runs on Node.js, a runtime environment that lets JavaScript code run outside a web browser. You must install Node.js before you can install N8n. Go to nodejs.org, read the LTS (Long Term Support) version — not the current version — and run the installer for your operating system. On Windows, this opens a setup wizard; on Mac and Linux, follow the prompts in your terminal.
After installation finishes, open a terminal or command prompt and type node --version to confirm it worked. You should see a version number like v18.17.0 or higher. If you see "command not found" or "is not recognized", Node.js did not install correctly — restart your computer and try again, or check that you chose the right read for your operating system.
Installing N8n Locally on Your Computer
Once Node.js is installed, installing N8n locally takes one command. Open your terminal or command prompt and type:
npm install -g n8n
This tells npm (Node Package Manager, which comes with Node.js) to read N8n and install it globally on your computer so you can run it from anywhere. The read is about 200 MB and takes a few minutes depending on your internet speed. When it finishes, you will see a prompt asking where to save N8n's data — press Enter to accept the default location.
To start N8n, type n8n in your terminal. You will see messages saying N8n is starting up. When you see a line that says "Server started successfully", open a web browser and go to http://localhost:5678. You should see the N8n interface with a login screen. On first use, you create an account with an email and password, then you are in.
Installing N8n on a Server Using Docker
If you want N8n running on a server so it stays on all the time and multiple people can access it, you will use Docker, a tool that packages N8n so it runs identically on any server. First, install Docker on your server by following the instructions at docker.com for your server's operating system. This usually means running a single installation command, then restarting the server.
Once Docker is installed, create a folder for N8n and a file inside it called docker-compose.yml. Paste this text into that file:
version: '3.8' services: n8n: image: n8nio/n8n ports: - "5678:5678" environment: - N8N_HOST=your-server-address.com - N8N_PROTOCOL=https volumes: - n8n_data:/home/node/.n8n volumes: n8n_data:
Replace your-server-address.com with your actual server address. Then, in your terminal on the server, navigate to that folder and type docker-compose up -d. Docker downloads the N8n image and starts it in the background. After a minute, go to your server's address in a web browser — you should see the N8n login screen. Create your account and you are ready to build workflows.
Connecting a Database for Reliability
By default, N8n stores workflows and execution history in a straightforward database called SQLite, which works fine for testing and small teams. If you are running N8n on a server for production use, you should connect it to PostgreSQL, a more robust database that handles multiple users and larger amounts of data without slowing down.
To use PostgreSQL, you first need a PostgreSQL database running — either on the same server as N8n or on a separate database server. If you are using Docker, the easiest approach is to add PostgreSQL to your docker-compose.yml file so both services start together. Then, set environment variables in the N8n service to point to your PostgreSQL database. The N8n documentation at docs.n8n.io has a complete example you can copy and modify with your database credentials.
Accessing N8n After Installation
After installation, you access N8n through a web browser. For a local installation on your computer, the address is always http://localhost:5678. For a server installation, the address is your server's domain name or IP address, like https://n8n.yourcompany.com or https://192.168.1.50:5678.
On first login, N8n asks you to create an account. Use an email address you can remember and a strong password. After that, you land on the workflows page, which is empty at first. From here, you can create a new workflow by clicking "New Workflow", then add nodes (individual steps) that connect your apps together. Each node represents an action — sending an email, creating a record in a database, posting to Slack, and so on.
Troubleshooting Common Installation Problems
If N8n does not start, the most common cause is that Node.js is not installed or not in your system path. Open a terminal and type node --version again to confirm. If that fails, reinstall Node.js and restart your computer.
If you see "port 5678 is already in use", another process is using that port. Either close the other process, or tell N8n to use a different port by typing n8n start --port 5679 instead. For Docker installations, if the container does not start, check the logs by typing docker-compose logs n8n to see what went wrong — usually it is a typo in the docker-compose.yml file or a missing environment variable.
If you cannot reach N8n in your browser after installation, make sure you are using the correct address. Local installs must use http (not https) and localhost:5678. Server installs may require you to open port 5678 in your firewall, or configure a reverse proxy like Nginx to forward traffic to N8n.
Frequently Asked Questions
Do I need to know how to code to use N8n?
No. N8n is designed for non-technical users — you build workflows by dragging nodes onto a canvas and connecting them. However, some advanced workflows benefit from JavaScript code, which N8n lets you write inside a code node if you need it. Most common tasks do not require any coding.
Can I run N8n on a Raspberry Pi or other low-power device?
Yes, but with limits. N8n will run on a Raspberry Pi 4 or newer, though performance is slower than on a full server. For testing and small workflows, it works fine. For heavy use or many simultaneous workflows, a more powerful device is better.
What is the difference between the local install and the Docker install?
Local install is simpler and faster for testing on your own computer. Docker install is better for servers because it isolates N8n from other software, makes updates easier, and ensures it runs the same way on any server. Docker also makes it easier to run PostgreSQL alongside N8n.
Do I have to pay for N8n after I install it?
No. N8n is open source and free to install and run on your own computer or server. You only pay if you use N8n's cloud hosting service, which runs N8n for you so you do not have to manage a server yourself.
How do I update N8n after installation?
For local installs, type npm install -g n8n@latest to read the newest version. For Docker installs, type docker-compose pull to read the latest image, then docker-compose up -d to restart with the new version. Your workflows and data are preserved in both cases.