Only show guides for your app
A music bot is really two servers — a Lavalink audio node and your bot. Here's how they fit together on Falix, how to wire them up, and where to get the client code.
A music bot is really two programs working together, and understanding that split is most of the battle. This guide is an honest architecture walkthrough: what runs where, how the two halves connect on Falix, and where to get the actual playback code. It deliberately does not hand you a full copy-paste music bot — those go stale fast and every library does it differently — but it gets the platform pieces exactly right so the library's own examples will just work.
| At a glance | |
|---|---|
| You need | comfort with the discord.js bot guide (or the Python equivalent) — a bot that logs in and answers a slash command |
| You'll create | a second server for this |
| Time | about an hour |
Expect to read your chosen library's docs alongside this.
Streaming audio into a voice channel is heavy work, and a Discord bot process is bad at it. The standard solution is Lavalink: a standalone audio node that does the fetching, decoding, and streaming, while your bot just sends it instructions. So on Falix you run two servers:
The flow at play time: a user runs /play in Discord → your bot receives the interaction and passes the track (or search query) to Lavalink → Lavalink fetches the audio and streams it into the voice channel.
🎯 Good to know: Your bot never touches the audio itself — it's the remote control, and Lavalink is the speaker.
Create a new server and choose the Lavalink application (in the Applications → software section). Start it once so it installs and generates its config. Which build it downloads is set by the VERSION variable on the Settings page — it defaults to latest, which is what you want unless your client library targets a specific major version (see the version-mismatch note in Troubleshooting).
Lavalink is configured by a file called application.yml. Two things there matter to you:
application.yml. Open the file in the File Manager and read the configured server password — you'll need it on the bot side. (Change it there if you like; keep the value.)Then find this server's public address and port on its Network page. That address-and-port pair is what your bot will connect to — note it down.
🎯 Good to know:
application.ymlis written by the install. Reinstalling this server — or switching its application — wipes its files and re-runs that install, which re-downloads Lavalink and lays down a freshapplication.ymlwith a newly generated password. Keep the password recorded somewhere, and re-read it from the file after any reinstall.
⚠️ Heads up: On Falix the port is your server's own allocation from the Network page, not Lavalink's usual default of
2333. Use the allocated port.
Your second server is an ordinary discord.js or discord.py bot — build it exactly as in the discord.js or discord.py guide, with a token in .env and at least one working command. Then add a Lavalink client library, which is the piece that speaks Lavalink's protocol for you. Well-established choices:
Install your chosen one from the Packages page. Which you pick is up to you; each has its own API and its own docs, and those docs are the source of truth for the actual playback code — the /play, queue, skip, and voice-join logic.
Whatever library you choose, you configure it with the same four facts about your Lavalink server: its host, its port, its password, and whether the connection is secure. Keep the password and address in the bot's .env, not in code. The shape looks like this — but treat it strictly as a sketch:
// SKETCH ONLY. Every Lavalink client names these fields differently — check
// your library's current docs for the exact API and connection method.
const nodes = [
{
host: process.env.LAVALINK_HOST, // Lavalink server's public address (its Network page)
port: Number(process.env.LAVALINK_PORT), // its public port (the allocation, not 2333)
password: process.env.LAVALINK_PASSWORD, // the password from application.yml
secure: false, // plain connection to address:port
},
];
| Setting | Where it comes from |
|---|---|
| Host | the Lavalink server's public address (its Network page) |
| Port | its public port — the allocation, not 2333 |
| Password | the password in application.yml |
| Secure | false — a plain connection to address:port |
From there, follow your library's guide for handling /play, joining the voice channel, and managing a queue. The connection details above are the only Falix-specific part; everything else is standard for the library.
application.yml, and re-check the host and port on the Lavalink server's Network page (remember: the allocated port, not 2333).