The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
For a new self-hosted n8n instance, use the official one-line Docker Compose setup. It installs Docker services, creates the configuration and data storage, and opens n8n at http://localhost:5678. Choose hand-written Docker Compose when you need to customize the stack or integrate it with an existing deployment. Choose n8n Cloud when you do not want to operate servers, networking, databases, upgrades, backups, or security controls.
This guide compares every installation route currently listed by n8n: one-line setup, hand-built Docker Compose, standalone Docker, npm, cloud-provider deployments, and n8n Cloud. It explains prerequisites, exact commands, persistence, database choices, security obligations, scaling, and the failure modes that matter in real deployments.
Which n8n installation method should you choose?
Your best method depends less on the first command than on who will run the system afterward. The table below puts the practical differences in one place.
Recommended Free Tools
| Method | Best fit | Prerequisites | Operational burden | Important caveat |
|---|---|---|---|---|
| Official one-line setup | Fast first self-hosted installation | Docker Engine or Desktop and the Docker Compose v2 plugin | Low to moderate | Designed for new installs; generated stack uses SQLite by default |
| Docker Compose by hand | Configuration control, production customization, or an existing Compose project | Docker Engine, Compose v2, and at least 4 GB RAM plus 2 vCPUs for the bundled sandbox services | Moderate to high | Secrets, volumes, database, firewall, and sandbox isolation require deliberate setup |
| Standalone Docker | Local development and testing | Docker Desktop or Docker Engine | Moderate | The official page is marked outdated and points to Compose; it is not a complete production design |
| npm | Existing installations and legacy workflows | Node.js and npm details checked against the current n8n documentation | Variable | New n8n 3.0 installations are Docker-distributed; do not start a new install from an unverified old npm command |
| Cloud-provider self-hosting | Operators who want their own cloud account and architecture | Provider account, compute, networking, TLS, database, backups, and monitoring | High | You own capacity, upgrades, security, and recovery |
| n8n Cloud | Users who want managed infrastructure | An account and a plan | Low | The 14-day trial has a 1,000-execution limit and the workspace is deleted after expiry unless upgraded |
n8n’s current installation index lists one-line setup, Docker Compose, npm, Docker, and cloud-provider options. In practice, the one-line script is the quickest fresh self-hosted route, hand-built Compose is the control-oriented route, and n8n Cloud is the route with the least infrastructure work.
#1 Best Overall
Before you install: requirements and decisions
Choose where n8n will run
For a local experiment, Docker Desktop on a workstation is sufficient. For a team, run the containers on a server that remains online and has a stable hostname. For a public webhook endpoint, plan DNS, HTTPS, firewall rules, and a reverse proxy before inviting users or connecting production credentials.
Install Docker with Compose v2
The one-line installer requires the Docker Compose v2 plugin, invoked as docker compose with a space. The older standalone docker-compose binary is not the prerequisite described by the current guide. Verify both components before running the script:
docker --version
docker compose version
The commands should return installed versions rather than “command not found.” Start Docker Desktop, or start the Docker daemon on Linux, before continuing.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Plan persistence and the database
n8n stores credentials, workflows, execution metadata, encryption settings, and other state. A container is replaceable; its data must not be. The generated setup stores project files in an n8n directory and uses an n8n-data Docker volume. A fresh Compose example includes SQLite because it is simple and needs no separate database service.
SQLite is convenient for trying n8n. For a team or a production instance with more than a handful of users or workflows that run continuously, n8n’s Compose guidance says to use PostgreSQL instead. A new SQLite-based example does not automatically migrate existing SQLite data to PostgreSQL; migration requires a planned procedure and backup.
Understand the operator role
Self-hosting is not only an installation task. n8n describes the required knowledge as setting up and configuring servers and containers, managing application resources and scaling, securing servers and applications, and configuring n8n itself. If those responsibilities are outside your team, managed hosting is usually the safer choice.
Method 1: install n8n with the official one-line setup
This is the recommended starting point for a new self-hosted installation. The script creates the project directory, writes a Compose file and environment file, downloads images, starts the services, and prints the local address.
Run the installer
- Confirm that Docker is installed, running, and supports Compose v2.
- Open a terminal in the directory where you want the project folder created.
- Run the official command exactly:
curl -fsSL https://get.n8n.io | sh
When it completes, the script creates ./n8n. The directory contains compose.yml, .env, and related configuration. The stack starts n8n, SQLite, and optional Assistant support services. Open http://localhost:5678 in a browser and create the initial owner account.
What is persisted
Configuration remains in the generated project directory, while application data is kept in the n8n-data Docker volume. Back up both the directory and the volume before making upgrades or changing databases. A container recreation without those locations will look like a fresh n8n installation.
Stop, start, and upgrade
Run these commands from any directory by retaining the file path:
# Stop the services, preserving data
docker compose -f ./n8n/compose.yml down
# Start them again in the background
docker compose -f ./n8n/compose.yml up -d
# Apply the installer’s upgrade flow
curl -fsSL https://get.n8n.io | sh -s -- --upgrade
down removes containers and networks but leaves the named volume. The destructive variant is:
docker compose -f ./n8n/compose.yml down -v
The -v option deletes Compose-managed volumes, including n8n data. Use it only when you intentionally want to erase the installation after exporting anything you need.
When the one-line setup is not enough
The generated stack is optimized for a fresh start, not every production topology. Move to hand-built Compose when you need PostgreSQL, a reverse proxy, custom environment variables, an existing network, separate worker services, or organization-specific backup and monitoring.
Method 2: build a Docker Compose deployment by hand
Hand-written Compose gives you control over service definitions, networks, secrets, storage, and database placement. It is the right foundation when n8n must fit an existing Compose project or when you need to review every production setting.
Resource and service requirements
The current n8n Compose guide requires Docker Engine and Compose v2. Its bundled sandbox stack needs at least 4 GB of RAM and 2 vCPUs. The example contains n8n, sandbox certificate generation, a sandbox API, a privileged sandbox runner, and SearXNG. Size the host above the minimum if workflows execute code, process files, or run concurrently.
Prepare the project deliberately
- Create a dedicated directory and keep the Compose file under version control, excluding secrets.
- Define persistent storage for n8n and the database. Confirm the host can restore those volumes.
- Generate unique encryption and application secrets. Do not leave sample placeholders in a reachable deployment.
- Choose PostgreSQL for a team or continuously running production workload rather than accepting SQLite by default.
- Put only the n8n web endpoint behind your reverse proxy or public load balancer.
- Keep sandbox containers on an internal Docker network; they should not be directly reachable from the internet.
Start and verify the stack
From the directory containing your Compose file, start detached services:
Rank #3
docker compose up -d
Check container state and logs:
docker compose ps
docker compose logs --tail=100 n8n
Then test the health endpoint:
curl -sf http://localhost:5678/healthz
A successful request returns an HTTP success response. If the health check fails, inspect the n8n log first, then verify database reachability, environment-variable syntax, port binding, and available memory.
Production security checkpoints
- Use a firewall to expose only the reverse proxy or n8n web port that users actually need.
- Use HTTPS for login sessions and webhook traffic; terminate TLS at a maintained proxy or load balancer.
- Store secrets outside publicly readable files and rotate them through a documented procedure.
- Regenerate sandbox certificates according to the deployment’s certificate plan; expired or mismatched certificates can break sandbox calls.
- Back up PostgreSQL and n8n’s persistent data on separate storage, then perform a restore test.
- Monitor disk, memory, CPU, container restarts, failed executions, and database growth.
Method 3: run n8n as a standalone Docker container
The standalone Docker instructions are useful for a disposable local test, but the official page is marked outdated and directs readers to Docker Compose. Use Compose for a new long-lived installation.
What the standalone command provides
The documented approach runs the n8nio/n8n image, maps host port 5678, sets timezone variables, enforces settings-file permissions, and creates an n8n_data volume. The volume preserves /home/node/.n8n when the container is recreated. It defaults to SQLite.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Why it is limited for production
A single docker run command does not define a complete backup policy, reverse proxy, database high-availability plan, sandbox isolation, update process, or monitoring model. The documentation labels this approach for local development and testing and warns that it is not safe for production without a more complete setup.
The image can be configured for PostgreSQL with DB_TYPE=postgresdb and the related database environment variables, but once you need those settings, persistent services, and repeatable operations, a Compose file is easier to review and maintain.
Method 4: install with npm
The official installation index still lists npm, which matters for existing installations and legacy automation. However, the current one-line guide states that from n8n 3.0, n8n is distributed only through Docker. Existing npm installations continue to work for now, while new installations and future upgrades should use Docker.
What new users should do
Do not copy an old npm command from an outdated tutorial and assume it is supported. Check the current n8n documentation for the exact Node.js and npm compatibility requirements before touching an existing installation. For a new deployment, use the one-line setup or Compose instead.
When an existing npm installation needs attention
- Record the current n8n version, Node.js version, process manager, environment variables, database, and data directory.
- Export workflows and credentials according to your organization’s recovery policy.
- Plan a maintenance window and test the target Docker deployment separately.
- Keep the old installation available until workflows, credentials, webhooks, and scheduled executions have been verified on the replacement.
This approach avoids presenting an unverified legacy command as current installation advice while still giving existing operators a safe decision path.
Rank #4
Method 5: self-host n8n on a cloud provider
n8n documents deployments for DigitalOcean, Heroku, Hetzner Cloud, Google Cloud Run, AWS, Azure, Google Kubernetes Engine, and OpenShift Local, in addition to generic Docker Compose. The provider changes the infrastructure primitives, but not the operator responsibilities.
What you control
You keep the cloud account and choose the region, network, instance type, database architecture, TLS termination, logging, and scaling model. This can satisfy data-location, network-integration, or platform-standard requirements that a managed n8n workspace cannot. For self-hosting n8n on a Linux server, an Antihost VPS provides full root access; install n8n yourself and retain responsibility for its configuration, security, backups, and upgrades.
What you must operate
- Compute sizing for the editor, webhook traffic, and workflow execution.
- Private networking and firewall rules.
- DNS and certificate renewal.
- PostgreSQL provisioning, patching, backups, and restore testing.
- Persistent volumes and disaster recovery.
- Container image updates, n8n version upgrades, and rollback procedures.
- Metrics, logs, alerts, and incident response.
Cloud-provider templates are not interchangeable. A server deployment, a container service, and a Kubernetes deployment have different storage, networking, and upgrade behavior. Follow the provider-specific n8n guide for the platform you actually selected, then validate the resulting stack against the same persistence and security checks used for Compose.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesMethod 6: use n8n Cloud
n8n Cloud is managed hosting: n8n hosts the instance, so you do not install Docker or maintain the server, network, database, upgrades, or underlying security controls.
Trial terms
The trial lasts 14 days, includes Pro features, allows 1,000 executions, and uses Starter-level computing power. If you do not upgrade, the trial expires and n8n deletes the workspace. Workflows can be downloaded for 90 days after expiry. Treat the trial as temporary: export workflows before the deadline if you may need them later.
After the trial
At expiry you can select Starter, Pro, or Enterprise. Prices and plan limits change, so check the current n8n pricing and plan documentation at the time you subscribe rather than relying on a fixed number in an installation guide.
When Cloud is the better engineering choice
- Your team does not have dependable server, container, database, and security expertise.
- You need to start workflows quickly without designing infrastructure.
- The cost of maintenance and downtime matters more than control over the underlying account.
- You prefer a managed upgrade path and do not need a provider-specific network topology.
Database, persistence, and migration choices
SQLite for evaluation
SQLite is included in the one-line and example Compose setups because it removes a separate database service. It is appropriate for learning, prototypes, and small personal workloads where a single instance and simple backup are acceptable.
Free tools Windows power users keep installed
One-click scans. No signup required.
PostgreSQL for teams and continuous workloads
Use PostgreSQL when several people share the instance, workflows run continuously, or execution history and concurrency are growing. Place the database on durable storage, restrict network access to n8n, enable automated backups, and verify that a restore produces a working n8n instance.
Best Value
Do not assume an automatic SQLite conversion
A fresh Compose example does not migrate an existing SQLite database to PostgreSQL automatically. Preserve the original data, follow n8n’s documented migration procedure for your versions, and test the migration in a separate environment before switching production traffic.
Verification checklist after installation
- Open the editor and create the owner account.
- Confirm the displayed n8n version and record it with the deployment date.
- Create a small test workflow and run it manually.
- Enable a schedule, wait for one successful execution, and inspect its history.
- Test an inbound webhook through the same hostname and HTTPS path users will call.
- Restart the containers and confirm the workflow, credentials, and execution history remain.
- Run the backup job, then perform a test restore in an isolated location.
- Check that public firewall rules do not expose sandbox services or the database.
Troubleshooting common installation failures
“docker compose” is not recognized
Install or update the Compose v2 plugin and make sure Docker is running. The one-line setup does not target the legacy docker-compose command.
The browser cannot reach port 5678
Run docker compose ps and inspect logs. Confirm that the container is running, host port 5678 is not occupied, and the firewall permits local access. On a remote server, bind the service behind a proxy rather than assuming localhost on your laptop refers to the server.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchEverything disappeared after recreation
Check that the Compose file still references the original n8n-data or n8n_data volume and that you did not run down -v. Reattach the original volume or restore it from backup.
Database connection errors
Verify the database hostname, port, username, password, database name, and network membership. Confirm PostgreSQL is healthy before starting n8n and inspect both service logs for authentication or migration messages.
Workflows fail in the sandbox
Check that sandbox services are running, their certificates are valid, and the containers can communicate on the internal network. Do not solve a sandbox problem by publishing those services to the internet.
Webhooks work locally but not publicly
Validate DNS, HTTPS certificates, reverse-proxy forwarding, firewall rules, and n8n’s externally visible URL settings. Test from a network outside the server so local routing does not hide a public-access problem.
A practical decision framework
| If your priority is… | Choose | Reason |
|---|---|---|
| Fastest new self-hosted start | One-line setup | It generates and starts the Compose stack with minimal manual configuration |
| Full control over services and production settings | Hand-built Docker Compose | You can define databases, networks, secrets, proxies, and resource limits explicitly |
| A short-lived local experiment | Standalone Docker | One container and one volume are quick, but the documented page is outdated for new production work |
| Keeping an existing legacy deployment alive | npm, temporarily | Existing installs may continue to work; new installs should move to Docker |
| Your own cloud account and network architecture | Cloud-provider self-hosting | You retain infrastructure control but accept all operational duties |
| No server maintenance | n8n Cloud | Hosting, upgrades, and underlying infrastructure are managed for you |
Final recommendation
Start a new self-hosted n8n instance with the one-line Docker Compose setup. Keep SQLite for evaluation, then redesign around PostgreSQL, private sandbox networking, unique secrets, backups, HTTPS, and monitoring before making the instance a shared production service. Use hand-built Compose when those controls must be explicit. Use a cloud-provider deployment only when your team is prepared to operate infrastructure. If you want n8n functionality without that operational burden, choose n8n Cloud and track its trial limit, expiry, and export window.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

