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.

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:
- Manual Trigger, so the workflow runs only when you click Execute workflow.
- Edit Fields (Set), with two fields:
request_idset toTEST-001andapprovedset toyes. - Filter, with one condition:
approved(string) is equal toyes.
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:
- Open every node and note which credential it expects before running anything.
- Run a template once with test data, and keep its schedule trigger off until the output is right.
- Give each credential the narrowest access the app offers.
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
- “Unsupported engine” or a crash on start:
node -visn’t v24. Runnvm use 24and try again. n8n: command not foundafter a global install: the terminal was opened before nvm loaded. Open a new one, or runnpx n8n.- Port 5678 already in use: another n8n is still running, probably in an old terminal. Stop it there.
- “Unrecognized node type” after importing a template: the template uses a community node. Install it under Settings, or replace that step.