Updated 4 November 2026
A Discord music bot needs more than a normal bot: it decodes and streams audio to voice channels all day. Most music bots therefore use Lavalink, a separate Java audio server that wants 512 MB to 1 GB of memory on its own. That is why we recommend a VPS for a music bot: VPS S with 4 GB RAM and 2 vCPU costs €7.99 per month paid per quarter (€8.29 monthly) and runs Lavalink and your bot side by side.
Versions checked on 1 November 2026: Lavalink 4.2.2 (needs Java 17 or newer) and the youtube-source plugin 1.18.2, both on GitHub; wavelink 3.5.2 (Python, PyPI) and Shoukaku 4.3.0 (Node.js, npm) as client libraries.
Bot hosting or a VPS for music?
| Your bot | Best fit | Per month, paid per quarter | Monthly billing |
|---|---|---|---|
| A bot without music (moderation, tickets, levels) | Bot hosting 512 MB | €0.69 | €0.79 |
| A music bot in Node.js or Python without its own Lavalink (many voice connections, or a Lavalink server that runs elsewhere) | Bot hosting 2 GB (8 GB storage) | €2.09 | €2.29 |
| A music bot with Lavalink, a dashboard, or several bots | VPS S (2 vCPU, 4 GB RAM, 40 GB NVMe) | €7.99 | €8.29 |
Prices include 21% VAT; bot hosting 2 GB is €22.99 per year, and there is no yearly option for the VPS. The VPS runs in Germany. Bot hosting runs one Node.js or Python process per plan, so it has no room for a Java Lavalink server next to your bot: Lavalink/Java music bots aren't supported on the Node.js/Python plans. Comparison in detail: bot hosting or a VPS?
Be honest about YouTube
YouTube actively blocks playback from servers in data centres, at every host. The youtube-source plugin works around this with options like OAuth or a poToken, but its own README warns that none of them is a guaranteed fix and that using an account can get that account blocked. Playback can stop working after a YouTube change until the plugin is updated. Sources like SoundCloud, Bandcamp, Twitch, direct links and your own files are usually less trouble. Also check the terms of the services you stream from.
Set it up on a VPS
- Order VPS S on the VPS page with Ubuntu 24.04, and secure it first: SSH keys, firewall and updates.
- Install Java for Lavalink:
apt install -y openjdk-21-jre-headless. - Download Lavalink: put
Lavalink.jarfrom the GitHub releases of lavalink-devs/Lavalink in its own folder, for example/home/lavalink, as a separate user. - Configure it in an
application.ymlnext to the jar: setserver.port(2333 is the usual one), a stronglavalink.server.password, and add the YouTube plugin underlavalink.pluginsasdev.lavalink.youtube:youtube-plugin:1.18.2with the built-in YouTube source turned off, as the plugin's README shows. - Keep Lavalink private. Your bot runs on the same VPS, so let Lavalink listen on
127.0.0.1only (server.address) and don't open port 2333 in the firewall. - Run both with systemd: one service for
java -Xmx1G -jar Lavalink.jarand one for your bot, both withRestart=always. The full service file is in Run a Discord bot 24/7 on a VPS with systemd. - Connect your bot with a Lavalink client: wavelink for discord.py, or Shoukaku or lavalink-client for discord.js. Point it at
127.0.0.1:2333with your password.
GuildVoiceStates, discord.py voice_states), or the bot can't see who is in a voice channel and the Lavalink client can't connect. Bot going offline? See 8 causes and fixes.How much does the VPS hold?
Lavalink with -Xmx1G plus a typical bot uses well under 2 GB, so VPS S leaves room for a second bot, a small database or a web dashboard. The VPS has no backups included: back up your bot code and database yourself with restic.
Frequently asked questions
Where can I host a Discord music bot? On a VPS, because most music bots need Lavalink, a separate Java server, next to the bot. At ServerSpark, VPS S (4 GB RAM, 2 vCPU) costs €7.99 per month paid per quarter or €8.29 monthly, VAT included.
Can a music bot run on normal bot hosting? Not with Lavalink. Bot hosting runs one Node.js or Python process per plan, without room for a Java audio server next to it. A Node.js or Python music bot without its own Lavalink, for example one with many voice connections or one that uses a Lavalink server elsewhere, fits on bot hosting 2 GB for €2.09 per month paid per quarter (€2.29 monthly).
Does YouTube playback keep working? Nobody can promise that. YouTube blocks playback from data centres, and the youtube-source plugin's workarounds can stop working after a YouTube change.
How much RAM does Lavalink need? Usually 512 MB to 1 GB; give it a fixed limit such as -Xmx1G.
Do I need to open a port for Lavalink? No, not when the bot runs on the same VPS. Let Lavalink listen on 127.0.0.1 only.