Skip to main content

Deployment Guide

This guide covers the environment variables and configuration needed to deploy HornetHive with all features enabled.

Environment Variables​

Required — Core​

VariableDescriptionExample
OPENAI_API_KEYOpenAI API key for LLM callssk-...
SUPABASE_URLSupabase project URLhttps://xyz.supabase.co
SUPABASE_ANON_KEYSupabase anonymous/public keyeyJ...
SUPABASE_SERVICE_ROLE_KEYSupabase service role key (server-side)eyJ...

Required — Payments​

VariableDescriptionExample
STRIPE_SECRET_KEYStripe secret keysk_live_...
STRIPE_WEBHOOK_SECRETStripe webhook signing secretwhsec_...
STRIPE_PRICE_STARTER_MONTHLYStripe price ID for Starter planprice_...
STRIPE_PRICE_GROWTH_MONTHLYStripe price ID for Growth planprice_...
STRIPE_PRICE_PRO_MONTHLYStripe price ID for Pro planprice_...

Required — Email​

VariableDescriptionExample
RESEND_API_KEYResend API key for transactional emailre_...
FROM_EMAILSender email addresshello@hornethive.ai
SUPPORT_EMAILSupport reply-to addresshello@hornethive.ai

Optional — Telegram Integration​

VariableDescriptionHow to Get
TELEGRAM_BOT_TOKENBot token from BotFatherTalk to @BotFather on Telegram, /newbot
TELEGRAM_WEBHOOK_SECRETRandom secret for webhook verificationGenerate: openssl rand -hex 32
TELEGRAM_BOT_USERNAMEBot username (without @)Set during BotFather setup

Setting Up the Telegram Bot​

  1. Message @BotFather on Telegram
  2. Send /newbot and follow the prompts
  3. Copy the bot token → set as TELEGRAM_BOT_TOKEN
  4. Note the username → set as TELEGRAM_BOT_USERNAME
  5. Generate a webhook secret: openssl rand -hex 32 → set as TELEGRAM_WEBHOOK_SECRET
  6. After deploying, register the webhook:
curl -X POST https://your-api-domain.com/api/messaging/telegram/setup-webhook \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"webhook_url": "https://your-api-domain.com/api/messaging/telegram/webhook"}'

Optional — Slack Integration​

VariableDescription
SLACK_CLIENT_IDSlack app OAuth client ID
SLACK_CLIENT_SECRETSlack app OAuth client secret
SLACK_BOT_TOKENSlack bot token for API calls
SLACK_SIGNING_SECRETSlack request signing secret

Optional — Other​

VariableDescriptionDefault
ENABLE_BRIEFING_SCHEDULEREnable background scheduler for digests/nudgesfalse
PINECONE_API_KEYPinecone vector DB key—
UNSPLASH_ACCESS_KEYUnsplash image suggestions—
DEFAULT_MODEL_PROVIDERDefault LLM provideropenai
DEFAULT_OPENAI_MODELDefault OpenAI modelgpt-5

Production-Only​

VariableDescriptionValue
RAILWAY_ENVIRONMENTDeployment environment flagproduction
ADDITIONAL_CORS_ORIGINSAllowed CORS originshttps://app.hornethive.ai,...
CORS_ALLOW_ALL_ORIGINSAllow all origins (must be false in prod)false

Deployment Checklist​

Pre-Deploy​

  • All environment variables set in Railway/hosting provider
  • Supabase migrations applied (check supabase migration list)
  • Supabase RLS policies verified (get_advisors security check)
  • Frontend .env has correct VITE_API_URL pointing to production API
  • Stripe webhooks pointing to production URL

Post-Deploy​

  • ENABLE_BRIEFING_SCHEDULER=true set in production
  • Telegram webhook registered (POST to /api/messaging/telegram/setup-webhook)
  • Slack app slash command URL updated to production
  • Email sending verified (send a test via Resend dashboard)
  • Run a test crew to verify end-to-end flow
  • Check Supabase security advisors for any new warnings

Database Migrations​

Migrations are applied via the Supabase MCP or dashboard. Key tables added in recent phases:

MigrationTablesPurpose
016assistant_conversations, assistant_messagesPersistent chat history
017user_messaging_linksPlatform account linking
018messaging_link_tokensOne-time link tokens
019— (policy updates)RLS optimization

Infrastructure​

Backend (Railway)​

  • FastAPI application
  • Python 3.11+
  • Deployed from hivewriter-backend/

Frontend (Netlify)​

  • React 18 + Vite
  • Deployed from hivewriter-frontend/
  • SPA routing with _redirects fallback

Docs Site (Netlify)​

  • Docusaurus 3.8
  • Deployed from docs-site/
  • Domain: docs.hornethive.ai

Database (Supabase)​

  • PostgreSQL with RLS
  • Realtime subscriptions for email queue
  • Edge Functions (if any)

Vector DB (Pinecone)​

  • Stores crew output embeddings for RAG context
  • Used by crews for knowledge retrieval

Need help with deployment? Contact support@hornethive.ai.