docs: revamp README with comprehensive features, setup guides, and project badges
Browse files
README.md
CHANGED
|
@@ -1,32 +1,51 @@
|
|
| 1 |
---
|
| 2 |
title: Hugging8n
|
| 3 |
emoji: π
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
app_port: 7861
|
| 8 |
pinned: true
|
| 9 |
license: mit
|
| 10 |
secrets:
|
| 11 |
- name: HF_TOKEN
|
| 12 |
-
description: HuggingFace token with write access
|
| 13 |
- name: CLOUDFLARE_PROXY_URL
|
| 14 |
-
description: Your Cloudflare Worker URL to bypass platform blocks (Telegram/Discord).
|
| 15 |
---
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
## β¨ Features
|
| 22 |
|
| 23 |
-
- β‘ **Zero Config:** Duplicate this Space, set `HF_TOKEN`, and
|
| 24 |
-
- πΎ **Persistent Backup:** Workflows
|
| 25 |
-
- π **Secure by Default:** Uses n8n
|
| 26 |
-
- π **
|
| 27 |
-
-
|
| 28 |
-
- β° **
|
| 29 |
-
- π³ **Optimized Infrastructure:**
|
| 30 |
|
| 31 |
## π Quick Start
|
| 32 |
|
|
@@ -34,59 +53,116 @@ secrets:
|
|
| 34 |
|
| 35 |
[](https://huggingface.co/spaces/somratpro/Hugging8n?duplicate=true)
|
| 36 |
|
| 37 |
-
### Step 2:
|
| 38 |
|
| 39 |
-
|
| 40 |
|
| 41 |
-
- `HF_TOKEN`
|
|
|
|
| 42 |
|
| 43 |
-
### Step 3:
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
|
|
|
| 48 |
|
| 49 |
-
##
|
| 50 |
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
|
| 54 |
-
| :--- | :--- | :--- |
|
| 55 |
-
| `SYNC_INTERVAL` | `180` | Backup frequency in seconds. |
|
| 56 |
-
| `GENERIC_TIMEZONE` | `UTC` | Timezone for n8n. |
|
| 57 |
-
| `N8N_LOG_LEVEL` | `error` | Set to `info` for more verbose logs. |
|
| 58 |
-
| `CLOUDFLARE_PROXY_URL` | (Required) | Your Cloudflare Worker URL (to bypass Discord/Telegram blocks). |
|
| 59 |
-
| `CLOUDFLARE_PROXY_DOMAINS` | (default) | Comma-separated list of domains to proxy. Use `*` to proxy everything. |
|
| 60 |
-
| `SPACE_HOST_OVERRIDE` | - | Override the detected host if using a custom domain. |
|
| 61 |
|
| 62 |
-
|
| 63 |
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
- **Permissions:** The startup script uses `umask 0077` to ensure all sensitive data is restricted to the node user.
|
| 69 |
|
| 70 |
## πΎ Persistent Backup
|
| 71 |
|
| 72 |
-
Hugging8n automatically creates
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
-
|
| 75 |
-
- **Restoration:** On every startup, Hugging8n pulls the latest state from your dataset before launching n8n.
|
| 76 |
|
| 77 |
-
##
|
| 78 |
|
| 79 |
-
|
| 80 |
-
Hugging Face officially blocks outgoing connections to specific services on Free Tier Spaces. Hugging8n includes a transparent proxy system to bypass this automatically.
|
| 81 |
|
| 82 |
-
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
## ποΈ Architecture
|
| 86 |
|
| 87 |
-
- `/`
|
| 88 |
-
-
|
| 89 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
| 91 |
---
|
| 92 |
*Made with β€οΈ by [@somratpro](https://github.com/somratpro)*
|
|
|
|
| 1 |
---
|
| 2 |
title: Hugging8n
|
| 3 |
emoji: π
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: yellow
|
| 6 |
sdk: docker
|
| 7 |
app_port: 7861
|
| 8 |
pinned: true
|
| 9 |
license: mit
|
| 10 |
secrets:
|
| 11 |
- name: HF_TOKEN
|
| 12 |
+
description: HuggingFace token with write access. Used for automatic workspace backup.
|
| 13 |
- name: CLOUDFLARE_PROXY_URL
|
| 14 |
+
description: Your Cloudflare Worker URL to bypass platform blocks (Telegram/Discord).
|
| 15 |
---
|
| 16 |
|
| 17 |
+
<!-- Badges -->
|
| 18 |
+
[](https://github.com/somratpro/hugging8n)
|
| 19 |
+
[](https://opensource.org/licenses/MIT)
|
| 20 |
+
[](https://huggingface.co/spaces)
|
| 21 |
+
[](https://n8n.io)
|
| 22 |
+
|
| 23 |
+
**Self-hosted n8n workflow automation β free, no server needed.** Hugging8n runs [n8n](https://n8n.io) on HuggingFace Spaces, providing a 24/7 automation engine for your workflows. It includes a premium management dashboard, automatic persistent backup to HF Datasets, and built-in connectivity fixes to bypass platform restrictions. Deploy in minutes on the free HF Spaces tier with full data persistence.
|
| 24 |
+
|
| 25 |
+
## Table of Contents
|
| 26 |
+
|
| 27 |
+
- [β¨ Features](#-features)
|
| 28 |
+
- [π Quick Start](#-quick-start)
|
| 29 |
+
- [π Cloudflare Proxy Setup](#-cloudflare-proxy-setup)
|
| 30 |
+
- [πΎ Persistent Backup](#-persistent-backup)
|
| 31 |
+
- [π Staying Alive](#-staying-alive)
|
| 32 |
+
- [π Security & Advanced *(Optional)*](#-security--advanced-optional)
|
| 33 |
+
- [π» Local Development](#-local-development)
|
| 34 |
+
- [ποΈ Architecture](#-architecture)
|
| 35 |
+
- [π Troubleshooting](#-troubleshooting)
|
| 36 |
+
- [π Links](#-links)
|
| 37 |
+
- [π€ Contributing](#-contributing)
|
| 38 |
+
- [π License](#-license)
|
| 39 |
|
| 40 |
## β¨ Features
|
| 41 |
|
| 42 |
+
- β‘ **Zero Config:** Duplicate this Space, set `HF_TOKEN`, and start automating β no other setup needed.
|
| 43 |
+
- πΎ **Persistent Backup:** Workflows, credentials, and settings automatically sync to a private HF Dataset, preserving your data across restarts.
|
| 44 |
+
- π **Secure by Default:** Uses n8n's native user management and restricted file permissions (`umask 0077`).
|
| 45 |
+
- π **Built-in Connectivity:** Includes Transparent Outbound Proxying and DNS-over-HTTPS (DoH) to bypass Hugging Face networking blocks for Telegram, Discord, and others.
|
| 46 |
+
- π **Premium Dashboard:** Beautiful Web UI at `/` for real-time monitoring of uptime, sync health, and n8n status.
|
| 47 |
+
- β° **Easy Keep-Alive:** Set up a one-time UptimeRobot monitor directly from the dashboard to keep your free Space awake.
|
| 48 |
+
- π³ **Optimized Infrastructure:** Minimal resource usage with clean startup logs and production-ready proxying.
|
| 49 |
|
| 50 |
## π Quick Start
|
| 51 |
|
|
|
|
| 53 |
|
| 54 |
[](https://huggingface.co/spaces/somratpro/Hugging8n?duplicate=true)
|
| 55 |
|
| 56 |
+
### Step 2: Add Your Secrets
|
| 57 |
|
| 58 |
+
Navigate to your new Space's **Settings**, scroll down to **Variables and secrets**, and add:
|
| 59 |
|
| 60 |
+
- `HF_TOKEN` β Your HuggingFace token with **Write** access (to enable automatic backup).
|
| 61 |
+
- `CLOUDFLARE_PROXY_URL` β *(Optional but Recommended)* Your Cloudflare Worker URL to bypass platform blocks.
|
| 62 |
|
| 63 |
+
### Step 3: Deploy & Initialize
|
| 64 |
|
| 65 |
+
The Space will build and start automatically. Once ready:
|
| 66 |
+
1. Visit the Space URL.
|
| 67 |
+
2. Click **Open n8n Editor**.
|
| 68 |
+
3. Create your **Owner account** (this is your primary login).
|
| 69 |
|
| 70 |
+
### Step 4: Monitor & Manage
|
| 71 |
|
| 72 |
+
Use the built-in dashboard at the root URL (`/`) to track:
|
| 73 |
+
- **Uptime:** Real-time uptime monitoring.
|
| 74 |
+
- **Sync Status:** Visual indicators for your workflow backups.
|
| 75 |
+
- **Keep-Alive:** Setup tool for external monitors.
|
| 76 |
|
| 77 |
+
## π Cloudflare Proxy Setup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
+
Hugging Face Free Tier blocks outgoing connections to some services (Telegram, Discord, etc.). Hugging8n includes a transparent proxy system to bypass this.
|
| 80 |
|
| 81 |
+
1. Go to [Cloudflare Workers](https://dash.cloudflare.com/?to=/:account/workers-and-pages).
|
| 82 |
+
2. Create a new Worker and paste the code from [cloudflare-worker.js](./cloudflare-worker.js).
|
| 83 |
+
3. Deploy and copy the Worker URL.
|
| 84 |
+
4. Add this URL as the `CLOUDFLARE_PROXY_URL` secret in your Space settings.
|
| 85 |
|
| 86 |
+
> [!TIP]
|
| 87 |
+
> Check the [Cloudflare Proxy Guide](./CLOUDFLARE_PROXY_GUIDE.md) for detailed step-by-step instructions.
|
|
|
|
| 88 |
|
| 89 |
## πΎ Persistent Backup
|
| 90 |
|
| 91 |
+
Hugging8n automatically creates a private dataset named `hugging8n-backup` in your Hugging Face account.
|
| 92 |
+
|
| 93 |
+
- **Restore:** On startup, it pulls the latest state from your dataset.
|
| 94 |
+
- **Sync:** Periodically (every 3 minutes by default), it pushes updates to the dataset.
|
| 95 |
+
- **Status:** View current sync health on the Hugging8n Dashboard.
|
| 96 |
+
|
| 97 |
+
| Variable | Default | Description |
|
| 98 |
+
| :--- | :--- | :--- |
|
| 99 |
+
| `SYNC_INTERVAL` | `180` | Backup frequency in seconds |
|
| 100 |
+
|
| 101 |
+
## π Staying Alive *(Recommended on Free HF Spaces)*
|
| 102 |
+
|
| 103 |
+
To help keep your Space awake, set up an external UptimeRobot monitor directly from the dashboard UI.
|
| 104 |
+
|
| 105 |
+
1. Open your Space's dashboard (`/`).
|
| 106 |
+
2. Find the **Keep Space Awake** section.
|
| 107 |
+
3. Paste your UptimeRobot **Main API key**.
|
| 108 |
+
4. Click **Create Monitor**.
|
| 109 |
|
| 110 |
+
Hugging8n will automatically create a monitor for your Space's `/health` endpoint.
|
|
|
|
| 111 |
|
| 112 |
+
## π Security & Advanced *(Optional)*
|
| 113 |
|
| 114 |
+
Customize your instance with these environment variables:
|
|
|
|
| 115 |
|
| 116 |
+
| Variable | Default | Description |
|
| 117 |
+
| :--- | :--- | :--- |
|
| 118 |
+
| `GENERIC_TIMEZONE` | `UTC` | Timezone for your n8n instance |
|
| 119 |
+
| `N8N_LOG_LEVEL` | `error` | Set to `info` or `debug` for more details |
|
| 120 |
+
| `CLOUDFLARE_PROXY_DOMAINS` | (default list) | Comma-separated domains to proxy (or `*` for all) |
|
| 121 |
+
| `SPACE_HOST_OVERRIDE` | β | Override detected host for custom domains |
|
| 122 |
+
|
| 123 |
+
## π» Local Development
|
| 124 |
+
|
| 125 |
+
```bash
|
| 126 |
+
git clone https://github.com/somratpro/hugging8n.git
|
| 127 |
+
cd hugging8n
|
| 128 |
+
cp .env.example .env
|
| 129 |
+
# Edit .env with your secrets
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
**With Docker:**
|
| 133 |
+
```bash
|
| 134 |
+
docker build -t hugging8n .
|
| 135 |
+
docker run -p 7861:7861 --env-file .env hugging8n
|
| 136 |
+
```
|
| 137 |
|
| 138 |
## ποΈ Architecture
|
| 139 |
|
| 140 |
+
- **Dashboard (`/`)**: Management, monitoring, and keep-alive tools.
|
| 141 |
+
- **n8n Editor (`/home/workflows`)**: All other paths are proxied to the internal n8n instance.
|
| 142 |
+
- **Health Check (`/health`)**: Used for uptime monitoring and readiness probes.
|
| 143 |
+
- **Sync Engine**: Background process managing HF Dataset persistence.
|
| 144 |
+
- **Transparent Proxy**: Intercepts requests to blocked domains and routes them via Cloudflare.
|
| 145 |
+
|
| 146 |
+
## π Troubleshooting
|
| 147 |
+
|
| 148 |
+
- **Telegram/Discord not connecting:** Ensure `CLOUDFLARE_PROXY_URL` is set correctly.
|
| 149 |
+
- **Workflows not saving:** Check if `HF_TOKEN` has **Write** access to your account.
|
| 150 |
+
- **Space keeps sleeping:** Use the dashboard to set up an UptimeRobot monitor.
|
| 151 |
+
- **Authentication errors:** n8n v2 uses its own internal users; ensure you created the owner account on first run.
|
| 152 |
+
|
| 153 |
+
## π Links
|
| 154 |
+
|
| 155 |
+
- [n8n Documentation](https://docs.n8n.io)
|
| 156 |
+
- [Hugging Face Spaces](https://huggingface.co/docs/hub/spaces)
|
| 157 |
+
- [Cloudflare Workers](https://workers.cloudflare.com/)
|
| 158 |
+
|
| 159 |
+
## π€ Contributing
|
| 160 |
+
|
| 161 |
+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
| 162 |
+
|
| 163 |
+
## π License
|
| 164 |
+
|
| 165 |
+
MIT β see [LICENSE](LICENSE) for details.
|
| 166 |
|
| 167 |
---
|
| 168 |
*Made with β€οΈ by [@somratpro](https://github.com/somratpro)*
|