DOCUMENTATION / DEPLOYMENT
From source to a running platform.
Deployment requirements for Relay platform maintainers and developers hosting their own bots.
Deploy the backend first
- Apply the three relay_bot_* migrations in the pullup repository after the existing community, reaction, Operations and message-page migrations.
- Deploy pullup with /api/relay-bots/* and the native chat proxy dispatcher.
- For webhook delivery, set RELAY_BOT_WEBHOOK_SIGNING_KEY to a securely generated 32-byte hex seed. Keep this private on the backend. Set CRON_SECRET for the once-per-minute worker.
- Verify /api/relay-bots/session and the authenticated dashboard before releasing the client UI.
Deploy this portal
The portal is a Next.js static export. Set NEXT_PUBLIC_RELAY_API_ORIGIN=https://pullup.at, run npm run build, and serve out/. Host at relaydev.pullup.at so the existing first-party authentication cookie works. The backend allowlist includes only the intended production origins. No service-role key or bot token belongs in portal environment variables.
Publish the matching Relay web and iOS changes for bot message rendering, commands, invitations, installation consent and Operations review. The portal alone cannot make those backend and client capabilities available.
Host your bot
Run the Node.js example in a persistent process with the token in an environment secret. Handle shutdown by calling bot.stop(). Use one polling consumer per application, or an HTTPS webhook receiver with durable event deduplication.
Monitor API errors, event backlog and token expiry. Requests and messages have separate rate limits. Permissions may be revoked at any time; treat 403 as a grant change, not a reason to retry indefinitely.
Online and offline
Polling updates and successful webhook delivery refresh presence. A bot appears offline after 90 seconds without a heartbeat. A webhook bot that receives very little traffic should call setPresence every 30–60 seconds from its process. A verification tick does not mean the process is currently online.
relay