AnnieXMusic is a modern Telegram bot that streams high-quality music into group voice chats. Powered by Pyrogram + PyTgCalls, it supports multiple platforms like YouTube, Spotify, Apple Music, SoundCloud, Resso, and more. It also includes basic group management features for convenience.
Below are the required and optional environment variables for deployment.
API_ID= # Required - Get from https://my.telegram.org
API_HASH= # Required - From https://my.telegram.org
BOT_TOKEN= # Required - Get t.me/BotFather
OWNER_ID= # Required - Your Telegram user ID
LOGGER_ID= # Required - Log group/channel ID
STRING_SESSION= # Required - Generate from @SessionBuilderbot
MONGO_DB_URI= # Required - MongoDB connection string
COOKIE_URL= # Required - YT Cookies url
DEEP_API= # Optional - Get from https://deepai.org
API_KEY= # Optional - External API key for song Download
VIDEO_API_URL= # Optional - External API url for video Download
API_URL= # Optional - External API url for audio DownloadWhere do I get each key?
| Key | Where to Get It | Steps | Notes |
|---|---|---|---|
API_ID & API_HASH |
my.telegram.org → API Development Tools | 1) Log in with Telegram → 2) Open API Development Tools → 3) Create app → 4) Copy values | Keep these private. Needed by both userbot & bot client. |
BOT_TOKEN |
@BotFather | 1) /newbot → 2) Set name & username → 3) Copy the token | Rotate if leaked. Store in .env. |
STRING_SESSION |
@SessionBuilderbot |
1) Start bot →
2) Provide API_ID/API_HASH →
3) Complete login →
4) Copy string
|
Userbot auth for Pyrogram. |
LOGGER_ID |
Telegram Channel/Group you own |
1) Create private channel/group →
2) Add your bot as admin →
3) Get ID via @AnnieXRobot or @MissRose_Bot
|
Use a private space so logs aren’t public. |
MONGO_DB_URI |
MongoDB Atlas |
1) Create free cluster →
2) Add database user & IP allowlist →
3) Copy connection string (mongodb+srv://...)
|
Required for persistence (queues, configs, etc.). |
COOKIE_URL |
Any secure host (e.g., Pastebin, Batbin) |
1) Upload your cookies.txt privately →
2) Set paste visibility to Unlisted →
3) Copy the raw URL
|
Improves YouTube reliability. Never commit raw cookies. |
DEEP_API / API_KEY / API_URL/ VIDEO_API_URL |
Provider of your choice | Sign up → generate key → paste here | Optional integrations (AI/extras). |
Details
🎵 Deploy AnnieXMusic on VPS
# Step 1: Update & Install Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install -y git curl python3-pip python3-venv ffmpeg unzip tmux
# Step 2: Install Deno (for yt-dlp) —
curl -fsSL https://deno.land/install.sh | sh
# → When prompted: "Edit shell configs to add deno to the PATH? (y/n)" → Type: y
source ~/.bashrc
# Step 3: Clone & Setup
git clone https://github.com/CertifiedCoders/AnnieXMusic
cd AnnieXMusic
tmux new -s Annie
# Inside tmux:
python3 -m venv venv
source venv/bin/activate
pip install -U pip && pip install -r requirements.txt
bash setup # Fill: API_ID, BOT_TOKEN, COOKIE_URL, etc.
bash start # Run bot
### Useful Commands
tmux detach # Use Ctrl+B, then D
tmux attach-session -t Annie # Reattach session
tmux kill-session -t Annie # Kill bot session
rm -rf AnnieXMusic # Uninstall botDetails
### Step 1: Clone Repo
git clone https://github.com/CertifiedCoders/AnnieXMusic
cd AnnieXMusic
### Step 2: Create .env File
nano .env
# Paste your environment variables here and save (Ctrl+O, Enter, Ctrl+X)
### Step 3: Build Image
docker build -t anniexmusic .
### Step 4: Run Container
docker run -d --name annie --env-file .env --restart unless-stopped anniexmusic
### Step 5: Manage Container
docker logs -f annie # View logs (Ctrl+C to exit)
docker stop annie # Stop container
docker start annie # Start again
docker rm -f annie # Remove container
docker rmi anniexmusic # Remove image| Platform | Deploy Link |
|---|---|
| 🔑 Generate Session | |
| 🌍 Heroku Deploy |
- sᴩᴇᴄɪᴀʟ ᴛʜᴀɴᴋs ᴛᴏ ᴀɴᴏɴʏ ғᴏʀ ᴀɴᴏɴxᴍᴜsɪᴄ
- ᴄʀᴀғᴛᴇᴅ ᴡɪᴛʜ ᴘᴀssɪᴏɴ ʙʏ ᴄᴇʀᴛɪғɪᴇᴅ ᴄᴏᴅᴇʀs


