CoolFace
Apppublic

BRPOS/Hugging8N

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes
App README

<!-- Badges --> ![GitHub Stars](https://github.com/somratpro/hugging8n) ![License: MIT](https://opensource.org/licenses/MIT) ![HF Space](https://huggingface.co/spaces) ![n8n](https://n8n.io)

Self-hosted n8n workflow automation โ€” free, no server needed. Hugging8n runs n8n 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.

Table of Contents

โœจ Features

  • โ€”โšก Zero Config: Duplicate this Space, set HF_TOKEN, and start automating โ€“ no other setup needed.
  • โ€”๐Ÿ’พ Persistent Backup: Workflows, credentials, and settings automatically sync to a private HF Dataset, preserving your data across restarts.
  • โ€”๐Ÿ” Secure by Default: Uses n8n's native user management and restricted file permissions (umask 0077).
  • โ€”๐ŸŒ Built-in Connectivity: Includes transparent outbound proxying via Cloudflare Workers for Telegram, WhatsApp-related APIs, Google APIs, Discord, and other external services.
  • โ€”๐Ÿ“Š Premium Dashboard: Beautiful Web UI at / for real-time monitoring of uptime, sync health, and n8n status.
  • โ€”โฐ Easy Keep-Alive: Set up a one-time UptimeRobot monitor directly from the dashboard to keep your free Space awake.
  • โ€”๐Ÿณ Optimized Infrastructure: Minimal resource usage with clean startup logs and production-ready proxying.

๐ŸŽฅ Video Tutorial

Watch a quick walkthrough on YouTube: Deploying Hugging8n on HF Spaces.

๐Ÿš€ Quick Start

Step 1: Duplicate this Space

![Duplicate this Space](https://huggingface.co/spaces/somratpro/Hugging8n?duplicate=true)

Step 2: Add Your Secrets

Navigate to your new Space's Settings, scroll down to Variables and secrets, and add:

  • โ€”HF_TOKEN โ€“ Your HuggingFace token with Write access (for automatic backup).
  • โ€”CLOUDFLARE_WORKERS_TOKEN โ€“ (Highly Recommended) Cloudflare API token. Hugging8n will automatically create and configure a Worker proxy for you.

Step 3: Deploy & Initialize

The Space will build and start automatically. Once ready:

  1. 1.Visit the Space URL.
  2. 2.Click Open n8n Editor.
  3. 3.Create your Owner account (this is your primary login).

Step 4: Monitor & Manage

Use the built-in dashboard at the root URL (/) to track:

  • โ€”Uptime: Real-time uptime monitoring.
  • โ€”Sync Status: Visual indicators for your workflow backups.
  • โ€”Keep-Alive: Setup tool for external monitors.

๐ŸŒ Cloudflare Proxy Setup

Hugging Face Free Tier often restricts outbound connections to services like Telegram, Discord, and WhatsApp. Hugging8n solves this with a Transparent Outbound Proxy via Cloudflare Workers.

โšก Automatic Setup (Recommended)

This is the easiest way. Hugging8n will handle the deployment for you.

  1. 1.Create a Cloudflare API Token:
  2. 2.Go to API Tokens.
  3. 3.Create Token -> Edit Cloudflare Workers template.
  4. 4.Ensure it has Account: Workers Scripts: Edit permissions.
  5. 5.Add the token as a secret named CLOUDFLARE_WORKERS_TOKEN in your Space Settings.

What happens next?

  • โ€”Hugging8n automatically creates a Worker named after your Space.
  • โ€”It generates a secure, private CLOUDFLARE_PROXY_SECRET.
  • โ€”All restricted outbound traffic is automatically routed through this Worker.

๐Ÿ› ๏ธ Manual Setup

If you prefer to manage the Worker yourself:

  1. 1.Create a new Cloudflare Worker.
  2. 2.Paste the code from cloudflare-worker.js and deploy.
  3. 3.Add the Worker URL to your Space as CLOUDFLARE_PROXY_URL.
  4. 4.(Optional) Set a CLOUDFLARE_PROXY_SECRET in both the Worker (as a variable) and the Space (as a secret).

๐Ÿ’พ Persistent Backup

Hugging8n automatically creates a private dataset named hugging8n-backup in your Hugging Face account.

  • โ€”Restore: On startup, it pulls the latest state from your dataset.
  • โ€”Sync: Periodically (every 3 minutes by default), it pushes updates to the dataset.
  • โ€”Status: View current sync health on the Hugging8n Dashboard.
VariableDefaultDescription
SYNC_INTERVAL180Backup frequency in seconds

๐Ÿ’“ Staying Alive (Recommended on Free HF Spaces)

To help keep your Space awake, set up an external UptimeRobot monitor directly from the dashboard UI.

  1. 1.Open your Space's dashboard (/).
  2. 2.Find the Keep Space Awake section.
  3. 3.Paste your UptimeRobot Main API key.
  4. 4.Click Create Monitor.

Hugging8n will automatically create a monitor for your Space's /health endpoint.

๐Ÿ” Security & Advanced (Optional)

Customize your instance with these environment variables:

VariableDefaultDescription
GENERIC_TIMEZONEUTCTimezone for your n8n instance
N8N_LOG_LEVELerrorSet to info or debug for more details
CLOUDFLARE_WORKERS_TOKENโ€”Cloudflare API token for automatic Worker setup
CLOUDFLARE_PROXY_DOMAINS*Comma-separated domains to proxy (or * for all external traffic)
CLOUDFLARE_PROXY_SECRETโ€”Optional shared secret for proxy authentication
CLOUDFLARE_WORKER_NAMEautoCustom name for the automatically created Worker
CLOUDFLARE_ACCOUNT_IDautoOptional Cloudflare account ID override
SPACE_HOST_OVERRIDEโ€”Override detected host for custom domains
N8N_STARTUP_TIMEOUT180Max seconds to wait for n8n readiness
UPTIMEROBOT_SETUP_ENABLEDtrueEnable/disable dashboard helper endpoint
UPTIMEROBOT_RATE_LIMIT_PER_MINUTE5Rate limit for monitor creation

๐Ÿ’ป Local Development

bash
git clone https://github.com/somratpro/hugging8n.git
cd hugging8n
cp .env.example .env
# Edit .env with your secrets

With Docker:

bash
docker build -t hugging8n .
docker run -p 7861:7861 --env-file .env hugging8n

๐Ÿ—๏ธ Architecture

  • โ€”Dashboard (`/`): Management, monitoring, and keep-alive tools.
  • โ€”n8n Editor (`/home/workflows`): All other paths are proxied to the internal n8n instance.
  • โ€”Health Check (`/health`): Used for uptime monitoring and readiness probes.
  • โ€”Sync Engine: Background process managing HF Dataset persistence.
  • โ€”Transparent Proxy: Intercepts requests to blocked domains and routes them via Cloudflare.

๐Ÿ› Troubleshooting

  • โ€”Telegram/Google/WhatsApp not connecting: Ensure CLOUDFLARE_WORKERS_TOKEN or CLOUDFLARE_PROXY_URL is set correctly, or keep CLOUDFLARE_PROXY_DOMAINS=*.
  • โ€”Workflows not saving: Check if HF_TOKEN has Write access to your account.
  • โ€”Space keeps sleeping: Use the dashboard to set up an UptimeRobot monitor.
  • โ€”Authentication errors: n8n v2 uses its own internal users; ensure you created the owner account on first run.

๐ŸŒŸ More Projects

Similar projects by @somratpro โ€” all free, one-click deploy on HF Spaces:

ProjectWhat it runsHF SpaceGitHub
HuggingClawOpenClaw โ€” Claude Code in the browserSpaceRepo
HuggingClipPaperclip โ€” AI agent orchestration platformSpaceRepo

๐Ÿ“š Links

โค๏ธ Support

If Hugging8n saves you time, consider buying me a coffee to keep the projects alive!

USDT (TRC-20 / TRON network only)

TELx8TJz1W1h7n6SgpgGNNGZXpJCEUZrdB
[!WARNING] Send USDT on TRC-20 network only. Sending other tokens or using a different network will result in permanent loss.

๐Ÿค Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

๐Ÿ“„ License

MIT โ€” see LICENSE for details.


Made with โค๏ธ by [@somratpro](https://github.com/somratpro)