homelab-brain/chatlogger/env.example
Homelab Cursor e1be45399e feat(chatlogger): Arakawa Concierge — passive Telegram group chat logger
Standalone bot @arakawa_concierge_bot that silently records configured
group chats into SQLite (FTS5). Phase 1 — capture only, no LLM, no
auto-replies. Reads token + chat allowlist from /opt/chatlogger/env
(NOT in git). Runs as systemd unit chatlogger-bot.service on CT 116
sharing /opt/bot-venv with the hausmeister-bot.

- chatlogger_bot.py: telegram polling, message/edit handlers, admin cmds
  (/whichchat, /log_status, /recent, /search) — silent in groups
- store.py: SQLite schema + FTS5 search + edit audit
- query.py: CLI (recent, search, stats, chats, since, export JSONL)
- chatlogger-bot.service: systemd unit, hardened (ProtectSystem=strict)
- env.example, README.md

Tested live: message 'hallo' from -1003924901022 stored, retrieved
via CLI within seconds. Group privacy must be off in BotFather.
2026-05-01 12:03:22 +02:00

20 lines
851 B
Text

# /opt/chatlogger/env — install on CT 116 with chmod 600
# NOT committed to git. Loaded via systemd EnvironmentFile.
# Telegram bot token from BotFather (@arakawa_concierge_bot)
ARAKAWA_BOT_TOKEN=PASTE_TOKEN_HERE
# Comma-separated list of chat ids the bot is allowed to log.
# Anything else is silently ignored. Get the id by adding the bot to a chat
# and (as admin) sending /whichchat.
ARAKAWA_BOT_ALLOWED_CHATS=-1003924901022
# Telegram user id allowed to use admin commands (/log_status, /recent, /search).
# Same id used for the Hausmeister bot in homelab.conf as TG_CHAT_ID.
ARAKAWA_BOT_ADMIN_USER_ID=674951792
# Time zone offset in hours (Phnom Penh = +7). Used for human-readable timestamps.
ARAKAWA_BOT_TZ_OFFSET_HOURS=7
# SQLite path — only this directory is writable for the systemd unit.
ARAKAWA_BOT_DB=/opt/chatlogger/chats.db