Quick links:
-
Latest Release: https://github.com/Soham-Das-afk/AuroraMusic/releases/latest
-
Docker Hub: https://hub.docker.com/r/sohamdas103/auroramusic
-
Demo Server: https://discord.gg/6nczZbSmZ6 (Join for support, testing, and updates)
AuroraMusic is a feature-rich music bot designed for Discord servers, allowing users to play music from various sources, manage queues, and interact with an intuitive user interface. This bot supports both YouTube and Spotify, providing a seamless music experience for users.
Windows (local):
git clone https://github.com/Soham-Das-afk/AuroraMusic.git
cd AuroraMusic
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .env
# edit .env to set BOT_TOKEN and ALLOWED_GUILD_IDS; set YOUTUBE_COOKIES=cookies/youtube.txt (recommended)
# Optional: Create valid_proxies.txt in root if you need proxies
python src/bot.pyLinux (local):
git clone https://github.com/Soham-Das-afk/AuroraMusic.git
cd AuroraMusic
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# edit .env to set BOT_TOKEN and ALLOWED_GUILD_IDS; set YOUTUBE_COOKIES=cookies/youtube.txt (recommended)
# Optional: Create valid_proxies.txt in root if you need proxies
python3 src/bot.pyDocker (both OS):
# ensure .env exists and is filled; cookies recommended at cookies/youtube.txt
# Optional: Create valid_proxies.txt in root if you need proxies
docker compose up -d --build
docker compose logs -fRun directly with Docker (without Compose):
Windows PowerShell
# assumes you created and filled .env in the project folder
docker pull sohamdas103/auroramusic:latest
docker run --name auroramusic ^
--env-file .env ^
-v "$PWD/cookies:/app/src/cookies:ro" ^
-v "$PWD/data:/app/src/data" ^
-v "$PWD/valid_proxies.txt:/app/valid_proxies.txt:ro" ^
-p 8080:8080 ^
-d sohamdas103/auroramusic:latestLinux/macOS
# assumes you created and filled .env in the project folder
docker pull sohamdas103/auroramusic:latest
docker run --name auroramusic \
--env-file .env \
-v "$(pwd)/cookies:/app/src/cookies:ro" \
-v "$(pwd)/data:/app/src/data" \
-v "$(pwd)/valid_proxies.txt:/app/valid_proxies.txt:ro" \
-p 8080:8080 \
-d sohamdas103/auroramusic:latest- Modern Controller UI: A welcome banner card, plus a clean controller embed with clear fields for queue, next song, and status.
- Multi-Source Playback: Play music from YouTube and Spotify, including single tracks and playlists.
- Queue Management: Add, view, shuffle, and manage a queue of tracks.
- Autoplay: Automatically find and play related tracks when the queue ends.
- Interactive Controls: Use buttons for play, pause, skip, and other controls directly in Discord.
- Slash Commands: Modern slash commands for setup and status, plus a message-based controller for music requests.
- Rich Embeds: Displays detailed information about the currently playing track and the queue.
- Voice Integration: Joins voice channels and streams high-quality audio.
- Error Handling: Provides user-friendly error messages and robust exception handling.
- Persistent State: Remembers playback history and controller channel information per guild.
- Proxy Support: Configure HTTP/HTTPS proxies via environment variables or a
valid_proxies.txtfile to bypass regional restrictions. - Streaming-first playback: The bot streams audio directly from sources. On-disk pre-caching and background downloads have been removed.
Once the bot is up and running:
-
Use
/setupto create a dedicated music controller channel in your server. -
In the controller channel:
- Send a song name, YouTube URL, or Spotify link (no prefix needed)
- Use the controller buttons (Play/Pause, Skip, Previous, Stop, Loop, Shuffle)
-
Helpful slash commands:
/help— quick usage guide and links to your controller channel/ping— bot latency/status (shows AuroraMusic v4.3.4)/health— configuration and queue summary/cleanup— remove the controller (admin only)
Permissions note:
- The bot should have “Manage Messages” in the controller channel for auto-cleanup of helper messages.
-
Install prerequisites
- Install Python 3.11 (enable “Add to PATH”).
- Install FFmpeg:
- Using winget:
winget install Gyan.FFmpeg
- Or using Chocolatey:
choco install ffmpeg
- Using winget:
- Verify:
python --version ffmpeg -version
-
Get the code and set up a virtual environment
git clone https://github.com/Soham-Das-afk/AuroraMusic.git cd AuroraMusic python -m venv .venv .\.venv\Scripts\Activate.ps1 pip install -r requirements.txt
-
Configure environment
Copy-Item .env.example .env- Optional: valid_proxies.txt in root (one proxy per line) or PROXY_URL in .env
- Open
.envand set:- BOT_TOKEN=your discord bot token
- ALLOWED_GUILD_IDS=comma,separated,guild,ids
- Optional: SPOTIFY_CLIENT_ID / SPOTIFY_CLIENT_SECRET
- Optional (recommended): YOUTUBE_COOKIES=cookies/youtube.txt # helps bypass age/region restrictions
- Optional: OWNER_CONTACT=your handle or ID for contact
-
Run the bot
python src/bot.py -
In Discord, run
/setupin a server you own to create the music controller channel.
Tip: If venv activation is blocked, run PowerShell as admin once and execute:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser-
Install prerequisites (Debian/Ubuntu example)
sudo apt update sudo apt install -y python3 python3-venv python3-pip ffmpeg libopus0 libsodium23
- Verify:
python3 --version ffmpeg -version
-
Get the code and set up a virtual environment
git clone https://github.com/Soham-Das-afk/AuroraMusic.git cd AuroraMusic python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt
-
Configure environment
cp .env.example .env
- Edit
.envand set BOT_TOKEN, ALLOWED_GUILD_IDS, and any optional values.
- Edit
-
Run the bot
python3 src/bot.py
-
Use
/setupin your server to create the music controller.
Required:
BOT_TOKEN— your Discord bot tokenALLOWED_GUILD_IDS— comma-separated list of server IDs where the bot is allowed
Optional:
SPOTIFY_CLIENT_ID,SPOTIFY_CLIENT_SECRET— enable Spotify featuresYOUTUBE_COOKIES— (recommended) path to cookies file (e.g.,cookies/youtube.txt) to help bypass age or regional restrictions and improve reliabilityBOT_BANNER_URL— optional fallback image/GIF URL for the welcome banner if your Discord App doesn’t have a banner (example:https://cdn.example.com/banner.gif)CONTROLLER_THUMBNAIL_URL— optional controller thumbnail image URL (not shown by default; can be enabled later)SHOW_BANNER— show the welcome banner image card (true/false; accepts 1/0, true/false, yes/no, y/n)SHOW_CONTROLLER_THUMBNAIL— show a small thumbnail on controller embeds (true/false; accepts 1/0, true/false, yes/no, y/n)OWNER_CONTACT— contact string shown for unauthorized guilds (e.g., Discord handle/ID)PROXY_URL— optional single proxy URL (e.g.,http://user:pass@host:port)PROXY_FILE— optional path to a text file containing one proxy per line (default:valid_proxies.txtin project root)AUTO_RESTART_ENABLED— enable daily auto-restart (true/false, default true)AUTO_RESTART_TIME— time for restart in HH:MM (default 06:00)AUTO_RESTART_TZ_OFFSET_MINUTES— timezone offset in minutes (IST=330)CLEAR_CACHE_ON_START— (removed) on-disk cache and background downloads are disabled; this option is deprecated in this build.ENABLE_GLOBAL_COMMAND_SYNC— allow global slash-command sync (true/false; default: false). Use with care to avoid rate limits.COMMAND_SYNC_RETRIES— number of retries for command sync attempts (default: 3)COMMAND_SYNC_BACKOFF_BASE— exponential backoff base for command sync retries (default: 1.5; delay = base ** attempt)GLOBAL_COMMAND_SYNC_OFFPEAK_ENABLED— if true, global command syncing will be deferred to an off-peak UTC window (default: false)GLOBAL_COMMAND_SYNC_OFFPEAK_START_HOUR_UTC— start hour (UTC) for off-peak window (0–23; default: 2)GLOBAL_COMMAND_SYNC_OFFPEAK_END_HOUR_UTC— end hour (UTC) for off-peak window (0–23; default: 5)
If your Discord App banner isn’t set or you prefer a custom GIF, set BOT_BANNER_URL to a direct image URL. Reliable, no-login choices:
- ImgBB (simple, free):
- Go to https://imgbb.com/
- Upload your image/GIF (leave “expiration” as Don’t autodelete)
- After upload, open the image, choose “Embed codes” or “Links” and copy the Direct link
- It must look like
https://i.ibb.co/xxxx/banner.gif(note thei.ibb.cohost and file extension)
- It must look like
- Set
BOT_BANNER_URLin.envto that direct link
Tip: Avoid page/album links (they return HTML). You want links ending in .gif, .png, or .jpg with Content-Type: image/*.
Build the image and run with Docker Compose (recommended):
- Ensure
.envincludes the required variables listed above. - Place cookies (recommended) on the host at
AuroraMusic/cookies/youtube.txtand setYOUTUBE_COOKIES=cookies/youtube.txtin.env(helps bypass age/region restrictions). - (Optional) Place
valid_proxies.txtin the root folder if you need proxy support. - From the project folder:
docker compose up -d --build docker compose logs -f
Notes:
- Personal cookies and runtime data are not baked into the image. The compose file mounts:
./cookies -> /app/src/cookies:ro./data -> /app/src/data./valid_proxies.txt -> /app/valid_proxies.txt:ro(if it exists)
- To stop the container:
docker compose down - Multi-arch images: Starting with v3.2.35+, images are published for
linux/amd64andlinux/arm64(Apple Silicon, Graviton, etc.). Docker will automatically pull the correct architecture manifest.
- Install Docker Desktop and ensure WSL 2 backend is enabled.
- Configure
.env(copy from.env.example). - Recommended: Place YouTube cookies at
AuroraMusic/cookies/youtube.txtand setYOUTUBE_COOKIES=cookies/youtube.txtin.env(bypasses age or regional access limits). - Optional: Place
valid_proxies.txtin the root folder if you need proxies. - From the project folder:
docker compose up -d --build docker compose logs -f
- Stop when needed:
docker compose down
- Install Docker Engine and Compose plugin (Debian/Ubuntu example):
sudo apt update sudo apt install -y docker.io docker-compose-plugin sudo usermod -aG docker $USER newgrp docker docker compose version - Optional: Create
valid_proxies.txtif needed. - Configure
.envand cookies as above. - Build and run:
docker compose up -d --build docker compose logs -f
- Stop:
docker compose down
- Docker (Compose):
docker compose pull docker compose up -d --pull always
- Docker (direct run):
docker pull sohamdas103/auroramusic:latest docker stop auroramusic && docker rm auroramusic # re-run the docker run command from above
- From source (venv):
git pull pip install -r requirements.txt python src/bot.py
- Token/authorization errors: Double-check
BOT_TOKENin.envand that the bot was invited with the right scopes (bot + applications.commands). - Slash commands not showing: The bot clears and re-syncs per-guild on startup, but global propagation can still take time. Try re-inviting or restarting; check logs.
- FFmpeg not found: Ensure
ffmpeg -versionworks in your shell/terminal. Install FFmpeg and add to PATH. - Voice playback issues on Linux: Ensure
libopus0andlibsodiumare installed (see Linux prerequisites). - Permissions: In the controller channel, grant “Manage Messages” to the bot for best cleanup behavior.
I maintain this project when it’s needed or when I get time. If you run into issues or have suggestions, feel free to reach out directly:
- Discord: @sick._.duck.103 (Discord ID: 616499661951467530)
This project uses a source-available license tailored for AuroraMusic.
See the LICENSE file for the full terms.