Deployment Guide
This guide covers the environment variables and configuration needed to deploy HornetHive with all features enabled.
Environment Variables​
Required — Core​
| Variable | Description | Example |
|---|---|---|
OPENAI_API_KEY | OpenAI API key for LLM calls | sk-... |
SUPABASE_URL | Supabase project URL | https://xyz.supabase.co |
SUPABASE_ANON_KEY | Supabase anonymous/public key | eyJ... |
SUPABASE_SERVICE_ROLE_KEY | Supabase service role key (server-side) | eyJ... |
Required — Payments​
| Variable | Description | Example |
|---|---|---|
STRIPE_SECRET_KEY | Stripe secret key | sk_live_... |
STRIPE_WEBHOOK_SECRET | Stripe webhook signing secret | whsec_... |
STRIPE_PRICE_STARTER_MONTHLY | Stripe price ID for Starter plan | price_... |
STRIPE_PRICE_GROWTH_MONTHLY | Stripe price ID for Growth plan | price_... |
STRIPE_PRICE_PRO_MONTHLY | Stripe price ID for Pro plan | price_... |
Required — Email​
| Variable | Description | Example |
|---|---|---|
RESEND_API_KEY | Resend API key for transactional email | re_... |
FROM_EMAIL | Sender email address | hello@hornethive.ai |
SUPPORT_EMAIL | Support reply-to address | hello@hornethive.ai |
Optional — Telegram Integration​
| Variable | Description | How to Get |
|---|---|---|
TELEGRAM_BOT_TOKEN | Bot token from BotFather | Talk to @BotFather on Telegram, /newbot |
TELEGRAM_WEBHOOK_SECRET | Random secret for webhook verification | Generate: openssl rand -hex 32 |
TELEGRAM_BOT_USERNAME | Bot username (without @) | Set during BotFather setup |
Setting Up the Telegram Bot​
- Message @BotFather on Telegram
- Send
/newbotand follow the prompts - Copy the bot token → set as
TELEGRAM_BOT_TOKEN - Note the username → set as
TELEGRAM_BOT_USERNAME - Generate a webhook secret:
openssl rand -hex 32→ set asTELEGRAM_WEBHOOK_SECRET - 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​
| Variable | Description |
|---|---|
SLACK_CLIENT_ID | Slack app OAuth client ID |
SLACK_CLIENT_SECRET | Slack app OAuth client secret |
SLACK_BOT_TOKEN | Slack bot token for API calls |
SLACK_SIGNING_SECRET | Slack request signing secret |
Optional — Other​
| Variable | Description | Default |
|---|---|---|
ENABLE_BRIEFING_SCHEDULER | Enable background scheduler for digests/nudges | false |
PINECONE_API_KEY | Pinecone vector DB key | — |
UNSPLASH_ACCESS_KEY | Unsplash image suggestions | — |
DEFAULT_MODEL_PROVIDER | Default LLM provider | openai |
DEFAULT_OPENAI_MODEL | Default OpenAI model | gpt-5 |
Production-Only​
| Variable | Description | Value |
|---|---|---|
RAILWAY_ENVIRONMENT | Deployment environment flag | production |
ADDITIONAL_CORS_ORIGINS | Allowed CORS origins | https://app.hornethive.ai,... |
CORS_ALLOW_ALL_ORIGINS | Allow 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_advisorssecurity check) - Frontend
.envhas correctVITE_API_URLpointing to production API - Stripe webhooks pointing to production URL
Post-Deploy​
-
ENABLE_BRIEFING_SCHEDULER=trueset 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:
| Migration | Tables | Purpose |
|---|---|---|
| 016 | assistant_conversations, assistant_messages | Persistent chat history |
| 017 | user_messaging_links | Platform account linking |
| 018 | messaging_link_tokens | One-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
_redirectsfallback
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.