Skip to content

Self hosting the Bot

ao3575911 edited this page Oct 30, 2026 · 1 revision

Self-hosting the Bot

1. Create a bot

In Telegram, talk to @BotFather: /newbot, copy the token. Optional: /setinline to enable inline mode.

2. Run

git clone https://github.com/ao3575911/langsuite && cd langsuite && uv sync
uv run langsuite base build
export LANGSUITE_TELEGRAM_TOKEN=...     # never printed or logged
uv run langsuite bot run                # long polling; Ctrl+C stops

3. Keep it running

LANGSUITE_BOT_LOG=$HOME/logs/langsuite_bot.log nohup bash scripts/run_bot_forever.sh >/dev/null 2>&1 &
Behaviour Detail
Restart On exit, backoff 2 s doubling to 60 s; resets after a run longer than 60 s
Bad/missing token Exit 4, no restart loop
Log $LANGSUITE_BOT_LOG (default ~/langsuite_bot.log)
PID file $LANGSUITE_BOT_PIDFILE (default: log path with .pid)
Stop kill $(cat <pidfile>)

langsuite verify inside the bot needs Docker on the host and an admin's /settings coderuns on.

Environment

Variable Purpose
LANGSUITE_TELEGRAM_TOKEN Bot token (required)
LANGSUITE_HOME Data home (base, chat state)
LANGSUITE_BOT_LOG, LANGSUITE_BOT_PIDFILE Supervisor log and PID
LANGSUITE_DOCKER Docker binary for verify
LANGSUITE_PACKS Data packs location (e.g. Rosetta)

There is no official Docker image yet. Never commit the token; keep it in the environment or a secrets manager.

Clone this wiki locally