For the complete documentation index, see llms.txt. This page is also available as Markdown.
New

Lavalink

Step-by-step guide to host a Lavalink audio server on Discloud.

Lavalink is a standalone audio streaming server used by Discord music bots to play audio from sources like YouTube, SoundCloud, Bandcamp, Twitch, and more. Instead of handling audio directly inside the bot, Lavalink offloads all the heavy audio processing to a dedicated server.

Lavalink runs as a Java application and exposes a WebSocket API that your bot connects to.


✅ Requirements

RAM – A minimum of 512MB is recommended for web applications.


🚀 Step-by-Step Setup

1

⬇️ Download Lavalink.jar

Download the latest stable release of Lavalink from the official GitHub repository:

👉 https://github.com/lavalink-devs/Lavalink/releases

Download the file named Lavalink.jar from the Assets section of the latest release.

2

📝 Create application.yml

Create a file named application.yml in the same folder as Lavalink.jar. This is the main configuration file for Lavalink.

YouTube plugin - The youtube: false setting under sources disables the built-in (deprecated) YouTube source. The youtube-plugin listed under plugins replaces it with a more up-to-date implementation. Check the plugin releases page for the latest version number.

3

⚙️ Create discloud.config

Create a discloud.config file in the same folder:

NAME=MyLavalink
TYPE=site
MAIN=Lavalink.jar
RAM=512
VERSION=17.x.x
ID=my-lavalink-subdomain
  • TYPE=site - Required because Lavalink listens on a network port.

  • MAIN=Lavalink.jar - Must match the exact filename of the JAR.

  • VERSION=17.x.x - Lavalink 4.x requires Java 17. Use 17.x.x or latest.

  • ID - Your registered subdomain (without .discloud.app).

4

📦 Create the ZIP file

Your folder should contain exactly these three files:

lavalink-upload/
├─ Lavalink.jar
├─ application.yml
└─ discloud.config

Compress these files into a .zip archive. Make sure the files are at the root of the ZIP, do not compress a folder.

5

🚀 Upload to Discloud

How To Host
6

🤖 Configure your bot

Connect your Discord bot to Lavalink using your subdomain. Since Discloud uses HTTPS/WSS with a reverse proxy, you must connect on port 443 with secure: true.

{
  "host": "my-lavalink-subdomain.discloud.app",
  "port": 443,
  "secure": true,
  "password": "youshallnotpass"
}

Replace my-lavalink-subdomain with your actual subdomain and youshallnotpass with the password you set in application.yml.


🔗 Connecting a YouTube Account (OAuth2)

By default, Lavalink may display a login prompt in the logs asking you to authorize a YouTube account. This is required to avoid YouTube throttling and playback errors.

If you enabled oauth.enabled: true in your application.yml, Lavalink will automatically generate a device authorization URL on the first startup.

1

📋 Start Lavalink and check the logs

After uploading and starting your Lavalink instance, check the application logs. Look for a message similar to:

2

🔑 Authorize the YouTube account

Open the URL from the logs in your browser (e.g., https://www.youtube.com/device?user_code=XXXX-XXXX).

Sign in with the Google / YouTube account you want Lavalink to use. A personal account works fine, a dedicated account is recommended.

3

✅ Confirm authorization

After granting access, return to your Lavalink logs. You should see a message confirming the authorization was successful:

Lavalink will save the token and reuse it automatically on future restarts. You do not need to repeat this process unless you revoke the access or change the account.

Last updated