> ## Content Index
> Fetch the complete content index at: https://trendboxgeek.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# n8n One-Line Setup: A Docker Installation Guide for Homelabs
- URL: https://trendboxgeek.com/blog/n8n-one-line-setup/
- Published: 2026-08-25T07:51:45.000Z
- Updated: 2026-08-25T07:51:45.000Z
- Author: Pankajbhai Chavda
- Tags: #blog-col

For years, spinning up n8n was as simple as typing npx n8n. But now that era is over. From n8n 3.0 onward, it ships exclusively via Docker.

Honestly, we accept change. They replaced the old Node method with a one-liner. It handles the compose files, environment variables, and stack creation for you. I just ran this end-to-end on a headless Ubuntu 26.04 node in my homelab, and here is exactly what you need to do to get it running smoothly on yours.

## The Docker Prerequisite

The n8n script is great, but it checks for Docker Engine and the Compose v2 plugin right out of the gate. If you are on a fresh Debian or Ubuntu server, it will fail immediately. So first, let's check if Docker Compose is installed.

docker compose version

If the output looks like `Docker Compose version v5.5.0`, then move to step 2; otherwise, we need to install Docker. Get Docker installed first using their official script, and add your user to the docker group so you aren't fighting permission errors.

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER && newgrp docker

## The n8n One-Liner Installation

When Docker is ready, run the one-line n8n installation script below.

curl -fsSL https://get.n8n.io | sh

**Expected Output:**

![One line installation script of n8n.](https://trendboxgeek.com/content/images/2026/08/image.png)

This creates an n8n folder in your home directory (\~/n8n), generates unique secrets in a .env file, writes your compose.yml, and pulls the images.

You will notice it pulls six containers, not just the main editor. This includes the external runners and the new isolated sandbox environment.

## **The LAN IP Problem**

When the script finishes, it prints out a message telling you to go to `http://localhost:5678`. That works great if you are installing this on your desktop, but if you are on a headless server and try to access it via your local network IP, you will hit a wall.

By default, n8n expects a secure cookie, which only works over HTTPS or localhost. To fix this for a local homelab setup, you just need to disable that flag in your .env file and restart the stack.

echo "N8N_SECURE_COOKIE=false" >> ~/n8n/.env
docker compose -f ~/n8n/compose.yml up -d

## Pinning Environment Defaults

If you check the logs on a fresh 2.35.x install, you will see a few warnings about default limits changing in future versions. Specifically, task timeouts are scheduled to drop from 5 minutes to 60 seconds. If you upgrade blindly later, that change will absolutely break your longer workflows.

It's best practice to pin the current defaults directly into your .env file right now so your setup stays stable.

```bash
echo "N8N_UNVERIFIED_PACKAGES_ENABLED=true" >> ~/n8n/.env
echo "N8N_RUNNERS_TASK_TIMEOUT=300" >> ~/n8n/.env
echo "N8N_COMPRESSION_NODE_MAX_DECOMPRESSED_SIZE_BYTES=2147483648" >> ~/n8n/.env
echo "N8N_COMPRESSION_NODE_MAX_ZIP_ENTRIES=5000" >> ~/n8n/.env
docker compose -f ~/n8n/compose.yml up -d
```

If you run the above command and your n8n home page vanishes, wait a few minutes and refresh the page — it will be back.

![n8n's home page.](https://trendboxgeek.com/content/images/2026/08/Screenshot-From-2026-08-24-14-56-59.png)

Head over to your server's IP on port 5678 in your browser. The secure cookie error will be gone, and you'll see the setup screen asking you to create your owner account. Your n8n instance is fully deployed and ready for workflows.