Discord music bot for a single guild. Streams and downloads YouTube audio via yt-dlp.
451
Discord music bot — streams and plays YouTube audio in voice channels for a single guild.
yt-dlp binary installed at build time — no Python, no extra dependencies at runtimeffmpeg-static bundled as an npm package for audio processing| Tag | Description |
|---|---|
1.0.0 | First stable release |
latest | Tracks the most recent stable build |
docker run -d \
--name crimson-duchess \
-e DISCORD_TOKEN=your_token \
-e DISCORD_APP_ID=your_app_id \
-e DISCORD_PUBLIC_KEY=your_public_key \
-e GUILD_ID=your_guild_id \
-e DEFAULT_VOICE_CHANNEL_ID=your_channel_id \
-e PORT=1942 \
-p 1942:1942 \
-v crimson_duchess_music:/app/downloads \
-v crimson_duchess_temp:/app/temp \
crimson-duchess:1.0.0
services:
crimson-duchess:
image: crimson-duchess:1.0.0
container_name: crimson-duchess
restart: unless-stopped
ports:
- ${PORT}:${PORT}
volumes:
- music_data:/app/downloads
- temp_data:/app/temp
environment:
DISCORD_TOKEN: ${DISCORD_TOKEN}
DISCORD_APP_ID: ${DISCORD_APP_ID}
DISCORD_PUBLIC_KEY: ${DISCORD_PUBLIC_KEY}
GUILD_ID: ${GUILD_ID}
DEFAULT_VOICE_CHANNEL_ID: ${DEFAULT_VOICE_CHANNEL_ID}
PORT: ${PORT}
volumes:
music_data:
temp_data:
Put the values in a .env file next to your docker-compose.yml and run:
docker compose up -d
All variables are required unless a default is noted.
| Variable | Description | Default |
|---|---|---|
DISCORD_TOKEN | Bot token from the Discord Developer Portal | — |
DISCORD_APP_ID | Application (client) ID | — |
DISCORD_PUBLIC_KEY | Public key from the Discord Developer Portal | — |
GUILD_ID | ID of the guild (server) the bot serves | — |
DEFAULT_VOICE_CHANNEL_ID | Voice channel the bot joins on first playback | — |
PORT | Port exposed by the health check HTTP server | 3000 |
| Mount path | Purpose |
|---|---|
/app/downloads | Permanently saved audio files downloaded via /download |
/app/temp | Temporary files created during /play youtube streaming, safe to clear between restarts |
Mount /app/downloads on a persistent volume so downloaded tracks survive container restarts and upgrades.
| Port | Protocol | Description |
|---|---|---|
PORT | TCP | HTTP server with a GET /api/health endpoint for uptime checks |
The container entrypoint runs pnpm start-all, which:
GUILD_ID).This means slash commands are always up to date on every container start. The registration step requires a valid DISCORD_TOKEN and DISCORD_APP_ID — the container will exit if either is missing.
GET /api/health → 200 OK
Use this endpoint for Docker health checks or uptime monitoring:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${PORT}/api/health"]
interval: 30s
timeout: 5s
retries: 3
git clone <repo-url>
cd crimson_duchess
docker build -t crimson-duchess:1.0.0 .
The build uses three stages — dependency installation, TypeScript compilation, and the final runtime image — so only production artefacts end up in the shipped image.
Content type
Image
Digest
sha256:8f3c7cef8…
Size
123.6 MB
Last updated
3 months ago
docker pull ntdat2003/crimson-duchess