Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,11 +1,116 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: red
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
-
license: mit
|
| 9 |
---
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: n8n_02
|
| 3 |
+
emoji: 🔥
|
| 4 |
+
colorFrom: green
|
| 5 |
colorTo: red
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
+
|
| 11 |
+
n8n 是一个强大的开源自动化工具,本项目通过 Docker 方式将 n8n 部署在 Huggingface Spaces 上,实现个人云端自动化平台。
|
| 12 |
+
|
| 13 |
+
# n8n on Huggingface Spaces
|
| 14 |
+
|
| 15 |
+
<div align="center">
|
| 16 |
+
<img src="https://n8n.io/images/n8n-logo.png" alt="n8n logo" width="120" />
|
| 17 |
+
<img src="https://huggingface.co/front/assets/huggingface_logo-noborder.svg" alt="Huggingface logo" width="120" style="margin-left:40px;"/>
|
| 18 |
+
</div>
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
## 中文说明
|
| 23 |
+
|
| 24 |
+
### 简介
|
| 25 |
+
n8n 是一个强大的开源自动化工具,本项目通过 Docker 方式将 n8n 部署在 Huggingface Spaces 上,实现个人云端自动化平台。
|
| 26 |
+
|
| 27 |
+
### 项目简介
|
| 28 |
+
本项目基于官方 n8n Docker 镜像,适配 Huggingface Spaces 的部署环境。你可以在 Huggingface Spaces 上一键运行属于自己的 n8n 服务,随时随地访问和管理自动化流程。
|
| 29 |
+
|
| 30 |
+
### 部署方法
|
| 31 |
+
1. Fork 或上传本项目到你的 Huggingface Space
|
| 32 |
+
2. 选择 Space 类型为 `Docker`
|
| 33 |
+
3. Space 会自动根据 `Dockerfile` 构建并启动 n8n 服务
|
| 34 |
+
4. 构建完成后,访问 Space 提供的 Web 界面(端口已适配为 7860)
|
| 35 |
+
|
| 36 |
+
<div align="center">
|
| 37 |
+
<img src="https://docs.n8n.io/images/ui/workflow-editor.png" alt="n8n workflow editor" width="500" />
|
| 38 |
+
</div>
|
| 39 |
+
|
| 40 |
+
#### 重要说明
|
| 41 |
+
- 默认端口已由 n8n 的 5678 改为 7860,兼容 Huggingface Spaces 的 Web 服务要求
|
| 42 |
+
- 数据持久化目录为 `/home/node/.n8n`,可在 Space 设置中配置持久化存储
|
| 43 |
+
- 如需自定义 webhook 地址,可设置 `WEBHOOK_URL` 环境变量
|
| 44 |
+
|
| 45 |
+
### 主要环境变量
|
| 46 |
+
|
| 47 |
+
| 变量名 | 说明 | 默认值 |
|
| 48 |
+
| ------ | ---- | ------ |
|
| 49 |
+
| N8N_HOST | 监听地址 | 0.0.0.0 |
|
| 50 |
+
| N8N_PORT | 服务端口 | 7860 |
|
| 51 |
+
| N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS | 权限修复 | true |
|
| 52 |
+
| WEBHOOK_URL | 外部 webhook 地址 | 空 |
|
| 53 |
+
| N8N_RUNNERS_ENABLED | 启用 task runners | true |
|
| 54 |
+
|
| 55 |
+
### 数据持久化
|
| 56 |
+
n8n 的所有数据(如 workflow、凭据等)默认存储在 `/home/node/.n8n` 目录。建议在 Huggingface Space 设置中启用持久化存储,避免数据丢失。
|
| 57 |
+
|
| 58 |
+
### 项目优点
|
| 59 |
+
- **零运维**:无需服务器,直接在 Huggingface Spaces 云端运行
|
| 60 |
+
- **一键部署**:只需上传或 Fork 即可自动构建
|
| 61 |
+
- **安全隔离**:每个 Space 独立运行,数据互不干扰
|
| 62 |
+
- **开源可定制**:可根据需求修改 Dockerfile 或 n8n 配置
|
| 63 |
+
- **支持 Webhook 与自动化**:适合个人、团队的自动化需求
|
| 64 |
+
|
| 65 |
+
### 参考
|
| 66 |
+
- [n8n 官方文档](https://docs.n8n.io/)
|
| 67 |
+
- [Huggingface Spaces Docker 配置参考](https://huggingface.co/docs/hub/spaces-config-reference)
|
| 68 |
+
|
| 69 |
+
---
|
| 70 |
+
|
| 71 |
+
## English Section
|
| 72 |
+
|
| 73 |
+
### Introduction
|
| 74 |
+
n8n is a powerful open-source workflow automation tool. This project enables you to deploy n8n on Huggingface Spaces using Docker, so you can run your own cloud-based automation platform easily.
|
| 75 |
+
|
| 76 |
+
### Project Overview
|
| 77 |
+
This project is based on the official n8n Docker image and is adapted for Huggingface Spaces. You can run your own n8n service on Huggingface Spaces with one click, and manage your workflows anytime, anywhere.
|
| 78 |
+
|
| 79 |
+
### Deployment Steps
|
| 80 |
+
1. Fork or upload this repo to your Huggingface Space
|
| 81 |
+
2. Select Space type as `Docker`
|
| 82 |
+
3. The Space will automatically build and start n8n using the `Dockerfile`
|
| 83 |
+
4. After build, access the web UI via the Space URL (port 7860)
|
| 84 |
+
|
| 85 |
+
<div align="center">
|
| 86 |
+
<img src="https://docs.n8n.io/images/ui/workflow-editor.png" alt="n8n workflow editor" width="500" />
|
| 87 |
+
</div>
|
| 88 |
+
|
| 89 |
+
#### Notes
|
| 90 |
+
- Default port changed from 5678 to 7860 for Huggingface Spaces compatibility
|
| 91 |
+
- Data is stored in `/home/node/.n8n`, enable persistent storage in Space settings
|
| 92 |
+
- Set `WEBHOOK_URL` env variable to customize webhook address
|
| 93 |
+
|
| 94 |
+
### Main Environment Variables
|
| 95 |
+
|
| 96 |
+
| Name | Description | Default |
|
| 97 |
+
| ---- | ----------- | ------- |
|
| 98 |
+
| N8N_HOST | Listen address | 0.0.0.0 |
|
| 99 |
+
| N8N_PORT | Service port | 7860 |
|
| 100 |
+
| N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS | Permission fix | true |
|
| 101 |
+
| WEBHOOK_URL | External webhook URL | (empty) |
|
| 102 |
+
| N8N_RUNNERS_ENABLED | Enable task runners | true |
|
| 103 |
+
|
| 104 |
+
### Data Persistence
|
| 105 |
+
All n8n data (workflows, credentials, etc.) are stored in `/home/node/.n8n`. It is recommended to enable persistent storage in your Huggingface Space to avoid data loss.
|
| 106 |
+
|
| 107 |
+
### Advantages
|
| 108 |
+
- **Zero maintenance**: No server needed, runs in the cloud
|
| 109 |
+
- **One-click deployment**: Just upload or fork to build automatically
|
| 110 |
+
- **Secure isolation**: Each Space runs independently
|
| 111 |
+
- **Open-source & customizable**: Modify Dockerfile or n8n config as needed
|
| 112 |
+
- **Webhook & automation support**: Perfect for individuals and teams
|
| 113 |
+
|
| 114 |
+
### References
|
| 115 |
+
- [n8n Docs](https://docs.n8n.io/)
|
| 116 |
+
- [Huggingface Spaces Docker Reference](https://huggingface.co/docs/hub/spaces-config-reference)
|