Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Running full n8n on Vercel's free plan (with a free Postgres and your own domain)

Description and use

Deploying n8n on Vercel Hobby with free Neon Postgres: a function starts n8n, stops after 4 min idle, stores all data in the database, works with webhooks and forms, but lacks schedulers and large request support.

Problem

Deploying a self‑hosted n8n instance on Vercel’s free Hobby plan while keeping database usage and function runtime within free tier limits.

Outcome

The setup works for owner setup, login, editor UI, webhooks, form triggers, credentials, and parallel webhook calls, with clean idle shutdown. Cold starts take ~9–10 s locally.

Workflow

  • Configure vercel.json to rewrite all URLs to a single function
  • Deploy a proxy handler that forwards requests to local n8n
  • Deploy a supervisor that starts n8n on first request, waits for readiness, and stops it after 4 minutes of idle time
  • Use a config builder to split a Neon connection URL into n8n’s required DB_POSTGRESDB_* variables
  • Set n8n environment variables: N8N_PUSH_BACKEND=sse, N8N_DEFAULT_BINARY_DATA_MODE=database, small DB pool, slow ping, disable community packages, request size limit
  • Deploy the project to Vercel with your own domain and a Neon Postgres database
  • Test owner setup, login, editor UI, webhooks, form triggers, credentials, parallel webhook calls, and idle shutdown

Evidence

One Vercel function sits in front of n8n: 1) vercel.json rewrites every URL to a single function. 2) On the first request, the function starts n8n as a child process on 127.0.0.1. 3) It waits for n8n's readiness check, then proxies the request to it. 4) After 4 minutes without traffic, it stops n8n.

Source

All state lives in Neon Postgres: workflows, credentials (encrypted), execution history. Nothing important sits on the function's temporary disk, so restarts lose nothing.

Source

Owner setup, login and the editor UI; Production webhooks, including a Code node; A webhook as the very first request after a cold start: correct response each time; Form triggers: the form renders and submissions run; Credentials: saved encrypted, still decrypting after a full restart; 20 parallel webhook calls: all returned 200; Idle shutdown: n8n exits cleanly and all database connections close.

Source

Schedule and polling triggers are unreliable. They need a process that's always running. On the Hobby plan, cron is at most daily.

Source

  • Record date: 2026-10-12T13:41:10.534Z