Skip to main content
BotMux uses SQLite with WAL mode. The database is created automatically on first run with automatic schema migrations.

Tables

TableDescription
botsBot configurations (token, modes, backend URL, status, health)
chatsTracked chats/channels (compound PK: bot_id + chat_id)
messagesAll observed messages (composite PK: chat_id + message_id)
known_usersUsers seen in chats
admin_logAudit trail of web UI actions
user_tagsCustom per-chat user classifications
routesInter-bot routing rules
route_mappingsSource-NAT tracking for bidirectional routing
auth_usersUser accounts
auth_sessionsLogin sessions
user_botsUser↔bot access (many-to-many junction table)
api_keysAPI key storage
llm_configLLM routing configuration
bridgesProtocol bridge configurations
bridge_chat_mappingsExternal↔Telegram chat mappings
bridge_msg_mappingsExternal↔Telegram message mappings

Database File

Default: botdata.db in the working directory. Override with -db flag. Demo mode uses a separate demo.db.

Migrations

Schema migrations run automatically on startup. No manual migration steps needed.