Reference
Environment variables
Every env var across the API, workers, Discord bot, Credentials Helper, overlay, and wiki.
rustplus-api
Runtime
| Var | Default | Notes |
|---|---|---|
NODE_ENV | development | production flips cookie secure and disables debug routes. |
PORT | 3000 | Fastify listen port. |
LOG_LEVEL | info | debug for verbose, warn in production if you want it quiet. |
URLs
| Var | Required | Notes |
|---|---|---|
PUBLIC_URL | yes | The public URL of the API. Steam's OpenID callback must hit this URL. |
FRONTEND_URL | yes | Where to redirect after login/checkout. Also CORS-allowed origin. |
ADMIN_ORIGIN | optional | Local admin port. Added to CORS allowlist + Steam-OpenID ?return=. |
Database & session
| Var | Required | Notes |
|---|---|---|
DATABASE_URL | yes | Postgres connection string. |
SESSION_SECRET | yes | 32-byte hex; generate with openssl rand -hex 32. |
SESSION_SALT | yes | 16-char string. |
CREDS_ENCRYPTION_KEY | yes | 32-byte hex; AES-256-GCM key for FCM credentials. |
CREDS_ENCRYPTION_KEY_PREV | no | Previous key during a rotation; allows decrypt with old, re-encrypt with new. |
Stripe
| Var | Required | Notes |
|---|---|---|
STRIPE_SECRET_KEY | yes | sk_test_* for dev, sk_live_* in prod. |
STRIPE_WEBHOOK_SECRET | yes | whsec_*. From the Stripe CLI (dev) or Dashboard webhook (prod). |
STRIPE_PRICE_SCOUT | yes | price_*. |
STRIPE_PRICE_OPERATOR | yes | price_*. |
STRIPE_PRICE_OVERLORD | yes | price_*. |
External APIs
| Var | Required | Notes |
|---|---|---|
STEAM_WEB_API_KEY | optional | Profile enrichment + vanity URL resolution. |
BATTLEMETRICS_TOKEN | optional | Required for !alias and !track. |
LIBRETRANSLATE_URL | optional | Required for !translate. Blank → command returns not configured. |
LIBRETRANSLATE_API_KEY | optional | Only needed for hosted libretranslate.com. |
GROQ_API_KEY | optional | Required for !pulse. Free tier @ console.groq.com. |
GROQ_MODEL | llama-3.1-8b-instant | Override to llama-3.3-70b-versatile for slower/smarter. |
GROQ_BASE_URL | https://api.groq.com/openai/v1 | Only override for proxies / OpenAI-compatible alternatives. |
Discord (per-user OAuth)
| Var | Required | Notes |
|---|---|---|
DISCORD_CLIENT_ID | yes | From the Discord developer portal. |
DISCORD_CLIENT_SECRET | yes | From the Discord developer portal. |
DISCORD_BOT_TOKEN | yes | The bot's token. |
DISCORD_PUBLIC_KEY | yes | For interaction signature verification. |
Web push
| Var | Required | Notes |
|---|---|---|
VAPID_PUBLIC_KEY | yes | Generate with npm run vapid:generate. |
VAPID_PRIVATE_KEY | yes | Pair to the public key. |
VAPID_CONTACT | yes | mailto:support@rustpulse.app. |
Admin
| Var | Required | Notes |
|---|---|---|
ADMIN_STEAM_IDS | optional | Comma-separated Steam64s. Empty → admin disabled. |
Discord support bot
| Var | Required | Notes |
|---|---|---|
DISCORD_BOT_TOKEN | yes | The support-bot token (different from the user-facing OAuth bot). |
DISCORD_CLIENT_ID | yes | |
DISCORD_GUILD_ID | yes | Single-guild bot. |
RUSTPULSE_API_BASE | http://localhost:3000 | Where to fetch FAQ from. |
RUSTPULSE_API_TOKEN | optional | If your FAQ endpoint is gated. |
DISCORD_VANITY_INVITE | https://discord.com/invite/rustpulse | Shown in branded embeds. |
STATUS_WEBSITE_URL | optional | Status board website probe. |
STATUS_API_BASE | optional | Status board API + DB probe. |
STATUS_RELAY_BASE | optional | Status board relay probe. |
Credentials Helper
| Var | Required | Notes |
|---|---|---|
RUSTPLUS_API_BASE | https://api.rustpulse.app | Override for local dev. |
Wiki (this site)
| Var | Required | Notes |
|---|---|---|
NEXT_PUBLIC_SITE_URL | optional | Used for canonical URLs / OpenGraph. Defaults to https://wiki.rustpulse.app. |