application.yml file is the primary configuration file for Lavalink. It should be placed in the same directory where you start your Lavalink server.
Complete Example
application.yml
Server Configuration
The port where Lavalink will listen for connections.
The address to bind to. Use
0.0.0.0 to listen on all interfaces or 127.0.0.1 for localhost only.Whether to enable HTTP/2 support for the REST API.
Plugin Configuration
List of plugins to load on startup.
Directory where plugins are stored.
Default Maven repository for plugin downloads.
Default Maven repository for snapshot plugin downloads.
Lavalink Server Configuration
Authentication
Password for authenticating client connections to Lavalink.
Audio Sources
Enable or disable specific audio sources.
Enable YouTube source (deprecated).
Enable Bandcamp source.
Enable SoundCloud source.
Enable Twitch source.
Enable Vimeo source.
Enable Niconico source.
Enable HTTP source for direct URLs.
Enable local file playback.
Audio Filters
All filters are enabled by default. Set tofalse to disable specific filters.
Enable volume filter.
Enable equalizer filter.
Enable karaoke filter.
Enable timescale filter (speed/pitch adjustment).
Enable tremolo filter.
Enable vibrato filter.
Enable distortion filter.
Enable rotation filter (8D audio effect).
Enable channel mix filter.
Enable low pass filter.
Performance Settings
Reduces allocations per player at the expense of non-instantaneous changes (e.g., volume).
Duration of the NAS buffer in milliseconds. Higher values handle GC pauses better.
- Set to
<= 0to disable JDA-NAS - Minimum value:
40ms - Lower values may introduce audio pauses
How many milliseconds of audio to keep buffered.
Opus encoder quality level.
- Range:
0to10 10is best quality but most CPU-intensive- Lower values reduce CPU usage
Quality of resampling operations.Options:
LOW- Fastest, lowest qualityMEDIUM- BalancedHIGH- Best quality, most CPU-intensive
Threshold in milliseconds for detecting stuck tracks. A track is considered stuck if it doesn’t return audio data within this time.
When seeking, continue reading from the audio buffer until empty or seek is ready.
Playlist and Search Settings
Number of pages to load from YouTube playlists (100 tracks per page).
- Default
6= 600 tracks maximum
How frequently to send player updates to clients, in seconds.
Enable YouTube search functionality.
Enable SoundCloud search functionality.
Filter out 30-second preview tracks from SoundCloud results.
Enable garbage collection warnings in logs.
Rate Limiting
See the Route Planner documentation for detailed information.List of IP blocks in CIDR notation for IP rotation.Example:
["1.0.0.0/8", "2001:db8::/32"]IPs to explicitly exclude from rotation.
IP rotation strategy.Options:
RotateOnBan- Switch IP when bannedLoadBalance- Random IP selectionNanoSwitch- Nanosecond-based switchingRotatingNanoSwitch- Rotating nanosecond-based switching
Whether a search 429 (rate limit) response should trigger marking the IP as failing.
Number of retries for failed requests.
-1= use default lavaplayer value0= infinity>0= specific retry count
YouTube Configuration
Google account email for avoiding age restrictions.
Some restricted videos can be played without authentication.
Google account password.
HTTP Proxy Configuration
Proxy hostname (IP address or domain).
Useful for protecting your music node from IP-grabbing attacks. Only the proxy IP will be exposed.
Proxy port (3128 is the default for Squid proxy).
Optional username for proxy basic authentication.
Optional password for proxy basic authentication.
Timeouts
Connection timeout in milliseconds.
Connection request timeout in milliseconds.
Socket timeout in milliseconds.
Metrics Configuration
Enable Prometheus metrics endpoint.
Path for the Prometheus metrics endpoint.
Sentry Configuration
Sentry DSN for error tracking.
Environment name for Sentry (e.g., “production”, “staging”).
Custom tags to attach to Sentry events.
Logging Configuration
Directory where log files will be stored.
Root logging level.Options:
TRACE, DEBUG, INFO, WARN, ERRORLavalink-specific logging level.
Request Logging
Enable HTTP request logging.
Include client information in request logs.
Include HTTP headers in request logs.
Include query strings in request logs.
Include request payload in logs.
Maximum length of payload to include in logs.
Log requests before they are processed (instead of after).
Log Rotation
Maximum size of a single log file before rotation.
Number of days to keep log files.
Related Resources
Environment Variables
Configure using environment variables instead
Route Planner
Configure IP rotation strategies
IPv6 Setup
Setup IPv6 for better rate limit handling
Config Server
Manage multiple instances centrally