Local FFmpeg is not required. Lavalink handles all audio decoding and processing internally inside its own container.
docker-compose.yml
The project ships with a ready-madedocker-compose.yml that pulls the official Lavalink 4.x image and wires up everything the bot expects.
docker-compose.yml
application.yml
The volume mount injectsapplication.yml into the container at /opt/Lavalink/application.yml. This file controls Lavalink’s server port, authentication password, enabled audio sources, and logging output.
application.yml
- YouTube plugin (
dev.lavalink.youtube:youtube-plugin:1.18.1) — the official plugin replaces the built-in YouTube source;allowSearch,allowDirectVideoIds, andallowDirectPlaylistIdsare all enabled. - SoundCloud (
soundcloud: true,scSearch: true) — enables SoundCloud playback and search. - HTTP source (
http: true) — allows Lavalink to stream direct audio URLs such as.mp3files. bufferDurationMs: 400— sets the audio buffer to 400 ms for smooth playback.- Logging — Lavalink writes
INFO-level logs to./logs/lavalink.loginside the container.
Starting Lavalink
1
Verify Docker is running
Open a terminal and confirm the Docker daemon is active:If Docker is not running, start Docker Desktop (macOS/Windows) or run
sudo systemctl start docker (Linux).2
Start Lavalink in the background
From the project root (the directory containing The
docker-compose.yml), run:-d flag runs the container detached so it continues in the background after you close the terminal.3
Verify Lavalink is running
Open Lavalink returns a short HTML or JSON response when it is online. Any response on port 2333 confirms it is healthy.
http://localhost:2333 in a browser or use curl:4
Inspect the logs (optional)
To follow Lavalink’s output in real time:Add
-f to stream logs continuously:Stopping Lavalink
To stop and remove the container:application.yml and the logs/ directory on the host.
Common Issues
Port 2333 is already in use
Port 2333 is already in use
Another process is bound to port 2333. Find and stop it, or change the host-side port in If you change the port, update
docker-compose.yml:bot.py’s on_ready handler to match the new URI (http://127.0.0.1:2334).Docker is not running
Docker is not running
docker compose up will exit immediately with a connection error if the Docker daemon is not active. Start Docker and retry.Container exits immediately
Container exits immediately
Run
docker compose logs lavalink to read the startup output. A malformed application.yml (incorrect indentation, wrong password format) is the most common cause of an instant exit.Related Topics
Bot Setup
Configure the Discord application that will connect to this Lavalink node.
Environment Variables
Check the .env values used by the bot when it starts up.
Quickstart
Follow the end-to-end path from setup to first playback.
Configuration
Review the full audio and permission settings used by the bot stack.