How to Install n8n: Cloud, npm, and Docker Options

by Đội ngũ Marketing365
How to Install n8n: Cloud, npm, and Docker Options

Written by Đội ngũ Marketing365, reviewed under the Content Policy of Marketing365. Last updated .

Contents
  1. n8n Cloud or self-host: which should you choose before installing?
  2. How to install n8n with npx and npm
    1. Run it instantly with npx
    2. Install permanently with npm (globally)
  3. How to install n8n with Docker
  4. Check whether n8n is running and complete the initial setup
  5. Frequently asked questions
    1. Is installing n8n free?
    2. Should I choose npm or Docker?
    3. Can I use a personal computer for real operation?
    4. Which Node.js version do I need?
    5. Where do I access n8n after installation?

If you’re looking for how to install n8n to start automating marketing work but aren’t sure which path to choose, this article will clear things up for you. n8n offers several installation options — from a cloud version you can use within minutes, to direct installation with npm or running it with Docker on your own machine. Each method suits a different purpose and technical level. We’ll go through each option according to the official documentation, along with how to check whether n8n is running, so you can choose the most streamlined path for yourself.

Not sure what n8n is and what it can do? Read the foundational article what is n8n first to understand the concept, then come back here to choose how to install it. This article is part of Marketing365’s AI Guide series.

n8n Cloud or self-host: which should you choose before installing?

Before discussing installation commands, you need to decide one thing: use n8n Cloud (the cloud version operated by n8n) or self-host (install and manage it yourself). This is the most important choice because it determines all the steps that follow.

n8n Cloud or self-host: which should you choose before installing?
n8n Cloud or self-host: which should you choose before installing?
  • n8n Cloud: you don’t need to install anything. Sign up for an account at n8n.io, use the free trial, and start building workflows right in your browser. n8n handles the servers, updates, and backups. In return, you pay by plan once the trial ends.
  • Self-host: you install n8n on your own computer or server. The community (Fair-code) version is free, your data stays on your infrastructure, and you have full customization control. In return, you are responsible for updates, security, and operations.

The quick rule for marketers and SMEs: if you want to experiment and move fast without worrying about DevOps, choose n8n Cloud. If you want to stay free long term, control your data, and are willing to work with the command line, choose self-host. The rest of this article focuses on self-host installation methods: npx/npm and Docker. If you want a deeper comparison between n8n and its competitors, you can refer to the article n8n vs Zapier.

How to install n8n with npx and npm

This is the lightest way to install n8n on a personal computer (Windows, macOS, or Linux). The only requirement is that Node.js is already installed. According to the official documentation, n8n requires a supported Node.js version (use the latest LTS release; at the time of writing, n8n requires Node.js 20 or later). You can download Node.js from nodejs.org and install it like any regular software.

How to install n8n with npx and npm
How to install n8n with npx and npm

Run it instantly with npx

If you only want to try it without installing it permanently, open Terminal (macOS/Linux) or Command Prompt/PowerShell (Windows) and type:

  • npx n8n

This command downloads and launches n8n temporarily without a long-term installation. The first time will take a while to download the packages. When you see the message saying n8n is ready, open your browser and go to http://localhost:5678.

Install permanently with npm (globally)

If you want to use n8n regularly, install it globally with npm:

  1. Install: type npm install n8n -g
  2. Start: type n8n (or n8n start)
  3. Open your browser to http://localhost:5678

From then on, you only need to open Terminal and type n8n to run it again. The npm method is suitable when you want n8n ready on your laptop for building and testing workflows, but it does not start automatically with your computer and is not ideal for 24/7 operation.

How to install n8n with Docker

Docker is the self-host option recommended by n8n’s documentation because it is neat, easy to update, and isolated from the system. You do not need to install Node.js manually — everything is already packaged in the image. First, install Docker Desktop (Windows/macOS) or Docker Engine (Linux).

How to install n8n with Docker
How to install n8n with Docker

To prevent workflow data from being lost when the container stops, create a storage volume and run n8n attached to that volume:

  1. Create a data volume: docker volume create n8n_data
  2. Start n8n:
    docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
  3. Open your browser to http://localhost:5678

Quick explanation of the parameters: -p 5678:5678 opens the port so you can access the interface; -v n8n_data:/home/node/.n8n mounts the volume to keep workflows and login information; and docker.n8n.io/n8nio/n8n is the official image address. When you want to update to a new version, you only need to pull the new image and run it again — this is a major advantage of Docker.

The Docker method on a personal machine is only the starting point. When you need a public access address that runs continuously, with HTTPS and a custom domain so webhooks work reliably, you should deploy n8n on a server. The full process, from Docker Compose and Nginx reverse proxy to SSL, is explained in detail in the article how to install n8n on a VPS — this is the natural next advanced section of this guide.

Check whether n8n is running and complete the initial setup

However you install it, the verification step is the same. After running the startup command, check in this order:

Check whether n8n is running and complete the initial setup
Check whether n8n is running and complete the initial setup
  1. Check the Terminal: if n8n starts successfully, you will see a message indicating that the Editor is running and the access address (default port 5678).
  2. Open your browser: go to http://localhost:5678. If the n8n interface appears, the installation was successful.
  3. Create the owner account: on the first run, n8n asks you to create an admin account with an email and password. This is the account used to log in to your workspace.
  4. Build your first workflow: after logging in, click to create a new workflow to make sure everything is working.

If the page does not open, check whether port 5678 is being used by another application, and confirm that the command in Terminal does not show an error. Once n8n is running properly, the next step is usually connecting it to an AI model to automate content — you can follow the article how to connect n8n with ChatGPT to create workflows for writing captions, classifying emails, or summarizing news.

Frequently asked questions

Is installing n8n free?

The self-host community version (installed with npm or Docker) under the Fair-code license is free for you to run on your own infrastructure. n8n Cloud has a free trial period, after which it is billed by plan. Full details and updated terms are always available at docs.n8n.io.

Frequently asked questions
Frequently asked questions

Should I choose npm or Docker?

If you just want to try it quickly on a laptop and are already familiar with Node.js, npm/npx is the lightest option. If you want a clean environment, easier updates, and a path toward long-term server operation, choose Docker — this is also the approach n8n’s documentation recommends for self-hosting.

Can I use a personal computer for real operation?

Running on a personal computer is suitable for learning and testing. For real operation (workflows running 24/7, receiving webhooks from outside, with HTTPS), you should install it on a VPS or server. See the dedicated guide in the article how to install n8n on a VPS.

Which Node.js version do I need?

n8n installed with npm requires a supported Node.js version — use the latest LTS release downloaded from nodejs.org. Because version requirements may change over time, you should check the exact number in the installation documentation at docs.n8n.io before installing.

Where do I access n8n after installation?

By default, n8n runs at http://localhost:5678 on the same machine where you just installed it. With n8n Cloud, you access it through the workspace link provided by n8n when you sign up.

You may also like

Leave a Comment