Skip to main content

n8n

Deploy or redeploy n8n to Google Cloud Run with Cloud Run-safe defaults.

advncd n8n [flags]
advncd launch n8n [flags] # alias

First deploy

Interactive flow — picks project, region, and optionally Postgres:

advncd n8n --set-default

What happens:

  1. Lists your GCP projects (or creates a new one)
  2. Prompts for region
  3. Asks whether to attach external Postgres
  4. Asks whether to set a stable N8N_ENCRYPTION_KEY
  5. Deploys the n8n container to Cloud Run
  6. Enables unauthenticated (public) access
  7. Prints the service URL

--set-default saves the selected project and region as your advncd default config for future commands.


Redeploy

Uses the saved project/region config. No interactive prompts.

advncd n8n --redeploy

To redeploy with a newer image:

advncd n8n --redeploy --image n8nio/n8n:latest

With external Postgres

For production use, attach Postgres for persistent workflow and credential storage.

advncd n8n \
--db-url "postgresql://USER:PASSWORD@HOST:5432/postgres?sslmode=require" \
--db-schema public \
--db-ssl-reject-unauthorized=false \
--encryption-key "YOUR_STABLE_N8N_ENCRYPTION_KEY"

Works with any Postgres provider (Supabase, Neon, Cloud SQL, etc.).

tip

Always set --encryption-key with a stable secret when using Postgres. If you lose the key, n8n cannot decrypt stored credentials.


Non-interactive deploy

Skip all prompts by providing flags explicitly:

advncd n8n \
--project my-n8n-project \
--region europe-west3 \
--set-default

Create a new project if it doesn't exist:

advncd n8n \
--project my-n8n-project \
--create-project \
--project-name "My n8n" \
--region europe-west3 \
--set-default

All flags

FlagDefaultDescription
--projectinteractiveGCP project ID
--project-nameDisplay name for new project
--create-projectfalseCreate the project if it doesn't exist
--regioninteractiveCloud Run region
--servicen8nCloud Run service name
--imagen8nio/n8n:1.86.0Container image
--memory2GiMemory limit
--port5678Container port
--min-instances1Minimum instances (-1 to keep current)
--no-cpu-throttlingtrueDisable CPU throttling (recommended for n8n)
--redeployfalseUse saved project/region and redeploy
--set-defaultfalseSave project/region as default config
--public-urlautoPublic base URL (auto-detected from service URL)
--db-urlPostgreSQL connection URL
--db-schemapublicPostgreSQL schema
--db-ssl-reject-unauthorizedfalseValidate DB SSL certificate
--encryption-keyinteractiveN8N_ENCRYPTION_KEY

Environment variables set by advncd

advncd configures these n8n environment variables automatically:

VariableValue
N8N_ENDPOINT_HEALTH/healthz
N8N_PORT5678 (or --port)
N8N_LISTEN_ADDRESS0.0.0.0
N8N_PUSH_BACKENDsse
N8N_PROXY_HOPS1
N8N_PROTOCOLhttps (from public URL)
N8N_HOSThostname (from public URL)
N8N_EDITOR_BASE_URLfull base URL
WEBHOOK_URLfull base URL

These defaults make n8n work correctly behind Cloud Run's reverse proxy.


Default image

n8nio/n8n:1.86.0

Override at any time with --image.