Skip to content

Configuration ​

Environment variables, a .env file in the working directory, or the matching rooftop flags (CLI). Values set in Settings win over the environment for the LLM endpoint, model, key, temperature, history budget, tool steps, MCP servers, the Telegram bot and Offline mode. TELEGRAM_BOT_TOKEN wins over Settings.

Model ​

VariableDefault
OPENAI_BASE_URLhttps://openrouter.ai/api/v1any OpenAI-compatible API: OpenAI, OpenRouter, Gemini, Mistral, DeepSeek, Groq, Ollama (http://localhost:11434/v1), LM Studio (http://localhost:1234/v1), llama.cpp (http://localhost:8080/v1), vLLM…
OPENAI_API_KEY–bearer token
OPENAI_MODELopenai/gpt-6-lunamust support tool calling
OPENAI_TEMPERATUREprovider default
OPENAI_MEDIA_MODELOPENAI_MODELdescribes images and transcribes voice, e.g. xiaomi/mimo-v2.6-flash

Offline ​

VariableDefault
ROOFTOP_OFFLINEoff1, true, yes or on: only local models and MCP servers (this computer or network), no internet sharing, no Telegram. The same as the Offline switch in Settings, but Settings can't turn it off. The desktop app honours it too. Offline & privacy

Server ​

VariableDefault
ROOFTOP_ADDR127.0.0.1:8080 (0.0.0.0:8080 in Docker)with 0.0.0.0:<port> the log shows the LAN URL
ROOFTOP_DATA./data (/data in Docker)exports, chats, settings
ROOFTOP_IMPORT–exports to import on start, :-separated, idempotent
ROOFTOP_PASSWORD–HTTP Basic auth for the owner UI (any user name). Set it on a public server
ROOFTOP_MAX_UPLOAD_MB0upload limit for the owner in MiB; 0 means none (exports are many GB). Set it on a server others can reach. Share links keep their own 16 MiB limit. The desktop app has no limit
ROOFTOP_TRUST_PROXYfalseclient IP from X-Forwarded-For / X-Real-IP, only behind a reverse proxy
ROOFTOP_FFMPEGffmpeg on PATH, then Homebrew, /usr/local, /usr/binframes of GIFs and videos (optional)
TZUTCtime zone of live messages

Telegram ​

VariableDefault
TELEGRAM_BOT_TOKEN–your bot from @BotFather (Answer from Telegram)
TELEGRAM_CHAT_IDany group the bot joinsallowed group ids, comma-separated
TELEGRAM_API_URLhttps://api.telegram.orge.g. a self-hosted Bot API server

Relay ​

VariableDefault
ROOFTOP_RELAY_URLhttps://iroof.toprelay for Internet sharing and the shared bot
ROOFTOP_RELAY_DOMAIN–run a relay hub for this domain
ROOFTOP_RELAY_BOT_TOKEN–the hub's shared bot; must differ from TELEGRAM_BOT_TOKEN
ROOFTOP_RELAY_MAX_ACCOUNTS5000most names a hub keeps

Settings only ​

SettingDefault
History budget120000 charactershow much history is replayed before memory kicks in
Max tool steps6LLM rounds per answer (search, MCP tool, reply…)

Released under the MIT License.