Your bot needs three values from your Lavalink node: the host, the port and the password. See How to host a Lavalink music node to find them.
What every client asks for
| Setting | Value |
|---|---|
| Host | the address before the colon, for example 136.243.0.51 |
| Port | the number after the colon |
| Password | the password in application.yml |
| Secure (HTTPS) | off, the node uses plain http and ws |
Keep the password out of your code: put it in a .env file or a settings file you do not publish.
Node.js with Shoukaku
```js const { Shoukaku, Connectors } = require('shoukaku');
const nodes = [{ name: 'main', url: ${process.env.LAVALINK_HOST}:${process.env.LAVALINK_PORT}, auth: process.env.LAVALINK_PASSWORD, secure: false, }];
const shoukaku = new Shoukaku(new Connectors.DiscordJS(client), nodes); shoukaku.on('ready', (name) => console.log(Lavalink node ${name} connected)); shoukaku.on('error', (name, error) => console.error(Lavalink node ${name}, error)); ```
Create it after your client object exists. The library's documentation shows how to join a voice channel and play a track.





