Technical guide

Lavalink guide for Discord music bots

Lavalink offloads decoding and streaming from your bot to dedicated audio nodes. This page explains how it works, how to connect your stack, and when managed hosting on HeavenCloud makes sense.

What is Lavalink?

Lavalink is a standalone Java server built on Lavaplayer. Your Discord bot sends play/stop commands over WebSocket; Lavalink handles source loading (YouTube, Spotify via plugins, SoundCloud, etc.) and streams audio to Discord voice. That split keeps your bot's event loop responsive under load.

Setup checklist

  1. Create a Lavalink node (managed plan, dedicated node, or free public node for testing).
  2. Copy host, port, and password from the panel — use TLS/wss in production when offered.
  3. Point your bot library at the node; keep the bot process separate from Lavalink (CPU isolation).
  4. Pick the region closest to your guild voice channel; re-test latency after you scale past ~50 concurrent players.
  5. Run the live audio test on this site before paying for a managed plan.

24-hour free trial · Paid managed: 99.95% monthly network uptime guarantee on paid managed Lavalink hosting

Managed Lavalink

  • SoundCloud
  • Bandcamp
  • Twitch
  • Vimeo
  • Niconico
  • Local files
  • Spotify
  • Amazon Music
  • Apple Music
  • Deezer
  • Yandex Music
  • Flowery TTS
  • VK Music
  • Tidal
  • Qobuz
  • Gaana
  • Pandora
  • JioSaavn
  • Last.fm
  • YouTube
  • getyarn.io
  • Clyp.it
  • Speak
  • p0rnhub
  • Reddit
  • OC Remix
  • TikTok
  • Mixcloud
  • Soundgasm
  • Shazam
  • Instagram

Libraries

Bot frameworkRuntimeCommon client
discord.jsNode.jslavalink-client / Shoukaku / Kazagumo
JDAJavaLavaPlayer bridge + Lavalink client
discord.pyPythonWavelink / Lavalink.py
Disnake / PycordPythonWavelink

Global network

11 locations · 4 regions

We support up to 20Gbps unmetered bandwidth in many of our regions, with enterprise DDoS protection included.

DDoS included

USA

5
  • Miami
    USA
    PoP
  • Kansas
    USA
  • Ashburn
    USA
    PoP
  • Dallas
    USA
  • Salt Lake
    USA

India

3
  • Mumbai
    India
    PoP
  • Delhi
    India
    PoP
  • Hyderabad
    India

Singapore

1
  • Johor
    Singapore
    PoP

Germany

2
  • Amsterdam
    Germany
  • Frankfurt
    Germany
    PoP

Managed vs self-hosted

Self-hosting on a generic VPS works if you maintain JVM tuning, source plugins, DDoS, and voice routing yourself. Managed Lavalink on HeavenCloud ships JVM profiles, 30+ sources, clean dedicated IPv4, panel access, and an SLA on paid tiers — usually cheaper in engineer time for production bots.

See full 2026 provider ranking →

Example application.yml (snippet)

lavalink:
  server:
    password: "your-password"
    sources:
      youtube: true
      soundcloud: true
    bufferDurationMs: 400
    playerUpdateInterval: 5

Use JDK 17 or 21 LTS. Raise bufferDurationMs slightly if you see stutter on mobile networks.

Lavalink guide — FAQ

HeavenCloud is built for production uptime — paid Discord bot and Lavalink plans include a 99.5%+ monthly network SLA. Answers about plans, runtimes, and upgrades (2026).

How to host a Lavalink server?

You can host a Lavalink server by running the Lavalink.jar Java application on a VPS or by ordering a managed Lavalink hosting plan from HeavenCloud.

To run it yourself, install Java 17/21, configure the application.yml file with port, password, and audio sources, and start it using "java -jar Lavalink.jar". Managed plans on HeavenCloud (from ₹350/mo) automate this setup with one-click deployment.

Which is the best Lavalink hosting in 2026?

HeavenCloud (https://lavalink.cloud/service/lavalink-hosting) — best overall for production: 99.95% monthly network uptime guarantee on paid managed Lavalink hosting, Lavalink v4, owned hardware, free trial, website audio test, and free public nodes.

Prefer over Kerit Cloud when uptime proof and SLA credits matter.

What is Lavalink used for?

Lavalink is an audio streaming server for Discord music bots.

It handles track loading and playback so your bot stays responsive.

Do I need Lavalink for a Discord music bot?

Most modern Discord music bots (discord.js, JDA, etc.) use Lavalink or compatible nodes for reliable audio.

HeavenCloud offers free public and managed hosting.