GitHub Gems

Run n8n on Vercel for Free With a Neon Database

A community GitHub project shows how to host the n8n automation server on Vercel's free plan, with a free Neon database and a custom domain for webhooks.

Illustration of a cloud server running workflow automation software
Photo: GitHub

A community project published on GitHub explains how to run a self-hosted n8n automation server at no cost. The setup uses Vercel's free plan, a free Neon database and a custom domain for incoming webhooks and forms. The project, hosted under the account muhammad-zulqarnain-awan, describes itself as an experiment. It is not affiliated with n8n or Vercel, and its author says it is best suited to personal use with low traffic.

How the zero-cost setup works

n8n is normally run on a server that stays switched on at all times. Vercel, by contrast, runs only short-lived functions. According to the GitHub README, the project bridges that gap with a single Vercel function that sits in front of every request to your domain.

When a request arrives, the function starts n8n if it is not already running, waits until the application is ready, and then passes the request along. If nobody uses the instance for four minutes, n8n shuts itself down. That idle shutdown allows the database to sleep as well, which helps the setup stay within Vercel's free limits.

Where your data lives

Workflows, credentials and execution history are stored in a Neon Postgres database rather than on the temporary server. The README stresses that nothing is lost when n8n stops or when the project is redeployed. Credentials are stored encrypted, and the project relies on a secret key that you create yourself and must keep safe.

What works and what does not

The project states that native Schedule Trigger, Cron and Interval nodes work, as they are executed by n8n's built-in scheduler engine. Credentials, the Code node for JavaScript, and the HTTP Request node are also supported, along with other features.

The limits are equally clear. The README warns that the setup is not suitable for sub-minute polling or for continuous background WebSocket connections. Users who need either should choose a conventional persistent server instead.

  • Scheduled workflows using Schedule Trigger, Cron and Interval nodes
  • Encrypted credentials, the Code node and HTTP Request node
  • Data that persists across restarts and redeployments
  • Not suitable for sub-minute polling or continuous background WebSockets

Setup in brief

The README sets out a step-by-step process. Before starting, you need a domain name you control if you want a custom webhook address. Node.js 24 is only required if you intend to test the project on your own computer.

The main steps are to fork or use the template from the repository, import it into Vercel as an 'Other' framework project, and set the Node.js version to 24.x. You then create a free Neon database through the Storage tab in Vercel and connect it to the production environment, which adds the database variables automatically.

Environment variables and domain

Two environment variables must be added in the Vercel project settings. An optional STATUS_TOKEN variable enables a private status page at a dedicated path. You then add your domain under the domains settings and create the DNS record Vercel displays, waiting until the configuration is marked valid.

The README also warns users to check the deployment protection settings. Production must not require a Vercel login, or external services will be unable to reach your webhooks.

Creating the owner account

After redeploying, the first load sets up the database, which can take up to a minute. The README advises creating the owner account immediately, because anyone who finds the URL could otherwise claim it.

Limits, backups and upgrades

The README lists the free allowances on each platform. Vercel's Hobby plan includes 4 CPU-hours and 360 GB-hours per month. Neon's Free plan includes 100 compute-hours and 0.5 GB of storage. The author reports that a cold start used about 9.5 CPU-seconds in local tests, which the README says allows several hundred sessions a month. Users are told to check their real usage in the Vercel and Neon dashboards after a week.

Two practical habits are recommended. Users should close the n8n editor tab when finished, since an open editor keeps the instance awake. Old executions are also deleted automatically after 72 hours or 1,000 runs.

Backups need attention. The README notes that Neon's Free plan keeps only six hours of history, so users should download important workflows regularly from the workflow menu. The n8n version is pinned in package.json on purpose. Upgrading means changing the version, running an install, testing locally and then pushing the change. The README also warns that some features the project relies on, including internal task runner mode and running outside Docker, will be removed in future n8n releases, so users should read the release notes first.

On licensing, the README states that the repository code is MIT licensed. However, n8n itself is installed from npm during the build and is covered by its own license, which users should review before commercial use. It also notes that Vercel's Hobby plan is limited to personal, non-commercial use, and that the project is provided without warranty.

For readers, the project offers a practical way to test automation workflows without paying for a server, provided they accept its constraints. It is best viewed as a personal experiment rather than a production foundation. Anyone considering it should check the current terms of each platform before relying on it.

Source: GitHub

Comments (0)