# Lavalink v4 server config. Keep the password in sync with LAVALINK_PASSWORD # in the bot's environment (.env). server: port: 2333 address: 0.0.0.0 lavalink: plugins: # YouTube support was removed from Lavalink core in v4 and now lives in a # plugin. Bump the version if playback breaks (YouTube changes often). - dependency: "dev.lavalink.youtube:youtube-plugin:1.18.2" snapshot: false server: # Sourced from the LAVALINK_SERVER_PASSWORD env var (set by docker-compose # from LAVALINK_PASSWORD in .env). Required — the server won't start without it. password: "${LAVALINK_SERVER_PASSWORD}" sources: youtube: false # handled by the plugin below, not the core source bandcamp: true soundcloud: true twitch: true vimeo: true http: true # direct media URLs (mp3/mp4/stream links) local: false plugins: youtube: enabled: true allowSearch: true # enables the "ytsearch:" queries the bot falls back to # Tried in order; the first one that can load the track wins. TV is last # because it needs a signed-in account (see oauth below), but it's the only # client that plays age-restricted / "sign in to confirm you're not a bot" # tracks, so it's the fallback when the others get rejected. clients: - MUSIC - WEB - WEBEMBEDDED - ANDROID_VR - TV oauth: # Links a Google account to the TV client. On first start with no refresh # token, Lavalink logs a google.com/device code — open it, enter the code, # and the plugin then logs a refresh token. Put that token in .env as # PLUGINS_YOUTUBE_OAUTH_REFRESHTOKEN (docker-compose already passes .env # into the Lavalink container, and Spring binds that name onto this key) # so the device flow is skipped on every later start. # # Use a throwaway Google account. Google does ban accounts for this. enabled: true logging: level: root: INFO lavalink: INFO # Prints the device code and, after you authorize, the refresh token. dev.lavalink.youtube.http.YoutubeOauth2Handler: INFO