Hugging8N / .env.example
somratpro's picture
feat: enhance Cloudflare proxy with shared secret support, add uptime monitoring features, and improve startup timeout handling
7f99b73
raw
history blame
2.16 kB
# Your Hugging Face write token
HF_TOKEN=
# Your Hugging Face username (inferred automatically on HF Spaces)
HF_USERNAME=
# Name of the private dataset repo used for backup
BACKUP_DATASET_NAME=hugging8n-backup
# How often to sync the backup, in seconds
SYNC_INTERVAL=180
# -----------------------------------------------------------------------------
# OPTIONAL β€” n8n Configuration
# -----------------------------------------------------------------------------
# Timezone for n8n triggers (e.g. Asia/Dhaka)
GENERIC_TIMEZONE=UTC
# n8n encryption key β€” protects stored credentials. Persisted in backup.
# Generate with: openssl rand -hex 32
N8N_ENCRYPTION_KEY=
# -----------------------------------------------------------------------------
# ADVANCED β€” n8n Internals
# -----------------------------------------------------------------------------
# Internal n8n port (default: 5678)
N8N_PORT=5678
# Public proxy port exposed by HF Spaces (default: 7861)
PUBLIC_PORT=7861
# Disable unnecessary services
N8N_PYTHON_NODES_ENABLED=false
N8N_TASK_RUNNERS_ENABLED=false
N8N_LICENSE_AUTO_RENEW_ENABLED=false
N8N_LOG_LEVEL=error
# -----------------------------------------------------------------------------
# NETWORK β€” Outbound Proxy (Bypass HF Blocks)
# -----------------------------------------------------------------------------
# Your Cloudflare Worker URL (e.g. h8n-proxy.somrat.workers.dev)
CLOUDFLARE_PROXY_URL=
# Optional shared secret that should match Worker CLOUDFLARE_PROXY_SECRET
# If unset, proxy still works but without app-to-worker auth
# Generate with: openssl rand -hex 24
CLOUDFLARE_PROXY_SECRET=
# Comma-separated list of domains to proxy. Use "*" to proxy everything.
CLOUDFLARE_PROXY_DOMAINS=api.telegram.org,discord.com,discordapp.com
# Dashboard helper hardening
UPTIMEROBOT_SETUP_ENABLED=true
UPTIMEROBOT_RATE_LIMIT_PER_MINUTE=5
# Max seconds to wait for n8n readiness at startup
N8N_STARTUP_TIMEOUT=180
# BUILD-TIME VARIABLE (HF Spaces: add as Variable, not Secret)
# -----------------------------------------------------------------------------
# Pin a specific n8n version for reproducibility
N8N_VERSION=latest