Lavalink node: password, connecting your bot and settings

Create a free Lavalink node on Torchlite, find its address and generated password, connect your music bot to it, and check what to look at when the connection fails.

5 min readBy Torchlite teamUpdated

Lavalink node: password, connecting your bot and settings
On this page

Lavalink is an open-source audio node. A Discord music bot connects to it, tells it what to play, and Lavalink does the audio work. This guide covers creating a node on Torchlite, finding its password, pointing your bot at it and what to check when the bot cannot connect.

What you get

Lavalink is not a bot by itself. You still need a music bot that has a Lavalink client, and that bot has to run somewhere else. Torchlite runs the node on the Bot plan. It is installed from the project's GitHub releases, takes about 96 MB of disk, runs on Java 21 and uses about 170 MB of RAM at start. Its settings are in an application.yml file in your server's files.

PlanRAMCPUDiskRenew every
Bot512 MB0.5 core3 GB24 hours

The node is free: Torchlite is funded by our sponsor TorchByte and by advertising in the panel. A running server must be renewed from the panel before its time runs out, or it stops. Your files are kept. Before each start or renew the panel shows a short sponsor break, with 2 TorchByte cards, about 10 seconds each. You renew once every 24 hours, and the Renew button opens 6 hours before the time runs out. The renewal guide explains the timer.

One place per account

A Lavalink node takes your account's one Discord bot place, the same place a Discord bot takes. So on one Torchlite account you host either a bot or a Lavalink node, not both. Voice servers (TeamSpeak and Mumble) have a place of their own, so one can run next to it. This suits you if your bot runs somewhere else, such as your own PC or another host. It does not use your game server place, so a game server can run next to it. A server with nothing done on it for 5 days is deleted, and we email you one day before.

Create the node

  1. Open Create your server.
  2. Choose the Bot plan, then Lavalink.
  3. Enter your email and confirm it with the code we send.
  4. Wait while the server is built. It starts by itself.

Then log in at game.torchlite.host with the same email and password. The panel tour explains the tabs.

Check that it is running

Open the Console. When the node is up, it prints "Lavalink is ready to accept connections". At start it uses about 170 MB of RAM, inside the 512 MB of the plan. We cap the Java heap at 60% of the plan's memory.

Find the password

The password is generated when the server is created. Open Startup and look for the variable named Password. It is 12 to 64 letters and digits. Your bot needs exactly this value.

To change it, edit the value in Startup and restart the server. The new value must be 12 to 64 letters and digits only. On every start the panel writes the password into application.yml, so you do not edit it in the file. The sample file's well-known default password is never left in place.

Find the address and port

The panel shows the server's address as a name and a port, for example lavalink.play.torchlite.host:20400. Use the address shown in your own panel. The host is the name without the port, and the port is the number after the colon. The port is assigned by us and cannot be changed. On every start the panel writes it, together with the listen address, into application.yml, so a manual edit would be replaced.

Connect your bot

Your bot's Lavalink client needs four things:

  • the host: the address from the panel, without the port
  • the port
  • the password from Startup
  • secure set to false, because there is no TLS on the connection

Every client names these a little differently. A generic example of node settings:

json
{
  "host": "lavalink.play.torchlite.host",
  "port": 20400,
  "password": "the value of Password from Startup",
  "secure": false
}

Replace the values with your own. Check your client's documentation for where these settings go, because the exact names depend on the library. Then start your bot and watch the node's Console to see it connect.

What we tested

On both of our nodes the server answered its version endpoint over the internet when we sent the generated password. It refused a wrong password and the sample default password. We did not test playing audio, so we cannot tell you how a particular bot or music source behaves.

Which sources work depends on Lavalink's plugins and on the sources themselves. Sources change and can be blocked, so we do not promise that any particular one works. If a source stops playing, check your plugins and the source first.

What the panel controls

In Startup there are two variables you can change:

  • Password, the value your bot connects with.
  • Version, which picks the Lavalink release. The default is latest, and a change takes effect after a reinstall.

On every start the panel writes three things into application.yml: the listen address, the port and the password. Other lines in that file, such as plugin settings, are yours to edit in Files. You cannot change the startup command or the Docker image. Take a backup before you edit files by hand, and use SFTP if you prefer to edit on your computer. After a change, stop and start the server.

Common problems

My bot cannot connect

Check these in order:

  1. The server is running and its Console showed "Lavalink is ready to accept connections".
  2. The host is the name from the panel without the port, and the port is the number from the panel.
  3. The password is exactly the value of Password in Startup.
  4. secure is false.
  5. The server has not stopped because its renew time ran out. If it has, press Start.

The password is rejected

Copy the value again from Startup, with no spaces before or after it. If you changed it, restart the server so the new value is written into application.yml, and update your bot too.

The node stopped on its own

The renewal timer ran out. Your files are kept. Press Renew or Start, then let your bot reconnect.

I changed the port in application.yml and it went back

The panel writes the assigned port on every start. The port cannot be changed.

I want to run a bot here instead

Lavalink and a Discord bot share your account's one place. Delete the node from the panel and create a bot in its place. Back up your files first if you want to keep them.

Stuck on a step?

Ask on the forum. Your question links back to this guide, so whoever answers knows where you are.

Ask about this guide

About the author

Torchlite team

The people who run Torchlite

We build and run the Torchlite panel and the nodes. Every guide is checked on our own servers before it goes up, and updated when the panel changes.

Found a mistake? Tell us on Discord

Related guides

All guides →