Skip to content

Configuration ​

Now that you have your bot installed or deployed, let's configure it. All settings are configured through environment variables, typically stored in an fsb.env file if you are using Docker or the binary release.

Required Variables ​

These must be set, otherwise the bot will not start.

VariableDescription
API_IDTelegram API ID from my.telegram.org
API_HASHTelegram API Hash from my.telegram.org
BOT_TOKENBot token from @BotFather
LOG_CHANNELTelegram channel ID for file storage

Optional Variables ​

These are optional settings you can use to tweak the bot's behavior.

VariableDefaultDescription
DEVfalseEnable verbose development logging
PORT8080HTTP server port
HOSTauto-detectedBase URL for generated links (e.g. https://stream.example.com)
HASH_LENGTH6Length of URL hash, minimum 5, maximum 32
USE_SESSION_FILEtruePersist worker sessions across restarts
USER_SESSION(Empty)Session string for userbot features (auto-add bots to channel)
USE_PUBLIC_IPfalseAuto-discover public IP for the HOST URL
ALLOWED_USERS(Empty)Comma-separated Telegram user IDs (allowlist)

Interactive Config Builder ​

If you want an easy way to generate your fsb.env file, head over to the Config Generator.