# ============================================================================ # HuggingPost — Postiz on Hugging Face Spaces # Configuration reference (.env.example) # # These vars map to HF Space "Variables and secrets". Paste them at: # https://huggingface.co/spaces///settings → Secrets # ============================================================================ # ── Required for persistence ──────────────────────────────────────────────── # HF token with WRITE access (https://huggingface.co/settings/tokens). # Without it, all data is lost on Space restart. HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxx # Optional. Auto-detected from HF_TOKEN if unset. # HF_USERNAME=your-username # ── Backup tuning ─────────────────────────────────────────────────────────── # Backup interval in seconds. Default 3600 (60 min). SYNC_INTERVAL=3600 # Skip backup if tarball exceeds this size in bytes. Default 100 MB. SYNC_MAX_FILE_BYTES=104857600 # Dataset name. Created at /, private. BACKUP_DATASET_NAME=huggingpost-backup # ── Postiz core (auto-derived in start.sh — override only if needed) ──────── # DATABASE_URL=postgresql://postiz:@localhost:5432/postiz # REDIS_URL=redis://localhost:6379 # JWT_SECRET= # These are derived from SPACE_HOST automatically. Override only for local dev. # FRONTEND_URL=http://localhost:7860 # NEXT_PUBLIC_BACKEND_URL=http://localhost:7860/api # BACKEND_INTERNAL_URL=http://localhost:3000 # ── Media storage ─────────────────────────────────────────────────────────── # "local" = files saved in /postiz/uploads (included in HF Dataset backup). # "cloudflare" = R2 — set the CLOUDFLARE_* vars below. STORAGE_PROVIDER=local # UPLOAD_DIRECTORY=/postiz/uploads # NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY=/uploads # ── Cloudflare R2 (only if STORAGE_PROVIDER=cloudflare) ───────────────────── # Get from your Cloudflare dashboard → R2 → API Tokens. # CLOUDFLARE_ACCOUNT_ID= # CLOUDFLARE_ACCESS_KEY= # CLOUDFLARE_SECRET_ACCESS_KEY= # CLOUDFLARE_BUCKETNAME= # CLOUDFLARE_BUCKET_URL=https://.r2.cloudflarestorage.com/ # CLOUDFLARE_REGION=auto # ── Cloudflare Keep-Alive & Proxy ─────────────────────────────────────────── # Create an API token at https://dash.cloudflare.com/profile/api-tokens # with "Workers Scripts: Edit" permission. # Enables both transparent outbound proxy and Keep-Alive cron monitor. # CLOUDFLARE_WORKERS_TOKEN= # Extra domains to proxy, merged with built-in defaults (Telegram, Discord, WhatsApp, # Facebook, Google). Comma-separated. Set to "*" to proxy ALL external traffic. # CLOUDFLARE_PROXY_DOMAINS=api.sendgrid.com,smtp.resend.com,slack.com # ── Email (Optional — controls signup activation flow) ────────────────────── # Without RESEND_API_KEY, new signups are auto-activated. # RESEND_API_KEY= # EMAIL_FROM_ADDRESS= # EMAIL_FROM_NAME= # Set to true after creating your admin account to lock down the instance. # DISABLE_REGISTRATION=false # ── Misc ──────────────────────────────────────────────────────────────────── # OPENAI_API_KEY= # enables AI assistant inside Postiz # API_LIMIT=30 # ── Developer settings (don't change unless you know why) ─────────────────── NX_ADD_PLUGINS=false IS_GENERAL=true NODE_ENV=production # ── HF Spaces auto-injects these — DO NOT set manually ────────────────────── # SPACE_HOST=.hf.space # SPACE_ID=/ # SPACE_AUTHOR_NAME=