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:
- Lists your GCP projects (or creates a new one)
- Prompts for region
- Asks whether to attach external Postgres
- Asks whether to set a stable
N8N_ENCRYPTION_KEY - Deploys the n8n container to Cloud Run
- Enables unauthenticated (public) access
- 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.).
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
| Flag | Default | Description |
|---|---|---|
--project | interactive | GCP project ID |
--project-name | — | Display name for new project |
--create-project | false | Create the project if it doesn't exist |
--region | interactive | Cloud Run region |
--service | n8n | Cloud Run service name |
--image | n8nio/n8n:1.86.0 | Container image |
--memory | 2Gi | Memory limit |
--port | 5678 | Container port |
--min-instances | 1 | Minimum instances (-1 to keep current) |
--no-cpu-throttling | true | Disable CPU throttling (recommended for n8n) |
--redeploy | false | Use saved project/region and redeploy |
--set-default | false | Save project/region as default config |
--public-url | auto | Public base URL (auto-detected from service URL) |
--db-url | — | PostgreSQL connection URL |
--db-schema | public | PostgreSQL schema |
--db-ssl-reject-unauthorized | false | Validate DB SSL certificate |
--encryption-key | interactive | N8N_ENCRYPTION_KEY |
Environment variables set by advncd
advncd configures these n8n environment variables automatically:
| Variable | Value |
|---|---|
N8N_ENDPOINT_HEALTH | /healthz |
N8N_PORT | 5678 (or --port) |
N8N_LISTEN_ADDRESS | 0.0.0.0 |
N8N_PUSH_BACKEND | sse |
N8N_PROXY_HOPS | 1 |
N8N_PROTOCOL | https (from public URL) |
N8N_HOST | hostname (from public URL) |
N8N_EDITOR_BASE_URL | full base URL |
WEBHOOK_URL | full 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.