能力标签
🛠
AI工具

n8n AI工作流自动化

基于 HCL · 开源免费,本地部署,数据完全自主可控
英文名:self-host-n8n-on-gcr
⭐ 602 Stars 🍴 132 Forks 💻 HCL 📄 MIT 🏷 AI 7.8分
7.8AI 综合评分
n8n工作流自动化谷歌云开源自托管AI代理
✦ AI Skill Hub 推荐

AI Skill Hub 推荐使用:n8n AI工作流自动化 是一款优质的AI工具。AI 综合评分 7.8 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。

📚 深度解析
n8n AI工作流自动化 是一款基于 HCL 的开源工具,在 GitHub 上收获 1k+ Star,是n8n、工作流自动化、谷歌云、开源领域中的优质开源项目。开源工具的最大优势在于代码完全透明,你可以审计每一行代码的安全性,也可以根据自身需求进行二次开发和定制。

**为什么要使用开源工具而非商业 SaaS?**
对于个人开发者和有隐私需求的用户,本地部署的开源工具意味着数据不离本机,不受第三方服务商的数据政策约束。同时,开源工具通常没有使用次数限制和月度费用,一次安装即可长期使用,对于高频使用场景的总拥有成本(TCO)远低于订阅制商业工具。

**安装与环境准备**
n8n AI工作流自动化 依赖 HCL 运行环境。建议通过 pyenv(Python)或 nvm(Node.js)管理 HCL 版本,避免全局环境污染。对于新手用户,推荐先创建虚拟环境(python -m venv venv && source venv/bin/activate),再安装依赖,这样即使出现问题也可以随时删除虚拟环境重新开始,不影响系统稳定性。

**社区与维护**
GitHub Issue 和 Discussion 是获取帮助的最快渠道。在提问前建议先检查 Closed Issues(已关闭的问题),大多数常见问题都已有解答。遇到 Bug 时,提供 pip list 的输出、完整错误堆栈和最小可复现示例,能显著提高开发者响应速度。AI Skill Hub 将持续追踪 n8n AI工作流自动化 的版本更新,及时通知重要功能变化。
📋 工具概览

基于Google Cloud的开源n8n工作流自托管解决方案,帮助用户免费搭建企业级自动化平台,无需订阅费用和服务器运维。适合需要工作流自动化、成本敏感的开发团队和企业用户。

n8n AI工作流自动化 是一款基于 HCL 开发的开源工具,专注于 n8n、工作流自动化、谷歌云 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

GitHub Stars
⭐ 602
开发语言
HCL
支持平台
Windows / macOS / Linux
维护状态
正常维护,社区驱动
开源协议
MIT
AI 综合评分
7.8 分
工具类型
AI工具
Forks
132
📖 中文文档
以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

基于Google Cloud的开源n8n工作流自托管解决方案,帮助用户免费搭建企业级自动化平台,无需订阅费用和服务器运维。适合需要工作流自动化、成本敏感的开发团队和企业用户。

n8n AI工作流自动化 是一款基于 HCL 开发的开源工具,专注于 n8n、工作流自动化、谷歌云 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

📌 核心特色
  • 开源免费,支持本地部署,数据完全自主可控
  • 活跃的 GitHub 开源社区,持续迭代更新
  • 提供详细文档和使用示例,新手友好
  • 支持自定义配置,灵活适配不同使用环境
  • 可作为基础组件集成进现有技术栈或进行二次开发
🎯 主要使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 克隆仓库
git clone https://github.com/datawranglerai/self-host-n8n-on-gcr
cd self-host-n8n-on-gcr

# 查看安装说明
cat README.md

# 按 README 完成环境依赖安装后即可使用
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 查看帮助
self-host-n8n-on-gcr --help

# 基本运行
self-host-n8n-on-gcr [options] <input>

