Set up your Lavalink server and connect your music bot
The LavaLink V4 plan gives you your own Lavalink server that you configure yourself: set the password in Startup, adjust application.yml, then add host, port and password to your bot.
- Difficulty:
- Intermediate
- Time:
- 15 minutes
On this page
A music bot doesn't play audio by itself: it sends that work to a Lavalink server. The LavaLink V4 plan gives you your own server running Lavalink v4 on the Game Panel. You set it up and manage it yourself: choose a password, adjust its settings, then point your bot at it.
This is not a managed service. Our team keeps the server and hardware running, but the Lavalink configuration (password, sources, plugins) is yours to set.
Step 1: Set your Lavalink password
Open your LavaLink server in the Game Panel (from billing: Services → your LavaLink service → Auto Login to Panel).
Go to the Startup tab and set the password variable to a long, random password.
Restart the server with Restart so the new password is used.
Step 2: Adjust application.yml (optional)
All other Lavalink settings live in application.yml. Open it from the Files tab and edit it with the built-in editor. Common changes:
Sources: turn sources such as SoundCloud, Bandcamp or Twitch on or off under
lavalink.server.sources.Plugins: add plugins under
lavalink.plugins. In Lavalink v4, YouTube playback comes from the official youtube-source plugin, and Spotify/Apple Music support comes from plugins such as LavaSrc. Follow each plugin's own README for the exact lines to add.Don't change the port. The server must listen on the port the panel assigned to it (shown in the header and on the Network tab).
Save the file and Restart. Watch the Console: Lavalink prints its startup messages and any plugin errors there.
Before editing application.yml, make a copy or a backup. A single wrong indent in a YAML file stops Lavalink from starting.
Step 3: Find your connection details
Host and port: the address in the panel header and on the Dashboard, for example
astra.endercloud.in:6972. Before the colon is the host, after it the port.Password: the one you set in Startup.
Secure / SSL:
false.
Step 4: Add the node to your bot
Every Lavalink client library asks for the same details, though the names differ slightly. A typical Node.js node entry:
{
host: "astra.endercloud.in",
port: 6972,
password: process.env.LAVALINK_PASSWORD,
secure: false
}With Python and Wavelink 3 the details go into a URI:
node = wavelink.Node(uri="http://astra.endercloud.in:6972", password=os.getenv("LAVALINK_PASSWORD"))
await wavelink.Pool.connect(nodes=[node], client=bot)Use your own host and port and keep the password in a .env file. See Keep your bot token safe. Your bot itself runs on a separate bot plan: see Node.js bot or Python bot.
Your library must support Lavalink v4. Lavalink v4 removed the old v3 API, so old libraries and old music-bot templates fail to connect or play. Update to a version whose documentation mentions Lavalink v4.
Troubleshooting
Problem | Likely cause |
|---|---|
401 / Unauthorized | The password in your bot doesn't match the one in Startup, or you didn't restart after changing it. |
Connection refused or timed out | Lavalink is offline or crashed (check the Console), or the host/port is wrong. |
Lavalink won't start after editing | A YAML mistake in |
SSL or TLS error |
|
Bot connects but never plays | Your client library only supports Lavalink v3, or the source you search (for example YouTube) has no working plugin configured. |
Out of memory / random restarts | Too many players for 1 GB of RAM. Upgrade with Upgrade Plan. |
Frequently asked questions
Will Endercloud set up Lavalink or its plugins for me?
No. The plan gives you the server; configuring Lavalink is up to you. We can help with hosting-side problems such as the server not starting because of resources or ports.
Can several bots use the same Lavalink server?
Yes. Any bot with the host, port and password can connect. With 1 GB of RAM, very busy bots may need a bigger plan.
YouTube stopped working on my Lavalink
YouTube playback depends on the youtube-source plugin, which needs updates when YouTube changes. Update the plugin version in application.yml to the latest release and restart.
Was this article helpful?
Related articles
No domain? Open your website, API or bot dashboard over HTTPS with a free SSL certificate from Endercloud. Port first, a dash, then your node name, always on ender.co.in, like https://25808-agni.ender.co.in.
Open Discord Link in the billing panel's user menu and connect your Discord account to get notifications on Discord and the client role in the Endercloud Discord server.
Install DiscordSRV, create a Discord bot with the Server Members and Message Content intents, then put the bot token and channel ID in DiscordSRV's config.yml and restart.
Switch your bot from one language to another with Settings → Change Egg, and change the Node.js, Python or Java version with the Docker Image list in Startup.
