Crescendo Lab

n8n hosting · Agent Lab Deploy

Self-host n8n
without touching a server.

Paste one sentence into Claude Code, Codex or Cursor and Agent Lab runs n8n with PostgreSQL, free to try.

Set up n8n freeJump to the Dockerfile

Why self-host

Why self-host n8n instead of n8n Cloud

Open-source workflow automation with no execution cap, and your data stays yours.

No server to run

Builds, runtime, HTTPS and releases are handled by the platform.

Unlimited executions

Run a workflow as often as you like; no execution cap.

Keys generated by the platform

N8N_ENCRYPTION_KEY and the database password never pass through the chat.

Upgrades roll back

If an upgrade misbehaves, one action restores the previous release.

Choosing

n8n Cloud vs a VPS vs Agent Lab

The table scrolls sideways.

Self-hosting n8n compared across n8n Cloud, a VPS you rent, and Agent Lab Deploy
What matters to youAgent Lab Deployn8n CloudYour own VPS
CostFree to try; always-on from Pro at US$29/month (US$14 credit included)Starter about €20/month billed yearly, 2,500 executions a monthAbout US$5–20/month, plus your own upkeep
ExecutionsUnlimited2,500 a month on StarterUnlimited
Who runs the server, updates, HTTPSThe platformn8nYou
Where the data livesYour Agent Lab organization (Google Cloud)n8n's cloudYour VPS
SetupOne sentence to an AI toolSign upSSH, Docker, reverse proxy
When idleFree sleeps, Pro stays onAlways onAlways on, always billed

How

Connect → one sentence → open the URL → create the owner

  1. Connect Agent Lab

    One MCP line in your AI tool, one browser sign-in. How →

  2. Paste the sentence below

    The agent creates the app, connects PostgreSQL, generates the key and builds.

  3. Open the preview URL

    On first open, n8n asks you to create the owner account.

  4. Upgrade when it's for real

    Free sleeps after 15 idle minutes; Pro stays on and takes a custom domain.

Copy and go

The Dockerfile and the sentence

Workflows and credentials live in PostgreSQL, so a rebuilt container loses nothing.

Dockerfile

Dockerfile

FROM docker.n8n.io/n8nio/n8n:latest
USER node
ENV N8N_USER_FOLDER=/tmp/n8n \
    DB_TYPE=postgresdb \
    N8N_DIAGNOSTICS_ENABLED=false \
    GENERIC_TIMEZONE=Asia/Taipei
EXPOSE 5678
CMD ["sh", "-c", "N8N_PORT=$PORT n8n"]
  • DB_POSTGRESDB_HOST / PORT / DATABASE / USER / PASSWORD written by databases_connect_app
  • N8N_ENCRYPTION_KEY generated by sites_secrets_generate; a changed key can't read saved credentials
  • WEBHOOK_URL your address, so webhooks resolve correctly
PROMPT

Say this to your AI tool

Read https://app.agentlab.cresclab.com/agent/deploy.md and deploy n8n to Agent Lab with the Dockerfile at agentlab.cresclab.com/en/deploy/n8n: create an S PostgreSQL and connect it with databases_connect_app, map its connection to the DB_POSTGRESDB_* variables, generate N8N_ENCRYPTION_KEY with sites_secrets_generate, set WEBHOOK_URL to the app's address. Give me the preview URL when the build passes.

FAQ

Before you self-host n8n

How much does it cost to self-host n8n?
Free runs one size-S n8n with one S PostgreSQL at no charge, sleeping after 15 idle minutes. Always-on is Pro at US$29 a month before tax with US$14 of usage credit; n8n prefers size M, billed from the credit.
Self-hosted n8n vs n8n Cloud?
n8n Cloud is managed by n8n and caps executions per plan. On Agent Lab the platform runs the server, your data stays in your organization, and executions are unlimited.
Can I self-host n8n for free?
Yes. n8n is open source under the Sustainable Use License, and Agent Lab's Free plan runs one size-S n8n once a card is on file, which is never charged.
Do I lose workflows when the container rebuilds or sleeps?
No. Workflows, credentials and execution history live in PostgreSQL; the container only writes to /tmp, which a rebuild clears.
Do I need to know Docker to self-host n8n?
No. Paste the sentence into Claude Code, Codex or Cursor; it builds, connects the database and sets the variables, and you just approve going live.
Can I connect LINE, ChatGPT or Google Sheets?
Yes, all are built-in or community n8n nodes. LINE webhooks need WEBHOOK_URL set to your address; AI nodes use your own OpenAI, Anthropic or Gemini keys.
What's the easiest way to host n8n?
Connect Agent Lab's MCP server to Claude Code, Codex or Cursor and paste the sentence on this page: it builds the official n8n image, connects PostgreSQL, generates N8N_ENCRYPTION_KEY and returns a URL.
How do I upgrade n8n?
Ask your AI tool to change the image tag and deploy again. The new release runs on its own preview URL first, and one action restores the previous one.