HeyOrbit

Self-hosting and deployment

Environment variables

Every variable in .env with its purpose and default, grouped by what it switches on.

Updated November 21, 2026

On this page+
  1. Core
  2. AI
  3. Email
  4. Billing
  5. Social connections through Zernio (recommended)
  6. Social connections through Composio (without Zernio)
  7. LinkedIn company pages without Zernio
  8. Social platform apps without Zernio or Composio
  9. Media imports
  10. Storage
  11. Operator and demo
  12. Example

Copy .env.example to .env. Optional variables switch a feature on when set; without them HeyOrbit degrades gracefully and the relevant screen says what isn't available. Restart the app after changing variables.

Core#

VariableRequiredDefaultPurpose
DATABASE_URLYesfile:./dev.dbPrisma connection string: a SQLite file or a Postgres URL (Postgres)
DIRECT_DATABASE_URLNo–Direct (unpooled) Postgres URL used for schema pushes; DATABASE_URL_UNPOOLED is also read
APP_URLYeshttp://localhost:3000Public URL, used for sign-in callbacks, emails, share links and media URLs
APP_SECRETYes–32+ random characters; signs sessions and encrypts stored credentials. Changing it signs everyone out and makes stored credentials unreadable
CRON_SECRETFor external cron–Bearer secret for /api/cron/* (cron)
INPROCESS_SCHEDULERNotrueSet false to turn off the in-process 30-second timer and rely on external cron
MAINTENANCE_EVERY_MINUTESNo30How often background syncs run (analytics, inbox, inbox alerts, token refresh, scheduled reports, renewals); minimum 5. Publishing isn't affected
CHROMIUM_PATHNo–Chromium binary for PDF report export; without it the PDF button opens the print view

AI#

VariableDefaultPurpose
ANTHROPIC_API_KEY–AI captions (including reading post images), writing tools, hashtag suggestions, inbox tagging and reply drafts, and report summaries. Without it HeyOrbit writes simple offline drafts that can't see images
ANTHROPIC_MODELclaude-opus-5-5Model id for text generation
REPLICATE_API_TOKEN–AI Images models (Flux Schnell, Flux 1.1 Pro and Ultra, Imagen 4, Ideogram 3 Turbo, Recraft V3). Without it AI Images offers only the text card

AI features still need the AI Studio add-on, whatever is configured.

Email#

VariableDefaultPurpose
SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSport 587Outgoing email: invitations, approvals, mentions, failures, inbox alerts, scheduled reports. When empty, emails are logged to the console
EMAIL_FROMHeyOrbit <hello@heyorbit.tech>Sender name and address
SUPPORT_EMAILsupport@heyorbit.techWhere support tickets and contact-form messages go

Billing#

VariablePurpose
STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRETStripe checkout and subscription webhooks for US-dollar payments: account slots and the AI add-on, both monthly. Prices are set inline, so there are no Stripe products to create
RAZORPAY_KEY_ID, RAZORPAY_KEY_SECRETRupee payments through Razorpay: account slots and the AI add-on, auto-renewed monthly (Razorpay Subscriptions: UPI AutoPay, cards, bank mandates) or paid one month at a time (Orders). Plans are created automatically on first use and named "HeyOrbit — …". Both must be set for rupee checkout to show
RAZORPAY_WEBHOOK_SECRETSigns Razorpay webhooks. In Razorpay → Settings → Webhooks, point a webhook at {APP_URL}/api/billing/razorpay/webhook with this secret and the events payment.captured, payment.failed, order.paid and subscription.authenticated, .activated, .charged, .pending, .halted, .cancelled, .completed, .updated. Events for objects HeyOrbit didn't create are acknowledged and ignored, so a Razorpay account shared with another business is fine. GET on the same URL answers whether the keys and secret are set (and the key's live / test mode), never their values
RAZORPAY_MAX_RECURRING_INROptional. The largest automatic monthly debit (default 15000, the RBI limit for UPI AutoPay and card mandates without the customer approving each debit). Auto-renew covers up to this amount a month; above it, customers pay month by month

Without a payment provider, account slots and the AI add-on can't be bought online and the Billing page says so.

With ZERNIO_API_KEY set, every social platform connects through Zernio (zernio.com), a social API with its own approved app on each platform: Instagram, Facebook Pages, X, TikTok, YouTube, Pinterest, Threads, Bluesky, Google Business Profile and LinkedIn (personal profiles and company pages). Mastodon keeps its own token connect. Zernio holds the sign-ins; HeyOrbit stores only Zernio's ids, and each workspace gets its own Zernio profile on its first connection.

  • Connect and reconnect open Zernio's hosted flow: the platform's sign-in, then Zernio's own picker where the platform needs one (Facebook Page, LinkedIn profile or company page, Pinterest board, Google Business location). HeyOrbit checks every account against Zernio's list before saving it. Bluesky connects with a handle and app password, which go to Zernio once.
  • Publishing goes through Zernio's Posting API with each platform's options (threads, first comments, Reels and Stories, TikTok privacy and interactions, YouTube title, playlist and thumbnail, Pinterest board, Google Business buttons, events and offers). The composer hides the few options Zernio can't post and says why.
  • Analytics (daily activity, followers, post metrics, Instagram, Facebook, YouTube, TikTok, Pinterest and Google Business insights) are read on the usual background sync. Numbers Zernio doesn't report show as not available, never as 0.
  • Inbox: new comments, DMs and Google reviews arrive by webhook within seconds, so DM automations answer right away; replies, likes, hide and delete go back through Zernio. These accounts skip the regular inbox polling and the DM fast lane: only a safety sync runs every few hours (ZERNIO_INBOX_SAFETY_HOURS, default 6). X sends no comment or DM events, so X keeps the regular inbox sync.
  • Accounts connected before (through Composio or your own apps) keep working. Their Accounts row offers "Reconnect to get instant inbox"; reconnecting moves the same account to Zernio with its history.

LinkedIn through Zernio needs the workspace owner to have a paid account slot, with the account subscription active or within the payment grace period. Without one, the LinkedIn card keeps the Composio / own-app path where this server has one. When the subscription lapses, that owner's LinkedIn accounts are removed on Zernio and marked Needs reconnect, with posts and analytics kept.

VariablePurpose
ZERNIO_API_KEYZernio API key (Zernio → Settings → API keys). Turns on Zernio for every social platform
ZERNIO_WEBHOOK_SECRETOptional. HeyOrbit registers its webhook ({APP_URL}/api/webhooks/zernio, with the post, account and inbox events it handles) in Zernio by itself, signed with a secret derived from APP_SECRET. Set this to choose the secret yourself
ZERNIO_INBOX_SAFETY_HOURSOptional, default 6. How often the inbox of webhook-fed accounts is read anyway, as a safety net

In Zernio: use a plan that includes analytics and the inbox, add a card on file (X connections pass X's API costs through, and TikTok capacity is wider with a card), and set APP_URL to your public HTTPS domain so Zernio can reach the webhook and fetch media. Zernio bills per connected account: the first 2 are free, then $6 each for 3–10, $3 for 11–100 and $1 past 100, per month.

Social connections through Composio (without Zernio)#

Without ZERNIO_API_KEY, Composio can hold each account's sign-in instead, so HeyOrbit still never stores platform tokens. Every publish, analytics read and inbox call goes through Composio, so production needs a paid Composio plan; the free tier's monthly call allowance runs out quickly. Composio also serves the Canva, Google Drive and Dropbox media imports, with or without Zernio.

VariablePurpose
COMPOSIO_API_KEYTurns on Composio for the media imports, and for every social platform except Bluesky and Mastodon when ZERNIO_API_KEY isn't set
COMPOSIO_WEBHOOK_SECRETSigning secret for {APP_URL}/api/composio/webhook, subscribed to the connected-account expired and activated events, so HeyOrbit hears at once when a connection drops
COMPOSIO_AUTH_CONFIG_X, COMPOSIO_AUTH_CONFIG_TIKTOK, COMPOSIO_AUTH_CONFIG_THREADS, COMPOSIO_AUTH_CONFIG_GOOGLE_BUSINESSRequired for these four. Composio has no shared app for them, so register your own developer app in Composio and paste its auth config id (ac_…). Until set, customers see "almost ready" for that platform
COMPOSIO_AUTH_CONFIG_FACEBOOK, COMPOSIO_AUTH_CONFIG_INSTAGRAM, COMPOSIO_AUTH_CONFIG_LINKEDIN, COMPOSIO_AUTH_CONFIG_YOUTUBE, COMPOSIO_AUTH_CONFIG_PINTERESTOptional. These work with Composio's shared apps out of the box; set them to use your own app instead, which is recommended before you grow (shared apps share rate limits)

Composio has no comment or DM events for social platforms, so these accounts' inboxes are read on the regular background sync.

LinkedIn company pages without Zernio#

Composio's shared LinkedIn app can only post to personal profiles, and LinkedIn only grants company-page access to a separate app with its Community Management API product (it can't share an app with "Sign In with LinkedIn"):

  1. Create an app at linkedin.com/developers, linked to your company's LinkedIn page, and have a page admin verify it.
  2. On the app's Products tab, request the Community Management API and fill in the access form. LinkedIn reviews it (often a few days to a few weeks).
  3. Once approved, on the app's Auth tab add the redirect URL {APP_URL}/api/oauth/linkedin-pages/callback, then copy the Client ID and Client Secret into LINKEDIN_PAGES_CLIENT_ID and LINKEDIN_PAGES_CLIENT_SECRET and redeploy. That's all: HeyOrbit connects pages with this app directly.

(Alternatively, put the app in a custom Composio auth config with the scopes r_organization_social, w_organization_social and rw_organization_admin and set COMPOSIO_AUTH_CONFIG_LINKEDIN_PAGES.)

After that, the LinkedIn Page card on the Accounts page connects every page where the member is a Super admin or Content admin, the website and help pages start mentioning company pages, and members who pressed Notify me get a message. Until then the card explains that page access is on its way, and the regular LinkedIn card connects personal profiles.

When a platform becomes available, members who clicked Notify me get a notification during the next background sync.

Social platform apps without Zernio or Composio#

Without Zernio or Composio, you can register each platform's developer app yourself. The redirect URI for every provider is {APP_URL}/api/oauth/{provider}/callback, with provider one of x, linkedin, facebook, instagram, threads, tiktok, youtube, pinterest, google-business.

VariablePlatform
X_CLIENT_ID, X_CLIENT_SECRETX
LINKEDIN_CLIENT_ID, LINKEDIN_CLIENT_SECRETLinkedIn
META_APP_ID, META_APP_SECRETFacebook and Instagram (one Meta app)
META_WEBHOOK_VERIFY_TOKENOptional verify token for Meta webhooks at {APP_URL}/api/webhooks/meta, which trigger an inbox sync when comments or messages arrive (falls back to META_APP_SECRET)
THREADS_APP_ID, THREADS_APP_SECRETThreads
TIKTOK_CLIENT_KEY, TIKTOK_CLIENT_SECRETTikTok
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRETYouTube, Google Business Profile and Google Drive imports
PINTEREST_APP_ID, PINTEREST_APP_SECRETPinterest

Bluesky and Mastodon need no developer app: users connect with a handle and app password, or an instance and access token.

Media imports#

VariablePurpose
UNSPLASH_ACCESS_KEYUnsplash search in the media picker and library
CANVA_CLIENT_ID, CANVA_CLIENT_SECRETCanva imports
DROPBOX_APP_KEYDropbox imports
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRETGoogle Drive imports (shared with YouTube and Google Business Profile)

Storage#

VariablePurpose
AWS_ENDPOINT_URL_S3, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, NEON_STORAGE_BUCKETNeon Object Storage (bucket defaults to uploads)
R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_BUCKET, R2_PUBLIC_URLCloudflare R2
BLOB_READ_WRITE_TOKENVercel Blob

The first configured backend wins, in that order; with none, files go to public/uploads (file storage).

Operator and demo#

VariablePurpose
ADMIN_USERNAME, ADMIN_PASSWORDSign-in for the operator console at /admin. Without a password a built-in default is used and the console shows a reminder: always set one in production
SEED_DEMOtrue seeds the demo workspace on the first Vercel deploy when the database is empty
ENABLE_DEMOtrue offers the Demo sandbox account in production (it's always offered in development)

Example#

bash
DATABASE_URL="postgresql://orbit:secret@db:5432/orbit"
APP_URL="https://social.example.com"
APP_SECRET="replace-with-32-plus-random-characters"
CRON_SECRET="another-long-random-string"
INPROCESS_SCHEDULER="false"
ANTHROPIC_API_KEY="sk-ant-..."
COMPOSIO_API_KEY="..."
ZERNIO_API_KEY="..."
SMTP_HOST="smtp.postmarkapp.com"
SMTP_PORT="587"
SMTP_USER="..."
SMTP_PASS="..."
EMAIL_FROM="Social Team <social@example.com>"