-
Notifications
You must be signed in to change notification settings - Fork 0
Environment Variables
Jason Tucker edited this page Jun 5, 2026
·
2 revisions
All vars are validated with Zod in src/config/env.ts. The bot exits immediately if a required var is missing. In Docker, DATABASE_URL and REDIS_URL are set for you by docker-compose.yml — you only set POSTGRES_PASSWORD.
| Variable | Required | Description |
|---|---|---|
DISCORD_BOT_TOKEN |
✅ | Bot token from the Developer Portal |
DISCORD_CLIENT_ID |
✅ | Application (client) ID |
DATABASE_URL |
✅ | PostgreSQL connection string. In Docker, set automatically by compose from POSTGRES_PASSWORD (postgresql://squishybot:…@db-squishy:5432/squishybot). |
NODE_ENV |
— |
development / production / test (default: development) |
UPTIME_KUMA_PUSH_URL |
— | Push-monitor URL — pinged every 60s |
| Variable | Required | Description |
|---|---|---|
GUILD_ID |
✅ | The single Discord server this bot serves |
| Variable | Required | Description |
|---|---|---|
SUDO_ROLE_IDS |
— | Comma-separated role IDs with full bot-admin powers |
SUDO_USER_IDS |
— | Comma-separated user IDs with full bot-admin powers |
BOT_OWNER_ID |
— | Discord user ID — receives startup + error DMs. Required for /report review and bot-owner kill switches; owner status can also resolve from the dev-portal Team (see Bot Owner). |
| Variable | Required | Description |
|---|---|---|
AUTO_VOICE_CATEGORY_ID |
✅ | Category that contains both hubs and auto channels. Overridable at /sudo → Settings → Voice. |
HUB_CHANNEL_IDS |
— | Comma-separated voice channel IDs to seed as hubs on first boot. Once registered the hub_channels table is authoritative and this can be cleared; manage hubs at runtime via /sudo → Settings → Hub Channels. |
VOICE_CLEANUP_DELAY_MS |
— | ms before an empty channel is cleaned up. Code default is 0; .env.example seeds 30000. Overridable at /sudo → Settings → Voice. |
| Variable | Required | Description |
|---|---|---|
LOG_CHANNEL_ID |
— | Bot writes structured logs here |
ADMIN_CHANNEL_ID |
— | Sudo-only admin channel |
STAFF_APPROVAL_THREAD_ID |
— | Thread where staff requests post for approval |
STAFF_APPROVAL_PING_USER_ID |
— | User pinged on each staff request |
BIRTHDAY_CHANNEL_ID |
— | Birthday-ping channel (also editable at /sudo → Settings → Channels) |
Most channel IDs above are overridable at runtime via
/sudo → Settings → Channels; the env value is the fallback.
| Variable | Required | Description |
|---|---|---|
GITHUB_TOKEN |
— | Fine-grained PAT with Issues: Read & Write on GITHUB_REPO. Required for /report. |
GITHUB_REPO |
— |
owner/name, e.g. jason-tucker/squishybot. Required for /report. |
Both are optional — /report replies with a friendly "not configured" error if missing.
| Variable | Required | Description |
|---|---|---|
BOTPANEL_RPC_SECRET |
— | Shared HMAC secret with botpanel for the cmd.squishy.* command bus + bot.squishy.settings.invalidate cache bus. Unset → both subscribers are disabled (the bot still runs); a warning is logged at boot. |
REDIS_URL |
— | Event/command bus connection. Set by Docker Compose (redis://redis:6379). A downed Redis never blocks the bot. |
| Variable | Required | Description |
|---|---|---|
POSTGRES_PASSWORD |
— | Password for the Compose-managed Postgres (used to build DATABASE_URL). Use alphanumeric/hex only — avoid #, *, ?. |
BOT_IMAGE |
— | GHCR image for docker compose pull (default ghcr.io/jason-tucker/squishybot:latest). Set by CI. |
The Postgres container has no host port mapping. Reach it with
squishybot db:shell(ordocker compose exec db psql -U squishybot squishybot).
| Variable | Description |
|---|---|
CLIPS_CHANNEL_ID / FOOD_CHANNEL_ID
|
Deprecated. Auto-threading is now configured at /sudo → Settings → Auto Threads (DB-backed, auto_thread_channels). Safe to remove from .env. |