# 详细使用说明请查阅文档
# https://github.com/datawranglerai/self-host-n8n-on-gcr
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# self-host-n8n-on-gcr 配置说明
# 查看配置选项
self-host-n8n-on-gcr --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export SELF_HOST_N8N_ON_GCR_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 70/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

Overview

n8n is brilliant for automating all those tedious tasks you'd rather not do manually. This setup uses:

  • Google Cloud Run for hosting the application (pay only when it runs)
  • Cloud SQL PostgreSQL for database persistence (because your workflows should survive restarts)
  • Google Auth Platform for connecting to Google services (sheets, drive, etc.)

Why self-host? Complete control over your automation workflows and data. No arbitrary execution limits. No wondering where your sensitive data is being stored. And with Cloud Run, you get the best of both worlds - the control of self-hosting with the convenience of not having to manage actual servers.

Prerequisites

Before diving in, make sure you've got:

  • A Google Cloud account (they offer a generous free tier for new accounts)
  • gcloud CLI installed and configured (trust me, it's worth not clicking through web consoles)
  • Basic familiarity with Docker and command line
  • Docker (only needed if using custom image - Option B)
  • A domain name (optional, but recommended for production use)

The command line approach might seem intimidating at first, but it means we can script the entire deployment process. And when you need to update or recreate your instance, you'll thank yourself for having everything in a reusable format.

Enable required APIs

gcloud services enable artifactregistry.googleapis.com gcloud services enable run.googleapis.com gcloud services enable sqladmin.googleapis.com gcloud services enable secretmanager.googleapis.com ```

These commands establish your project environment and enable the necessary Google Cloud APIs. We're turning on all the services we'll need upfront to avoid those annoying "please enable this API first" errors later.

Additional Prerequisites

Queue Mode requires: - The redis.googleapis.com and compute.googleapis.com APIs enabled - A VPC network in your project (the default auto-mode VPC is fine) - The VPC's Private Service Access peering range available (used by Cloud Memorystore)

Cloud Memorystore Redis instances are only reachable via a private VPC IP address — they have no public endpoint. Cloud Run connects to them through Direct VPC Egress, which routes private-range traffic (10.x.x.x, 172.16.x.x, 192.168.x.x) through the VPC while leaving public internet traffic on the normal path.

Step 2: Prepare n8n for Cloud Run Deployment

n8n needs a small startup delay when connecting to external databases to avoid a race condition during initialisation. There are two ways to handle this:

Option B: Custom Docker Image (Advanced)

If you need custom startup logic or want detailed debugging output, use a custom Docker image. This approach gives you more control but requires building and maintaining your own image.

Create these two files in your working directory:

startup.sh:

```bash #!/bin/sh

Configure Docker to use gcloud as a credential helper

gcloud auth configure-docker $REGION-docker.pkg.dev

Build and push your image

docker build --platform linux/amd64 -t $REGION-docker.pkg.dev/$PROJECT_ID/n8n-repo/n8n:latest . docker push $REGION-docker.pkg.dev/$PROJECT_ID/n8n-repo/n8n:latest ```

We're explicitly building for linux/amd64 because Cloud Run doesn't support ARM architecture. This is particularly important if you're developing on an M1/M2 Mac - Docker will happily build an ARM image by default, which then fails mysteriously when deployed. Ask me how I know.

Step 7: Deploy to Cloud Run

The moment of truth - let's deploy n8n. The command differs slightly depending on which approach you chose in Step 2.

First, get your Cloud SQL conection namne:

export SQL_CONNECTION=$(gcloud sql instances describe n8n-db --format="value(connectionName)")

Option B: Deploy Using Custom Image

```bash

Deploy to Cloud Run

gcloud run deploy n8n \ --image=$REGION-docker.pkg.dev/$PROJECT_ID/n8n-repo/n8n:latest \ --platform=managed \ --region=$REGION \ --allow-unauthenticated \ --port=5678 \ --cpu=1 \ --memory=2Gi \ --min-instances=0 \ --max-instances=1 \ --no-cpu-throttling \ --set-env-vars="N8N_PATH=/,N8N_PORT=443,N8N_PROTOCOL=https,DB_TYPE=postgresdb,DB_POSTGRESDB_DATABASE=n8n,DB_POSTGRESDB_USER=n8n-user,DB_POSTGRESDB_HOST=/cloudsql/$SQL_CONNECTION,DB_POSTGRESDB_PORT=5432,DB_POSTGRESDB_SCHEMA=public,N8N_USER_FOLDER=/home/node,EXECUTIONS_PROCESS=main,EXECUTIONS_MODE=regular,GENERIC_TIMEZONE=UTC,QUEUE_HEALTH_CHECK_ACTIVE=true,N8N_ENDPOINT_HEALTH=health" \ --set-secrets="DB_POSTGRESDB_PASSWORD=n8n-db-password:latest,N8N_ENCRYPTION_KEY=n8n-encryption-key:latest" \ --add-cloudsql-instances=$SQL_CONNECTION \ --service-account=n8n-service-account@$PROJECT_ID.iam.gserviceaccount.com ```

After deployment, Cloud Run will provide a URL for your n8n instance. Note it down - you'll need it for the next steps.

Update the deployment with proper URL configuration

gcloud run services update n8n \ --region=$REGION \ --update-env-vars="N8N_HOST=$(echo $SERVICE_URL | sed 's/https:\/\///'),N8N_WEBHOOK_URL=$SERVICE_URL,N8N_EDITOR_BASE_URL=$SERVICE_URL" ```

Without these variables, OAuth would fail with utterly unhelpful "redirect_uri_mismatch" errors that make you question your life choices. Setting them correctly means n8n can construct proper callback URLs during authentication flows.

For newer versions of n8n use WEBHOOK_URL instead of N8N_WEBHOOK_URL.

Queue Mode Deployment: Scaling n8n for Production

The steps above give you a solid single-process n8n deployment. For most personal and small-team setups, that's all you'll ever need. But if you start running many concurrent heavy workflows, or if you want to keep the editor responsive while long-running workflows execute in the background, Queue Mode is the answer.

Step QM-5: Deploy the n8n Worker Service

Workers run the n8n worker command instead of n8n start. They do not serve public internet traffic — they poll Redis and connect to Cloud SQL.

gcloud run deploy n8n-worker \
    --image=docker.io/n8nio/n8n:latest \
    --command="/bin/sh" \
    --args="-c,sleep 5; n8n worker" \
    --platform=managed \
    --region=$REGION \
    --no-allow-unauthenticated \
    --ingress=internal \
    --port=5678 \
    --cpu=1 \
    --memory=2Gi \
    --min-instances=1 \
    --max-instances=3 \
    --no-cpu-throttling \
    --vpc-egress=private-ranges-only \
    --network=default \
    --subnet=default \
    --set-env-vars="EXECUTIONS_MODE=queue,DB_TYPE=postgresdb,DB_POSTGRESDB_DATABASE=n8n,DB_POSTGRESDB_USER=n8n-user,DB_POSTGRESDB_HOST=/cloudsql/$SQL_CONNECTION,DB_POSTGRESDB_PORT=5432,DB_POSTGRESDB_SCHEMA=public,N8N_USER_FOLDER=/home/node/.n8n,GENERIC_TIMEZONE=UTC,QUEUE_HEALTH_CHECK_ACTIVE=true,N8N_RUNNERS_ENABLED=true,QUEUE_BULL_REDIS_HOST=$REDIS_HOST,QUEUE_BULL_REDIS_PORT=$REDIS_PORT" \
    --set-secrets="DB_POSTGRESDB_PASSWORD=n8n-db-password:latest,N8N_ENCRYPTION_KEY=n8n-encryption-key:latest,QUEUE_BULL_REDIS_PASSWORD=n8n-redis-auth:latest" \
    --add-cloudsql-instances=$SQL_CONNECTION \
    --service-account=n8n-service-account@$PROJECT_ID.iam.gserviceaccount.com

Key worker settings explained:

SettingValueWhy
--ingress=internalinternalWorkers receive no public HTTP traffic — internal only
--no-allow-unauthenticatedWorkers should not be publicly invokeable
--min-instances=11At least one worker must always be running or queued jobs never start
--no-cpu-throttlingWorkers poll Redis continuously and need CPU between "requests"
EXECUTIONS_MODE=queuequeueTells the worker process to pick up jobs from Redis

Method 1: Rebuild and Redeploy (The Clean Way)

```bash

Rebuild your custom image

docker build --platform linux/amd64 -t $REGION-docker.pkg.dev/$PROJECT_ID/n8n-repo/n8n:latest .

Redeploy your Cloud Run service

gcloud run services update n8n \ --image=$REGION-docker.pkg.dev/$PROJECT_ID/n8n-repo/n8n:latest \ --region=$REGION

Update your Dockerfile to use this specific version

Then rebuild and redeploy as above

```

This approach lets you test new versions before committing to them. Check the n8n GitHub releases page to see what's new before upgrading.

Terraform Deployment Option

Thanks to a generous contribution from the community, there is now a Terraform configuration available to automate the entire deployment process described in this guide. This Terraform setup provisions all necessary Google Cloud resources including Cloud Run, Cloud SQL, Secret Manager, IAM roles, and Artifact Registry.

Using Terraform can simplify and speed up deployment, especially for those familiar with infrastructure as code. The Terraform files and a deployment script are included in the repository.

Quick Terraform Deployment

Clone the repository and navigate to terraform directory

git clone <your-repo-url>
cd <repo-name>/terraform

Initialize Terraform

terraform init

Review the planned changes

terraform plan
[use with flag terraform plan -var-file=terraform.tfvars if you created the terraform.tfvars file]

Deploy the infrastructure.

For Option A (recommended - official image):

terraform apply
[use with flag terraform apply -var-file=terraform.tfvars if you created the terraform.tfvars file]

For Option B (custom image):

terraform apply -var="use_custom_image=true"

Or in terraform.tfvars:

use_custom_image = true  # Only if you want custom image

Terraform Queue Mode Deployment

The Terraform configuration supports Queue Mode through a single feature flag. When enable_queue_mode = true, Terraform will additionally provision:

  • A Cloud Memorystore Redis instance (private, VPC-peered)
  • A Cloud Run worker service (n8n-worker) with internal ingress and min 1 instance
  • A Redis AUTH secret in Secret Manager
  • Direct VPC Egress on both Cloud Run services
  • The redis.googleapis.com and compute.googleapis.com APIs

Enable Queue Mode via CLI flag:

terraform apply -var="enable_queue_mode=true"

Or in terraform.tfvars:

```hcl gcp_project_id = "your-project-id" enable_queue_mode = true

Self-Hosting n8n on Google Cloud Run: Complete Guide

So you want to run n8n without the monthly subscription fees, keep your data under your own control, and avoid the headache of server maintenance? Google Cloud Run offers exactly that sweet spot - serverless deployment with per-use pricing. Let's build this thing properly.

This guide walks you through deploying n8n (that powerful workflow automation platform) on Google Cloud Run with PostgreSQL persistence. You'll end up with a fully functional system that scales automatically, connects to Google services via OAuth, and won't drain your wallet when idle.

🚀 Quick Start Option: Want to skip the manual setup? Jump to the Terraform Deployment Option section for a streamlined, automated deployment. The step-by-step guide below is valuable for understanding what's happening under the hood, but Terraform will handle all the heavy lifting for you!

Print environment variables for debugging

echo "Database settings:" echo "DB_TYPE: $DB_TYPE" echo "DB_POSTGRESDB_HOST: $DB_POSTGRESDB_HOST" echo "DB_POSTGRESDB_PORT: $DB_POSTGRESDB_PORT" echo "N8N_PORT: $N8N_PORT"

Which option should you choose?

  • Go with Option A if you just want n8n working reliably with minimal fuss
  • Use Option B if you need debugging output or custom startup scripts

The rest of this guide will show commands for both approaches where they differ.

Step 3: Set Up a Container Repository (Optional - Custom Image Only)

If you're using Option A (official image), skip this step entirely and go straight to Step 4.

If you're using Option B (custom image), you'll need a place to store your custom container image:

```bash

Key Configuration Notes

Why --no-cpu-throttling? n8n does background processing (database connections, scheduled checks) that happens outside HTTP requests. With CPU throttling enabled, these background tasks get starved and can cause startup issues. This flag ensures n8n gets continuous CPU access, which actually works out cheaper due to eliminated per-request fees and lower CPU/memory rates. Thanks to the Google Cloud Run team for this insight.

Other important settings: - min-instances=0 and max-instances=1 means your service scales to zero when idle (saving money) but won't run multiple instances simultaneously (which can cause database conflicts with n8n) - CPU and memory allocation is sufficient for most workflows without excessive costs - The sleep 5 in Option A handles database initialization timing

Key Differences Between Options

SettingOption A (Official)Option B (Custom)Why Different?
Imagedocker.io/n8nio/n8n:latestYour custom imageDirect from n8n vs your registry
Command--command="/bin/sh" --args="-c,sleep 5; n8n start"Uses custom entrypointSleep added via command vs built into script
N8N_PORT5678443Direct port vs mapped through startup script
N8N_PATHNot needed/Custom image can handle path prefixing

n8n Google Cloud Run Environment Variables

Here's what all those environment variables do:

Environment VariableOption A ValueOption B ValueDescription
N8N_PATHNot needed/Base path where n8n will be accessible (custom image only)
N8N_PORT5678443Port configuration (direct vs mapped)
N8N_PROTOCOLhttpshttpsProtocol used for external access
DB_TYPEpostgresdbpostgresdbMust be exactly "postgresdb" (not postgresql) for proper database connection
N8N_USER_FOLDER/home/node/.n8n/home/nodeLocation for n8n data
EXECUTIONS_PROCESSNot neededmain (deprecated)Deprecated - remove in newer versions
EXECUTIONS_MODENot neededregular (deprecated)Deprecated - remove in newer versions
QUEUE_HEALTH_CHECK_ACTIVEtruetrueCritical for Cloud Run to verify container health
N8N_ENDPOINT_HEALTHhealthhealthRenames the health endpoint from /healthz to /health. Required on Cloud Run because GCP intercepts all /healthz requests at the load-balancer level, returning 404 before the request reaches your container (causing the "Offline" badge in the editor). See [n8n issue #25656](https://github.com/n8n-io/n8n/issues/25656).

Pay special attention to DB_TYPE. It must be "postgresdb" not "postgresql" - a quirk that's caused many deployment headaches. And don't explicitly set the PORT variable as Cloud Run injects this automatically.

Step 8: Configure n8n for OAuth with Google Services

Now we need to update the deployment with environment variables that tell n8n how to properly generate URLs for OAuth callbacks:

```bash

Queue Mode Environment Variables Reference

VariableMain ServiceWorkerDescription
EXECUTIONS_MODEqueuequeueActivates queue mode. Workers won't run without this.
QUEUE_BULL_REDIS_HOSTRedis private IPRedis private IPHost of the Memorystore instance
QUEUE_BULL_REDIS_PORT63796379Redis port (Memorystore default)
QUEUE_BULL_REDIS_PASSWORD(from secret)(from secret)AUTH string stored in Secret Manager
QUEUE_HEALTH_CHECK_ACTIVEtruetrueExposes the health endpoint — required by Cloud Run health checks. The path is controlled by N8N_ENDPOINT_HEALTH (see below).
N8N_ENDPOINT_HEALTHhealthhealthPath for the health endpoint. Set to health (not healthz) because Cloud Run intercepts /healthz at the load-balancer level.
N8N_RUNNERS_ENABLEDnot settrueEnables the task runner subsystem on workers. **Do not set this on the main service in queue mode** — the main process doesn't execute workflows, and setting it here causes n8n to crash at startup before the HTTP server can come up.

For Option A (Official Image)

The simplest approach - just update the image tag:

Update to latest version:

gcloud run services update n8n \
    --image=docker.io/n8nio/n8n:latest \
    --region=$REGION

Or specify a version:

gcloud run services update n8n \
    --image=docker.io/n8nio/n8n:latest:1.115.2 \
    --region=$REGION

Cloud Run will pull the new image and deploy it automatically. Takes about 1-2 minutes.

If you're using Queue Mode, update the worker service too:

gcloud run services update n8n-worker \
    --image=docker.io/n8nio/n8n:latest \
    --region=$REGION

It's important that the main service and all workers run the same n8n version. Mixed versions in queue mode can cause queue protocol mismatches.

For Option B (Custom Image)

Updating Environment Variables

Sometimes you'll need to update environment variables rather than the container itself:

gcloud run services update n8n \
    --region=$REGION \
    --update-env-vars="NEW_VARIABLE=value,UPDATED_VARIABLE=new_value"

This is useful when you need to change configuration without rebuilding the container.

Optional: tune Redis and worker sizing

redis_tier = "BASIC" # or "STANDARD_HA" for production redis_memory_size_gb = 1 worker_min_instances = 1 worker_max_instances = 3 worker_cpu = "1" worker_memory = "2Gi"

Optional: specify VPC network/subnet if not using the default VPC

Step QM-1: Enable Additional APIs

gcloud services enable redis.googleapis.com
gcloud services enable compute.googleapis.com

Troubleshooting

Note: If you used Terraform for deployment, see the Terraform Troubleshooting section for deployment-specific issues.

When things inevitably go sideways, here are the most common issues and how to fix them:

  1. Container Fails to Start:
  • Check Cloud Run logs for specific error messages
  • Verify DB_TYPE is set to "postgresdb" (not "postgresql")
  • Ensure QUEUE_HEALTH_CHECK_ACTIVE is set to "true"
  • Remove the EXECUTIONS_PROCESS=main and EXECUTIONS_MODE=regular environment variables as these are now deprecated in newer versions
  1. OAuth Redirect Issues:
  • Ensure N8N_HOST, N8N_PORT, and N8N_EDITOR_BASE_URL are correctly set
  • Verify redirect URIs in Google Cloud Console match exactly what n8n generates
  • Confirm N8N_PORT is set to 443 (not 5678) for external URL formatting
  1. Database Connection Problems:
  • Check DB_POSTGRESDB_HOST format for Cloud SQL connections
  • Ensure service account has Cloud SQL Client role
  1. Node Trigger Issues:
  • Use WEBHOOK_URL instead of N8N_WEBHOOK_URL for newer n8n versions
  • Add proxy hop configurations by including N8N_PROXY_HOPS=1 as Cloud Run acts as a reverse proxy

Terraform Troubleshooting

If you're encountering issues with Terraform deployment, especially after a previous manual installation attempt or a failed Terraform run, you may need to clean up existing resources first.

Common scenarios requiring cleanup: - You followed the manual steps before discovering the Terraform option - A previous Terraform deployment timed out or lost connectivity mid-build - You're seeing "resource already exists" errors

Clean up steps:

  1. Remove Terraform state files (if you have a corrupted state):
cd terraform/
rm -rf terraform.tfstate*
rm -rf .terraform/
  1. Delete existing Google Cloud resources via Console or CLI:

Artifact Registry:

gcloud artifacts repositories delete n8n-repo --location=$REGION

Cloud SQL Instance:

gcloud sql instances delete n8n-db

Secrets:

gcloud secrets delete n8n-db-password
gcloud secrets delete n8n-encryption-key
gcloud secrets delete n8n-redis-auth  # Queue Mode only

Service Account:

gcloud iam service-accounts delete n8n-service-account@$PROJECT_ID.iam.gserviceaccount.com

Cloud Run Services:

gcloud run services delete n8n --region=$REGION
gcloud run services delete n8n-worker --region=$REGION  # Queue Mode only

Cloud Memorystore Redis (Queue Mode only):

gcloud redis instances delete n8n-redis --region=$REGION

3. Alternative: Use Google Cloud Console - Navigate to each service (Cloud Run, Cloud SQL, Memorystore, Secret Manager, IAM, Artifact Registry) - Identify and delete resources with names matching the Terraform configuration - This visual approach can be easier for identifying partially-created resources

  1. Re-run Terraform:
terraform init
terraform plan # Verify no conflicts remain
terraform apply

Pro tip: If you're unsure which resources were created, check the Terraform configuration files to see the exact resource names and types that will be provisioned.

Huge thanks to @alliecatowo for this valuable addition!

For more details and usage instructions, please see the terraform/ directory in this repository.

---

And there you have it - a fully functional n8n instance running on Google Cloud Run. You get all the benefits of self-hosting without the headache of managing servers. Your workflows run reliably, your data stays under your control, and you only pay for what you use.

🎯 aiskill88 AI 点评 A 级 2026-05-22

基础设施即代码方案,降低n8n部署门槛,生态完整但文档依赖,适合有云计算经验的用户。

📚 实用指南(长尾问题)
适合谁
  • 需要 self-host-n8n-on-gcr 解决具体问题的开发者与运营人员
最佳实践
  • 先在测试环境跑通最小用例,再接入生产数据
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
部署方案
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
self-host-n8n-on-gcr 中文教程self-host-n8n-on-gcr 安装报错怎么办self-host-n8n-on-gcr 与同类工具对比self-host-n8n-on-gcr 最佳实践self-host-n8n-on-gcr 适合谁用
⚡ 核心功能
👥 适合谁
  • 需要 self-host-n8n-on-gcr 解决具体问题的开发者与运营人员
⭐ 最佳实践
  • 先在测试环境跑通最小用例,再接入生产数据
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
👥 适合人群
AI 技术爱好者研究人员和学生开发者和工程师技术创业者
🎯 使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
⚖️ 优点与不足
✅ 优点
  • +MIT 协议,可免费商用
  • +完全开源免费,无授权费用
  • +本地部署,数据完全自主可控
  • +开发者社区支持,遇问题可查可问
⚠️ 不足
  • 安装和初始配置可能需要一定技术基础
  • 功能完整性通常不如成熟商业产品
  • 技术支持主要依赖开源社区,响应速度不稳定
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐
📚 相关教程推荐
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合
❓ 常见问题 FAQ
完全自托管免费,无订阅费用,数据隐私可控,支持自定义扩展。
💡 AI Skill Hub 点评

总体来看,n8n AI工作流自动化 是一款质量良好的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。

📚 深入学习 n8n AI工作流自动化
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 self-host-n8n-on-gcr
原始描述 开源n8n工作流:Self-host n8n on Google Cloud without the subscription fees or server headaches 。⭐602 · HCL
Topics n8n工作流自动化谷歌云开源自托管AI代理
GitHub https://github.com/datawranglerai/self-host-n8n-on-gcr
License MIT
语言 HCL
🔗 原始来源
🐙 GitHub 仓库  https://github.com/datawranglerai/self-host-n8n-on-gcr

收录时间:2026-05-13 · 更新时间:2026-05-16 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。