Discord · Guide

How to Host a Lavalink Server

Updated October 10, 2026 5 min read

On this page
  1. What Lavalink needs
  2. Download and start Lavalink
  3. Configure application.yml
  4. YouTube, Spotify and other sources
  5. Connect your bot to Lavalink
  6. Lavalink hosting on HytHost
  7. FAQ

Lavalink is a standalone audio server for Discord music bots. Your bot sends it commands — play this, skip, set the volume — and Lavalink does the heavy part: fetching the track, encoding the audio and streaming it into the voice channel. The bot stays light, and one Lavalink server can feed many guilds.

This guide sets up Lavalink 4, configures it safely, adds the YouTube plugin and connects a bot to it — on your own machine or with Lavalink hosting.

What Lavalink needs

  • Java 17 or newer. Lavalink recommends the latest LTS release.
  • Lavalink 4.2 or newer. Since March 2026 Discord only allows end-to-end encrypted voice (the DAVE protocol), and Lavalink 4.2.0 was the first release to support it. Older servers can no longer play audio in Discord.
  • A client library in your bot that supports the same version — current lavalink-client, Shoukaku, Wavelink, lavalink.py and others do. Choosing one is covered in how to make a Discord music bot.
  • A machine that stays on, because the music stops when Lavalink does.

Download and start Lavalink

  1. Download Lavalink.jar from the latest release on GitHub into an empty folder.
  2. Create application.yml in the same folder (next section).
  3. Start it from that folder:
java -jar Lavalink.jar

Lavalink is ready when the log shows that it started. On a Linux server, the Lavalink docs recommend running it as a systemd service so it restarts on crash and on reboot; a Docker image is also published.

Configure application.yml

A minimal Lavalink 4 config with the YouTube plugin:

server:
  port: 2333
  address: 0.0.0.0
lavalink:
  plugins:
    - dependency: "dev.lavalink.youtube:youtube-plugin:1.18.2"
      snapshot: false
  server:
    password: "a-long-random-password"
    sources:
      youtube: false
      soundcloud: true
      bandcamp: true
      twitch: true
      vimeo: true
      http: true
      local: false
plugins:
  youtube:
    enabled: true
    allowSearch: true
  • password — change it. The example config ships with youshallnotpass, which is public; anyone who finds your server could use it with the default.
  • port — 2333 by default; your bot connects to this port.
  • sources.youtube: false — the built-in YouTube source is deprecated. The plugin replaces it, and its documentation says the built-in one must be turned off.
  • http: true lets the bot play direct links; the official example notes that without a proxy this can reveal your server's IP.

YouTube, Spotify and other sources

Plugins are listed under lavalink.plugins and downloaded at startup. Two are worth knowing:

  • youtube-source (dev.lavalink.youtube:youtube-plugin) — YouTube playback and search. YouTube actively blocks automated access, so it can stop working until the plugin is updated; keep it on the latest version.
  • LavaSrc (com.github.topi314.lavasrc:lavasrc-plugin) — adds Spotify, Apple Music, Deezer and more. Spotify and Apple Music links are read for their track details, and the audio is played from another source.
Mind the terms. YouTube's terms do not allow downloading or rebroadcasting content without permission, and Discord's community guidelines forbid sharing content that violates intellectual property. Running a music bot means taking responsibility for what it plays.

Connect your bot to Lavalink

Every Lavalink client asks for the same four values, called a node:

SettingValue
HostThe address of the machine running Lavalink
PortThe server.port from application.yml
PasswordThe lavalink.server.password you set
Securefalse, unless you put Lavalink behind HTTPS

For example, Wavelink in Python takes wavelink.Node(uri="http://your-host:2333", password="..."). If the bot cannot connect, check the password first, then that the port is reachable from where the bot runs.

Lavalink hosting on HytHost

  1. Pick Lavalink as the runtime. On Discord bot hosting, choose a plan and select Lavalink as the language. The server installs the latest Lavalink on Java 21 with the official example config.
  2. Change the password. Open application.yml in the file manager and replace the default password. The panel already sets the address and the port to your server's own port, so leave those two as they are.
  3. Add the YouTube plugin if you want YouTube: the plugin block and youtube: false from the config above, then restart.
  4. Connect your bot with the server address and port shown in your panel and the password you set.

Lavalink runs as its own server, separate from your bot. Order one plan for the bot and one with the Lavalink runtime, or on a plan with several bot slots ask us to move one of them to the Lavalink runtime. In our tests Lavalink idles at under 200 MB; for one small bot our recommendation is 1 GB, more if it plays in many servers at once.

Lavalink is one of the runtimes of HytHost Discord bot hosting, next to Node.js, Python and Java — from €0.89/mo.

See bot hosting plans
FAQ

Frequently asked questions

A standalone audio server for Discord music bots. The bot tells it what to play, and Lavalink fetches, encodes and streams the audio to the voice channel, so the bot itself stays light.

Java 17 or newer, and the Lavalink team recommends the latest LTS release. Lavalink 4.2 or newer is also needed, because Discord now requires encrypted voice.

Port 2333 and the password youshallnotpass from the example config. Change the password before you put the server online; the default is known to everyone.

The built-in YouTube source is deprecated. Add the youtube-source plugin, set sources.youtube to false and restart. If it stops working later, update the plugin, since YouTube regularly changes how it blocks automated access.

There is no official figure. In our tests it idles at under 200 MB; our recommendation is 1 GB for a small bot, and more if it plays in many servers at the same time.

Keep the music playing

Run Lavalink or your bot on HytHost Discord bot hosting, with seven runtimes, a MySQL database and backups — from €0.89/mo.

Live chat 8 AM – 11 PM (Chișinău time) · tickets answered during business hours

Was this guide helpful?