Configuration Reference
This document lists all environment variables and configuration options for the Signal Bot, including candidates for future externalization.
Currently Configurable Environment Variables
Section titled “Currently Configurable Environment Variables”Signal Core
Section titled “Signal Core”| Variable | Description | Example |
|---|---|---|
SIGNAL_PHONE_NUMBER | Signal phone number for the bot | +1234567890 |
BOT_NUMBER | Alias for bot phone number (used by !rm) | +1234567890 |
BOT_UUID | Bot’s Signal UUID (used by !rm) | xxxxxxxx-xxxx-... |
SIGNAL_CLI_CONFIG_DIR | Path to signal-cli config directory | /app/signal-data |
SIGNAL_CLI_PORT | JSON-RPC port for signal-cli daemon | 7583 |
Admin Access
Section titled “Admin Access”| Variable | Description | Example |
|---|---|---|
ADMIN_PHONE_NUMBERS | Comma-separated admin phone numbers | +1234567890,+0987654321 |
ADMIN_UUIDS | Comma-separated admin Signal UUIDs | uuid1,uuid2 |
ADMIN_FALLBACK_NUMBER | Fallback phone number for credential DMs | +1234567890 |
Database (PostgreSQL)
Section titled “Database (PostgreSQL)”| Variable | Default | Description |
|---|---|---|
DB_HOST | - | Database hostname (use signal-bot-postgres, not postgres) |
DB_PORT | 5432 | Database port |
DB_NAME | signal_bot | Database name |
DB_USER | signal_bot | Database user |
DB_PASSWORD | - | Database password |
Redis Cache
Section titled “Redis Cache”| Variable | Default | Description |
|---|---|---|
REDIS_HOST | redis | Redis hostname |
REDIS_PORT | 6379 | Redis port |
REDIS_URL | - | Full Redis URL (overrides host/port if set) |
OpenAI
Section titled “OpenAI”| Variable | Default | Description |
|---|---|---|
OPENAI_API_KEY | - | OpenAI API key |
OPENAI_ACTIVE | true | Enable/disable OpenAI integration |
Local AI (Open WebUI)
Section titled “Local AI (Open WebUI)”| Variable | Default | Description |
|---|---|---|
LOCAL_AI_URL | - | Local AI endpoint (e.g., https://ai.irregularchat.com) |
LOCAL_AI_API_KEY | - | Local AI API key |
LOCAL_AI_MODEL | - | Model name for !lai (e.g., irregularbot) |
LOCAL_AI_UNCENSORED_MODEL | - | Model name for !uai |
Discourse Forum
Section titled “Discourse Forum”| Variable | Default | Description |
|---|---|---|
DISCOURSE_URL | - | Discourse instance URL |
DISCOURSE_API_KEY | - | Discourse API key |
DISCOURSE_USERNAME | - | Bot username on Discourse |
DISCOURSE_QA_CATEGORY | - | Category ID for Q&A/news auto-posts |
DISCOURSE_BREAKOUT_CATEGORY | - | Category ID for breakout room summaries |
Outline Documentation
Section titled “Outline Documentation”| Variable | Default | Description |
|---|---|---|
OUTLINE_URL | - | Outline instance URL |
OUTLINE_API_KEY | - | Outline API key (starts with ol_api_) |
OUTLINE_DEFAULT_COLLECTION | - | UUID of default collection for new docs |
Authentik SSO
Section titled “Authentik SSO”| Variable | Default | Description |
|---|---|---|
AUTHENTIK_BASE_URL | - | Authentik instance URL |
AUTHENTIK_API_TOKEN | - | Authentik API token |
AUTHENTIK_INVITE_FLOW_ID | - | Flow UUID for invite enrollment |
AUTHENTIK_INVITE_FLOW_SLUG | - | Flow slug (e.g., invite-enrollment-flow) |
PeerTube Video
Section titled “PeerTube Video”| Variable | Default | Description |
|---|---|---|
PEERTUBE_URL | - | Internal PeerTube URL (e.g., http://peertube:9000) |
PEERTUBE_PUBLIC_URL | - | Public PeerTube URL (e.g., https://videos.irregularchat.com) |
PEERTUBE_ACCESS_TOKEN | - | PeerTube long-lived access token |
PEERTUBE_CHANNEL_ID | 1 | PeerTube channel ID for uploads |
PEERTUBE_IDP_URL | - | PeerTube SSO login URL |
Cloudflare R2 Storage
Section titled “Cloudflare R2 Storage”| Variable | Default | Description |
|---|---|---|
R2_ACCOUNT_ID | - | Cloudflare account ID |
R2_ACCESS_KEY_ID | - | R2 access key |
R2_SECRET_ACCESS_KEY | - | R2 secret key |
R2_BUCKET_NAME | - | R2 bucket name |
R2_PUBLIC_URL | - | Public R2 URL |
Gitea (3D File Archiving)
Section titled “Gitea (3D File Archiving)”| Variable | Default | Description |
|---|---|---|
GITEA_API_URL | - | Gitea API endpoint (e.g., https://git.irregularchat.com/api/v1) |
GITEA_TOKEN | - | Gitea API token |
GITEA_DEFAULT_OWNER | - | Default repo owner (e.g., irregulars) |
GITEA_DEFAULT_REPO | - | Default repo name (e.g., 3d-files) |
Event Service
Section titled “Event Service”| Variable | Default | Description |
|---|---|---|
EVENT_SERVICE_URL | - | Event service Worker URL |
EVENT_SERVICE_API_KEY | - | Event service API key |
Group IDs
Section titled “Group IDs”| Variable | Default | Description |
|---|---|---|
BOT_DEV_GROUP_ID | - | Bot development/testing group ID |
ENTRY_INDOC_GROUP_ID | - | Entry/indoctrination group ID |
ACTIONS_GROUP_ID | - | Actions/notifications group ID |
Logging
Section titled “Logging”| Variable | Default | Description |
|---|---|---|
VERBOSE_LOGGING | false | Enable verbose debug logging |
LOG_LEVEL | info | Log level (debug, info, warn, error) |
Miscellaneous
Section titled “Miscellaneous”| Variable | Default | Description |
|---|---|---|
QA_WEB_URL | - | Q&A web form URL (e.g., https://qa.irregulars.io) |
SUMMARIZE_ALLOWED_DOMAINS | - | Comma-separated domains allowed for !summarize |
GOOGLE_KG_API_KEY | - | Google Knowledge Graph API key (optional) |
GITHUB_TOKEN | - | GitHub token for repo operations |
IDENTITY_POLL_INTERVAL_MS | 300000 | Interval for identity fingerprint polling (5 min) |
MinIO S3 Storage
Section titled “MinIO S3 Storage”| Variable | Default | Description |
|---|---|---|
MINIO_ENDPOINT | - | Internal MinIO API endpoint (e.g., http://minio-irregularchat:9000) |
MINIO_ACCESS_KEY | - | MinIO access key (S3 compatible) |
MINIO_SECRET_KEY | - | MinIO secret key (S3 compatible) |
MINIO_BUCKET | irregularchat | MinIO bucket name |
MINIO_REGION | us-east-1 | MinIO region (required for S3 API) |
MINIO_PUBLIC_URL | - | Public URL for presigned links (e.g., https://s3.irregular.chat) |
URL Shortener (Shlink)
Section titled “URL Shortener (Shlink)”| Variable | Default | Description |
|---|---|---|
SHLINK_API_URL | - | Shlink API endpoint (e.g., http://shlink-api:8080) |
SHLINK_API_KEY | - | Shlink API key |
SHLINK_PUBLIC_URL | - | Public base URL for shortened links |
File Archive
Section titled “File Archive”| Variable | Default | Description |
|---|---|---|
IRREGULARCHAT_PATH | /app/irregularchat | Base path for file archive |
MEMES_PATH | /app/memes | Path to meme images directory |
Auto-Scraper Domain Filtering
Section titled “Auto-Scraper Domain Filtering”| Variable | Default | Description |
|---|---|---|
COMMUNITY_DOMAINS | irregularpedia.org,irregularchat.com,irregular.chat,forum.irregularchat.com | Comma-separated list of community domains to skip in auto-scraper |
pCloud (Legacy Fallback)
Section titled “pCloud (Legacy Fallback)”| Variable | Default | Description |
|---|---|---|
PCLOUD_PUBLIC_URL | (configured) | pCloud public folder URL |
PCLOUD_API_HOST | api.pcloud.com | pCloud API endpoint |
Wiki Search
Section titled “Wiki Search”| Variable | Default | Description |
|---|---|---|
WIKI_REPO_PATH | /app/wiki-repo | Path to wiki repository clone |
GitLab Wiki Push (!wikiadd)
Section titled “GitLab Wiki Push (!wikiadd)”| Variable | Default | Description |
|---|---|---|
GITLAB_WIKI_URL | - | GitLab repo URL for wiki push (e.g., http://gitlab:8929/irregulars/IrregularChatWiki.git) |
GITLAB_WIKI_TOKEN | - | GitLab personal access token with write_repository scope |
WIKI_WORKDIR_PATH | /app/wiki-workdir | Local path for wiki git clone (must be writable by container user) |
WIKI_GIT_USER | IrregularBot | Git author name for wiki commits |
WIKI_GIT_EMAIL | bot@irregularchat.com | Git author email for wiki commits |
Notes:
- The
GITLAB_WIKI_URLuses the Docker internal hostname (gitlab:8929) since the bot and GitLab share a Docker network - The bot user needs Maintainer access on the GitLab project to push to the protected
mainbranch - The token is embedded in the git remote URL at runtime (never logged)
WIKI_WORKDIR_PATHmust be mounted as a Docker volume for persistence across container restarts
Whisper Transcription (Video TLDR)
Section titled “Whisper Transcription (Video TLDR)”| Variable | Default | Description |
|---|---|---|
WHISPER_ENABLED | true | Enable/disable Whisper audio transcription for !tldr |
WHISPER_MODEL_SIZE | base | Whisper model size: tiny, base, small, medium, large |
Notes:
- Whisper is used as a fallback for YouTube (when no captions exist) and as the primary method for Instagram/TikTok/Facebook videos
- The
basemodel offers the best speed/accuracy tradeoff for CPU transcription - Larger models (
small,medium) improve accuracy but are significantly slower on CPU - Model files are cached in
data/whisper-models/(mounted as a Docker volume) - Requires
faster-whisperPython package (pre-installed in Docker image)
Candidates for Future Configuration
Section titled “Candidates for Future Configuration”The following hardcoded values could be externalized to environment variables in future updates.
HIGH Priority
Section titled “HIGH Priority”Bypass/Archive Domains
Section titled “Bypass/Archive Domains”File: src/src/utils/news-detector.ts:270-283
Currently hardcoded list of 13 bypass/archive services to skip:
12ft.io, 12footer.com, archive.org, web.archive.org, archive.is,archive.ph, archive.today, archive.li, archive.vn, archive.md,webcache.googleusercontent.com, outline.com, printfriendly.comSuggested env var: BYPASS_ARCHIVE_DOMAINS
Format: Comma-separated list
Rationale: Some deployments may want to allow or block different bypass services.
Wiki Base URL
Section titled “Wiki Base URL”File: src/src/utils/wiki-search.ts:65
Currently hardcoded:
const WIKI_BASE_URL = 'https://irregularpedia.org';Suggested env var: WIKI_BASE_URL
Rationale: Self-hosters will have their own wiki instance.
MEDIUM Priority
Section titled “MEDIUM Priority”MinIO Presigned URL Expiry
Section titled “MinIO Presigned URL Expiry”File: src/src/utils/minio-client.ts:31
Currently hardcoded:
const DEFAULT_EXPIRY_SECONDS = 86400; // 24 hoursSuggested env var: MINIO_PRESIGNED_URL_EXPIRY_SECONDS
Default: 86400
Rationale: Some deployments may want shorter or longer expiry times.
Shlink Default Expiry
Section titled “Shlink Default Expiry”File: src/src/utils/shlink-client.ts:21
Currently hardcoded:
const DEFAULT_EXPIRY_MINUTES = 1440; // 24 hours (matches MinIO presigned URL expiry)Suggested env var: SHLINK_DEFAULT_EXPIRY_MINUTES
Default: 1440 (24 hours)
Rationale: Control how long shortened URLs remain valid. Should match MinIO presigned URL expiry.
Discourse Summary AI Model
Section titled “Discourse Summary AI Model”File: src/src/utils/discourse-poster.ts:157
Currently hardcoded:
model: 'gpt-4o-mini',temperature: 0.7,max_tokens: 150Suggested env vars:
DISCOURSE_SUMMARY_MODEL(default:gpt-4o-mini)DISCOURSE_SUMMARY_TEMPERATURE(default:0.7)DISCOURSE_SUMMARY_MAX_TOKENS(default:150)
Rationale: Allow using different models or tuning summary behavior.
PDF Processing Limits
Section titled “PDF Processing Limits”File: src/src/utils/pdf-scraper.ts:24-25
Currently hardcoded:
const MAX_PAGES_FOR_FULL_EXTRACTION = 20;const MAX_CHARS_FOR_LLM = 15000;Suggested env vars:
PDF_MAX_PAGES(default:20)PDF_MAX_CHARS(default:15000)
Rationale: Tune PDF processing for different LLM context windows or performance.
File Index Settings
Section titled “File Index Settings”File: src/src/utils/file-search.ts:52-53
Currently hardcoded:
const INDEX_REFRESH_INTERVAL = 60 * 60 * 1000; // 1 hourconst INDEX_MAX_FILES = 50000;Suggested env vars:
FILE_INDEX_REFRESH_INTERVAL_MS(default:3600000)FILE_INDEX_MAX_FILES(default:50000)
Rationale: Tune indexing frequency and limits based on archive size.
pCloud Index TTL
Section titled “pCloud Index TTL”File: src/src/utils/file-search.ts:797
Currently hardcoded:
const PCLOUD_INDEX_TTL = 30 * 60 * 1000; // 30 minutesSuggested env var: PCLOUD_INDEX_TTL_MS
Default: 1800000
Search Session TTL
Section titled “Search Session TTL”File: src/src/utils/file-search.ts:984
Currently hardcoded:
const SESSION_TTL = 10 * 60 * 1000; // 10 minutesSuggested env var: SEARCH_SESSION_TTL_MS
Default: 600000
LOW Priority (Game/Feature Tuning)
Section titled “LOW Priority (Game/Feature Tuning)”Rock Paper Scissors Game
Section titled “Rock Paper Scissors Game”File: src/src/utils/rps-game.ts:65-68
Currently hardcoded:
const CHOICE_TIMEOUT_MS = 120000; // 2 minutesconst SPAM_WINDOW_MS = 30 * 60 * 1000; // 30 minutesconst SPAM_DELAY_MS = 10 * 60 * 1000; // 10 minutesconst SPAM_QUIT_THRESHOLD = 2;Suggested env vars:
RPS_CHOICE_TIMEOUT_MS(default:120000)RPS_SPAM_WINDOW_MS(default:1800000)RPS_SPAM_DELAY_MS(default:600000)RPS_SPAM_QUIT_THRESHOLD(default:2)
Dice Game
Section titled “Dice Game”File: src/src/utils/dice-game.ts:91-96
Currently hardcoded:
const STARTING_POINTS = 100;const DEFAULT_MIN_BET = 10;const DEFAULT_MAX_BET = 50;const DEFAULT_TIMEOUT_MS = 60000;const INACTIVITY_TIMEOUT_MS = 180000;Suggested env vars:
DICE_STARTING_POINTS(default:100)DICE_MIN_BET(default:10)DICE_MAX_BET(default:50)DICE_TIMEOUT_MS(default:60000)DICE_INACTIVITY_TIMEOUT_MS(default:180000)
Embedding Configuration
Section titled “Embedding Configuration”File: src/src/utils/wiki-embeddings.ts:15-18
Currently hardcoded:
const EMBEDDING_MODEL = 'text-embedding-3-small';const EMBEDDING_DIMENSIONS = 1536;const MAX_TOKENS_PER_CHUNK = 8000;const CHUNK_OVERLAP_CHARS = 200;Suggested env vars:
EMBEDDING_MODEL(default:text-embedding-3-small)EMBEDDING_CHUNK_SIZE(default:8000)EMBEDDING_CHUNK_OVERLAP(default:200)
Breakout Room Settings
Section titled “Breakout Room Settings”File: src/src/utils/breakout-manager.ts
| Variable | Default | Description |
|---|---|---|
BREAKOUT_ARCHIVE_DELAY_SECONDS | 120 | Delay before removing members after session ends (gives time to save info) |
BREAKOUT_BROADCAST_GROUPS | - | Comma-separated group IDs for --broadcast announcements |
Currently hardcoded (candidates for future configuration):
const MIN_MESSAGES_FOR_AI = 3;const MIN_MESSAGES_FOR_AI_CATCHUP = 5;Suggested env vars:
BREAKOUT_MIN_MESSAGES_FOR_AI(default:3)BREAKOUT_MIN_MESSAGES_CATCHUP(default:5)
Domain Lists (Reference Only)
Section titled “Domain Lists (Reference Only)”These lists are kept in code as they are extensive and rarely need per-deployment customization:
SOCIAL_MEDIA_DOMAINS- 23 social media platforms (news-detector.ts:26-48)FILE_HOSTING_DOMAINS- 20 file hosting services (news-detector.ts:51-71)NEWS_DOMAINS- 200+ news domains for legacy whitelist (news-detector.ts:74-211)SUSPICIOUS_TLDS- Geopolitical TLD mapping (url-security.ts:25-53)TRACKING_PARAMS- URL tracking parameters to strip (url-security.ts:58-132)
Implementation Pattern
Section titled “Implementation Pattern”When adding new configurable values, follow this pattern:
// At top of fileconst DEFAULT_VALUE = 'default';const CONFIG_VALUE = process.env.CONFIG_NAME ? process.env.CONFIG_NAME : DEFAULT_VALUE;
// For comma-separated listsconst DEFAULT_LIST = ['item1', 'item2'];const CONFIG_LIST: string[] = process.env.CONFIG_LIST ? process.env.CONFIG_LIST.split(',').map(s => s.trim()).filter(s => s.length > 0) : DEFAULT_LIST;
// For numbersconst DEFAULT_NUM = 100;const CONFIG_NUM = process.env.CONFIG_NUM ? parseInt(process.env.CONFIG_NUM, 10) : DEFAULT_NUM;Related Documentation
Section titled “Related Documentation”- Self-Hosting Guide - Full deployment instructions
- File Management - File storage and search documentation
- MinIO Storage - S3-compatible storage setup