# Host N8N For Free

**URL:** <https://onehack.st/t/host-n8n-for-free/311203>\
**Category:** Tutorials & Methods\
**Tags:** tips-tricks\
**Created:** [September 30, 2025, 10:21pm UTC](https://onehack.st/t/host-n8n-for-free/311203 "2025-09-30T22:21:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lonewolf\_Atlas](https://onehack.st/user_avatar/onehack.st/lonewolf_atlas/32/160913_2.png) [@Lonewolf\_Atlas](https://onehack.st/u/Lonewolf_Atlas)\
**Post date:** [September 30, 2025, 10:21pm UTC](https://onehack.st/t/host-n8n-for-free/311203/1 "2025-09-30T22:21:20Z")

</div>

# Host n8n for Free – 2025 Guide

* * *

## 1) Google Cloud (Free forever)

e2-micro instance: 1 vCPU, 1 GB RAM, 30 GB storage

Install script:

```bash
sudo apt update && sudo apt upgrade -y
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
mkdir ~/n8n && cd ~/n8n

cat > docker-compose.yml << 'EOF'
version: '3.8'
services:
  n8n:
    image: n8nio/n8n:latest
    restart: always
    ports:
      - "5678:5678"
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=admin
      - N8N_BASIC_AUTH_PASSWORD=MyStrongPassword
      # Recommended extras:
      - N8N_HOST=your.domain.com
      - N8N_PROTOCOL=https
      - GENERIC_TIMEZONE=Asia/Kolkata
    volumes:
      - n8n_data:/home/node/.n8n
volumes:
  n8n_data:
EOF

# If your system uses Docker Compose v2, use `docker compose` (space), not `docker-compose`
docker compose up -d || docker-compose up -d
echo "n8n is available at http://YOUR-IP:5678"

```

**Open firewall (GCP):**

- VPC Network → Firewall → **Create firewall rule** → allow TCP 5678 (or terminate TLS via a reverse proxy on 80/443 instead).

* * *

## 2) Oracle Cloud (Most powerful free tier)

- Free: up to 4 OCPUs + 24 GB RAM
- Create account (card verification) → choose “Always Free resources”

Open port:

```bash
sudo iptables -I INPUT -p tcp --dport 5678 -j ACCEPT

```

(Also add a **Security List / Network Security Group** ingress rule for TCP 5678 in the OCI console. Persist iptables rules or use `ufw allow 5678`.)

* * *

## 3) Render (Easiest)

- 750 free hours/month
- Create **New Web Service** → use image `n8nio/n8n:latest`
- Port: **5678**

Environment variables:

```auto
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=admin
N8N_BASIC_AUTH_PASSWORD=MyStrongPassword
N8N_HOST=<your-render-url or custom domain>
N8N_PROTOCOL=https
GENERIC_TIMEZONE=Asia/Kolkata

```

* * *

## 4) Local Hosting

On your own machine:

```bash
docker run -d --name n8n \
  -p 5678:5678 \
  -e N8N_BASIC_AUTH_ACTIVE=true \
  -e N8N_BASIC_AUTH_USER=admin \
  -e N8N_BASIC_AUTH_PASSWORD=MyStrongPassword \
  -e GENERIC_TIMEZONE=Asia/Kolkata \
  -v n8n_data:/home/node/.n8n \
  n8nio/n8n:latest

```

Then visit: `http://localhost:5678`

* * *

## Important Points

- Always change default passwords.

- Back up your workflows regularly.

- Official links:

* * *

## “Loopholes & Gotchas” (don’t get tripped)

- **Public port 5678 = risky.** Put n8n behind a reverse proxy with HTTPS + auth (Caddy, Traefik, or Nginx). Let’s Encrypt is free.

- **Set your public URL** or webhooks won’t trigger correctly:

- **Timezone & cron accuracy:** set `GENERIC_TIMEZONE` (e.g., `Asia/Kolkata`) or schedules fire at UTC by default.

- **Persist data:** always mount `/home/node/.n8n`. Without the volume, you’ll lose credentials/workflows on container rebuilds.

- **External DB for scale:** for reliability and team use, consider Postgres (`DB_TYPE=postgresdb`, `DB_POSTGRESDB_*` vars). SQLite is fine for small solo use but brittle at scale.

- **Email nodes need SMTP:** configure your SMTP credentials in n8n credentials; many providers block port 25—use 587/465 with TLS.

- **GCP quirks:** e2-micro availability varies by region; outbound bandwidth is limited; set a static external IP; configure VPC firewall rules.

- **Oracle quirks:** Always-Free can be revoked if idle or if you breach policies; ensure ingress rules in both OS firewall and OCI Security Lists.

- **Render free plan sleeps:** expect cold starts and potential timeouts; background triggers that need constant uptime may fail—use cron/heartbeat or a ping service.

- **Compose v1 vs v2:** many distros ship Compose v2 (`docker compose`). If `docker-compose` isn’t found, install v2 or use the space version.

- **SSL termination:** easiest path is a proxy container (e.g., Caddy) that auto-issues certs and forwards to n8n:5678.

- **Webhooks from third parties:** some providers require a **public HTTPS** URL (no IP:port). Use a domain + valid cert or an HTTPS tunnel.

- **Backups:** periodically export workflows/credentials; also snapshot the server disk (GCP/OCI) or back up the volume folder.

- **Security hygiene:** rotate credentials, disable default admin, restrict IPs at the firewall, and keep Docker & n8n images updated.

---

<div class="post-metadata">

**Author:** ![slimjval](https://onehack.st/user_avatar/onehack.st/slimjval/32/30254_2.png) [@slimjval](https://onehack.st/u/slimjval)\
**Post date:** [October 4, 2025, 6:25am UTC](https://onehack.st/t/host-n8n-for-free/311203/2 "2025-10-04T06:25:07Z")

</div>

useful share, thanks
