The little settings.
Your credentials, your group, your listening limits. Alice reads them from Config.env.
Required credentials
The filename is case-sensitive. Start with the supplied Config.env.example; setup creates a copy automatically when Config.env doesn’t exist.
API_ID=your_numeric_api_id
API_HASH=your_api_hash
BOT_TOKEN=your_bot_token
STRING_SESSION=your_assistant_session
MONGO_URL=your_mongodb_uri
OWNER_ID=your_numeric_telegram_idAll settings
| Variable | Default / requirement | Purpose |
|---|---|---|
API_ID | Required | Telegram application ID; a number. |
API_HASH | Required | Telegram application hash from my.telegram.org. |
BOT_TOKEN | Required | Token created by BotFather. |
STRING_SESSION | Required | Pyrogram/Pyrofork-compatible assistant user session. |
MONGO_URL | Required | MongoDB connection URI, including the application credentials. |
OWNER_ID | Set your user ID | Your numeric Telegram user ID. Grants owner access. |
LOG_GROUP_ID | 0 | Log chat ID for startup notices. Zero skips notices. |
UPDATE_REPO | https://github.com/thanosbots/Alice.git | Repository used by the owner-only update checker. |
UPDATE_BRANCH | Repository default | Optional release branch to check. |
MUSIC_QUALITY | 320 | Preferred source bitrate: 96, 160 or 320 kbps, depending on source availability. |
MAX_DOWNLOAD_MB | 40 | Maximum downloaded audio size in MB; minimum 1. |
MAX_TRACK_MINUTES | 30 | Maximum track duration in minutes; minimum 1. |
MAX_QUEUE_SIZE | 50 | Maximum queued tracks, including the current song; minimum 1. |
Connect MongoDB
Create a MongoDB database and a dedicated application user. Allow connections from your bot host, copy the connection URI, replace its credential placeholders, and paste it into MONGO_URL. URL-encode special characters in the username or password when required by your connection provider.
Alice uses MongoDB for user/group records and play counts. Check authentication and network access if statistics cannot be saved.
Apply your changes
Save the file and restart the existing bot process. Attach to your tmux session, stop Alice with Ctrl + C, and run:
bash start.sh