apps/bridge/config.yaml, which defines channel mappings and operational settings. Sensitive values (tokens, passwords) are injected via environment variables — they do not appear in config.yaml.
config.yaml is generated from apps/bridge/config.template.yaml by scripts/prepare-config.sh (via envsubst) during just init or just dev/just prod.
config.yaml structure
Warning:irc_tls_verifydefaults tofalsein development (self-signed certificates). You must setBRIDGE_IRC_TLS_VERIFY=truein.envbefore any public deployment.
Environment variables
| Variable | Description | Required |
|---|---|---|
BRIDGE_DISCORD_TOKEN | Discord bot token | Yes (if Discord adapter enabled) |
BRIDGE_DISCORD_CHANNEL_ID | Discord channel snowflake ID to bridge | Yes |
IRC_BRIDGE_SERVER | IRC server hostname (use Docker service name internally) | Yes |
IRC_TLS_PORT | IRC server port (default: 6697) | No |
BRIDGE_IRC_NICK | IRC nick for the bridge bot | No |
BRIDGE_IRC_OPER_PASSWORD | IRC oper password for the bridge | No |
BRIDGE_IRC_TLS_VERIFY | Override irc_tls_verify (true/false) | No |
BRIDGE_XMPP_COMPONENT_JID | XMPP component JID (for component protocol) | Yes (if XMPP enabled) |
BRIDGE_XMPP_COMPONENT_SECRET | XMPP component secret | Yes (if XMPP enabled) |
BRIDGE_XMPP_COMPONENT_SERVER | XMPP server hostname for component connection | No |
BRIDGE_XMPP_COMPONENT_PORT | XMPP component port (default: 5347) | No |
BRIDGE_PORTAL_BASE_URL | Portal API base URL for identity resolution | No |
BRIDGE_PORTAL_TOKEN | Portal API authentication token | No |
Portal integration
The bridge supports an optional Portal identity service for unified user profiles across platforms. When configured, the bridge resolves user identities across Discord, IRC, and XMPP so that bridged messages display consistent nicknames. To enable Portal integration, set both environment variables:Token mapping: Use the same secret for both sides. SetWhen Portal is not configured, the bridge runs in dev mode with fallback nick resolution — bridged messages use the originating platform’s display name with a platform suffix. The Portal client includes:BRIDGE_PORTAL_TOKEN(atl.chat bridge) andBRIDGE_SERVICE_TOKEN(Portal) to the same value. The bridge sends this token as a Bearer credential; Portal expects it inBRIDGE_SERVICE_TOKEN.
- Automatic retries with exponential backoff (via tenacity)
- TTL-based identity cache (default: 1024 entries) to reduce API calls
- Lookup methods:
discord_to_irc,discord_to_xmpp,irc_to_discord,xmpp_to_discord
Channel mapping format
Channel mappings connect a Discord channel to an IRC channel and/or an XMPP MUC room. Each mapping is defined in themappings list within the config:
discord_channel_id. The irc and xmpp sections are optional — you can bridge Discord to IRC only, Discord to XMPP only, or all three platforms together.
IRC target fields
| Field | Type | Description |
|---|---|---|
server | string | IRC server hostname |
port | integer | IRC server port (default: 6667) |
tls | boolean | Use TLS for the connection |
channel | string | IRC channel name (including # prefix) |
XMPP target fields
| Field | Type | Description |
|---|---|---|
muc_jid | string | Full JID of the XMPP MUC room |
Multiple mappings
You can define multiple mappings to bridge several channels:Related pages
- Bridge Overview — architecture, event bus, and adapter design
- Bridge Operations — health monitoring, adapter debugging, and Portal identity
- IRC Configuration — UnrealIRCd config including oper blocks for the bridge
- XMPP Configuration — Prosody component configuration for the bridge
- Environment Variables — complete variable reference including all
BRIDGE_*variables - Security — secret management for
BRIDGE_DISCORD_TOKENand other bridge credentials