Mike HolpJoin AI Income Lab ↗

Build guide · By · Published

Run n8n on your own Ubuntu machine.

n8n is a workflow automation tool you can run yourself instead of paying for the hosted plan. This guide gets it running on your own computer and checks it with a two-node workflow that needs no accounts or API keys. It pairs with my Ubuntu self-hosting video, with one correction: current n8n needs a newer Node.js than Ubuntu installs by default.

You need an Ubuntu (or other Linux) machine and a terminal. n8n runs on localhost, so only that computer can reach it; nothing here puts it on the internet. The guide is free, and so is self-hosting n8n. AI or app nodes you add later may need paid accounts.

Install Node.js 24, start n8n on localhost:5678, and run a test workflow before connecting any accounts.

1. Install Node.js 24

Check what you have first:

node -v

The current n8n release (2.44.5 on October 22, 2026) requires Node.js 24 or newer, and n8n’s npm install docs support versions up to 24.x. So aim for a v24 number. Ubuntu’s own nodejs package is older than that, which is why sudo apt install nodejs alone no longer works for n8n.

If you don’t have v24, install it with nvm, the version manager that nodejs.org suggests for Linux:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash
# open a new terminal so nvm loads, then:
nvm install 24
node -v

Expect v24. followed by a minor version (24.22.1 is the current long-term release). nvm installs Node in your home folder, so the n8n install below needs no sudo.

2. Start n8n

To try it without installing anything permanently:

npx n8n

To keep it installed, which is what I do in the video:

npm install n8n -g
n8n

The first start downloads and prepares n8n, so give it a minute. When the terminal says the editor is ready, open http://localhost:5678 in a browser on the same machine. Leave the terminal open: closing it, or pressing Ctrl+C, stops n8n.

Or run it in Docker

If Docker is already installed, you can skip Node.js and run n8n’s official image instead. These commands come from n8n’s Docker docs; replace both timezone placeholders with yours, for example Asia/Bangkok:

docker volume create n8n_data
docker run -it --rm \
 --name n8n \
 -p 5678:5678 \
 -e GENERIC_TIMEZONE="<YOUR_TIMEZONE>" \
 -e TZ="<YOUR_TIMEZONE>" \
 -e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
 -v n8n_data:/home/node/.n8n \
 n8nio/n8n

It opens on the same http://localhost:5678, and the n8n_data volume keeps your workflows when the container stops, so the steps below work the same way. For a server that stays up, n8n now recommends Docker Compose over this single command; their Docker page links to it.

3. Create the owner account

The first visit asks you to set up an owner account. This account lives in your own n8n data, not on n8n.io. Use a real email you control and a strong password, even on a laptop, because the same login protects n8n if you later move it to a server.

4. Build a workflow you can check

Create a new workflow and add three nodes:

  1. Manual Trigger, so the workflow runs only when you click Execute workflow.
  2. Edit Fields (Set), with two fields: request_id set to TEST-001 and approved set to yes.
  3. Filter, with one condition: approved (string) is equal to yes.

Click Execute workflow. Open the Filter node’s output: it should show one item with request_id TEST-001. Now change approved to no in Edit Fields and run it again. The Filter node should pass zero items. If both runs behave that way, your self-hosted n8n is working, and you have tested it without connecting a single account.

Save the workflow. Stop n8n with Ctrl+C, start it again with n8n, and reopen the workflow. Seeing it again confirms your data survives a restart; by default n8n keeps its database and settings in the .n8n folder in your home directory.

5. Add templates and credentials carefully

The n8n template library imports straight into a self-hosted instance. In the video, most templates I tried still needed something before they ran: Gmail client credentials, an Apify key, or a community node such as Blotato that wasn’t installed. Treat each import as a checklist:

Know the limits of this setup

This is a local install for learning and personal workflows. Schedules only run while the computer is on and n8n is running, and webhooks from outside services can’t reach localhost. Don’t open port 5678 to the internet to work around that.

n8n’s docs also say npm installs are deprecated from n8n 3.0. For a server that runs around the clock, use n8n’s Docker setup or a platform like Coolify, which I cover in Why You Should Self-Host N8N on Coolify.

When it fails

Commands checked October 22, 2026 against n8n 2.44.5 on npm, n8n’s npm and Docker installation docs, nvm v0.40.8 and Node.js 24.22.1. The video was recorded in October 2025 on an earlier n8n release, so some screens will differ.