---
title: "Discord music bot with Lavalink: 24/7 hosting | StreetHosting"
description: "How to host a Discord music bot with Lavalink in Brazil: RAM, Java, audio nodes, Anti-DDoS and uptime for servers with busy voice channels."
url: "https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink"
type: "page"
language: "en-US"
---

Discord Bots · 2 min · Intermediate

Published on Jun 9, 2026 · Updated on Jun 9, 2026

# Discord music bot with Lavalink

A music bot uses RAM and bandwidth differently from a moderation bot. Running Lavalink separately from the main bot is the stable standard in production.

By [Equipe StreetHosting](https://streethosting.com.br/en/autores#equipe-streethosting) · StreetHosting infrastructure and support team

[Community and game modes](https://streethosting.com.br/en/guides/topics/community) [Monitoring and alerts](https://streethosting.com.br/en/guides/topics/monitoring)

Summarize with:

[](https://chat.openai.com/?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-music-bot-lavalink.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "ChatGPT") [](https://claude.ai/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-music-bot-lavalink.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Claude") [](https://www.google.com/search?udm=50&aep=11&q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-music-bot-lavalink.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Google AI Mode") [](https://x.com/i/grok?text=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-music-bot-lavalink.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Grok") [](https://www.perplexity.ai/search/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-music-bot-lavalink.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Perplexity")

Share:

[](https://x.com/intent/tweet?text=Discord%20music%20bot%20with%20Lavalink%3A%2024%2F7%20hosting&url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-music-bot-lavalink "Share on X") [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-music-bot-lavalink "Share on Facebook") [](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-music-bot-lavalink "Share on LinkedIn") [](https://wa.me/?text=Discord%20music%20bot%20with%20Lavalink%3A%2024%2F7%20hosting%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-music-bot-lavalink "Share on WhatsApp")

For agents: Copy as Markdown [.md](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink.md)

In this guide 4 sections

* [What Lavalink is](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#o-que-e-lavalink)
* [RAM and CPU](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#dimensionamento)
* [Production deploy](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#deploy)
* [Common problems](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#problemas-comuns)

Quick answer

For a **Discord music bot with Lavalink**, keep the **Lavalink node (Java)** separate from the **Node.js bot**, reserve **2 to 4 GB of RAM**, use a host in Brazil and set up automatic restarts. Active voice needs steady bandwidth and spare CPU when several channels are playing at once.

## What Lavalink is[](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#o-que-e-lavalink)

Lavalink is an audio server that receives requests from the bot and streams to Discord voice channels. Centralizing audio takes load off the discord.js process and improves stability when dozens of users request a track at the same time.

## RAM and CPU[](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#dimensionamento)

| Scenario                      | Bot    | Lavalink  | Suggested total |
| ----------------------------- | ------ | --------- | --------------- |
| 1 occasional voice channel    | 512 MB | 512 MB    | 1 to 2 GB       |
| Several simultaneous channels | 1 GB   | 1 to 2 GB | 3 to 4 GB       |
| Large 24/7 server             | 2 GB   | 2 GB+     | VPS 4 GB+       |

Monitor the Java heap and the bot's RSS. A GC pause turns into audible lag in voice, and your members will blame the bot, not Lavalink.

## Production deploy[](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#deploy)

1. Install Java LTS and Node.js LTS on the same VPS or bot plan.
2. Start Lavalink with application.yml (port, password, plugins).
3. Configure the bot with the Lavalink host, password and node name.
4. PM2 for the bot, and systemd or a separate PM2 process for Lavalink.
5. Test voice join, queue, skip and disconnect in a real channel.
* Strong Lavalink password, not exposed in Git
* Firewall blocking the Lavalink port from outside
* Rotated logs (voice generates volume)
* Alert if Lavalink restarts > 2 per hour

Uptime fundamentals are covered in [24/7 bot hosting](https://streethosting.com.br/en/guides/discord-bots/discord-bot-hosting-24-7) and deploying with [PM2 for Node.js](https://streethosting.com.br/en/guides/discord-bots/deploy-discord-bot-pm2).

## Common problems[](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#problemas-comuns)

### Bot joins muted or disconnects

* Discord voice region vs host latency.
* Blocked UDP or aggressive NAT (rare in a professional datacenter).
* Lavalink offline or the wrong password in the bot.

For budgeting, see [how much it costs to host a Discord bot](https://streethosting.com.br/en/guides/discord-bots/discord-bot-hosting-cost). Plans are available in [bot hosting](https://streethosting.com.br/en/bots) or on a [Ryzen VPS](https://streethosting.com.br/en/vps/ryzen) for bigger stacks.

In this guide

* [What Lavalink is](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#o-que-e-lavalink)
* [RAM and CPU](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#dimensionamento)
* [Production deploy](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#deploy)
* [Common problems](https://streethosting.com.br/en/guides/discord-bots/discord-music-bot-lavalink#problemas-comuns)

## Frequently asked questions

Does Lavalink run on the same plan as the bot?

For small bots, yes, with 2 GB or more. Communities with several simultaneous voice channels benefit from running Lavalink as a separate process or on a separate VPS.

Do I need Java for Lavalink?

Yes. Lavalink is a Java server. The client bot is usually Node.js (discord.js + shoukaku or similar). Plan for an LTS JDK on the host.

YouTube broke my bot. Now what?

It depends on your Lavalink plugins and the sources they support. Keep Lavalink and its plugins up to date. Avoid promising your community an endless catalog.

Next step

See bot plans

24/7 Discord bots with fast activation and support in Portuguese.

[See bot plans](https://streethosting.com.br/en/bots)

[See Ryzen VPS Ryzen 9 9950X VPS in São Paulo with root access, NVMe and gamer Anti-DDoS.](https://streethosting.com.br/en/vps/ryzen)

## Related guides

[Discord bots Beginner 24/7 Discord bot hosting in Brazil Discord bot hosting 24/7 combines a process manager with automatic restart, a token kept out of your code, logs and a server in Brazil for low latency to the API and your players. 6 min Read guide](https://streethosting.com.br/en/guides/discord-bots/discord-bot-hosting-24-7) [Discord bots Beginner How much does Discord bot hosting cost in Brazil? A modest bot starts under ten reais a month on a managed plan. A bot with music, shards and a Minecraft bridge needs more RAM and costs proportionally more. 3 min Read guide](https://streethosting.com.br/en/guides/discord-bots/discord-bot-hosting-cost) [Discord bots Intermediate Deploy a Discord bot with Node.js and PM2: env vars and auto restart PM2 is a popular Node process manager for Discord bots because it restarts after a crash, survives reboots when paired with the startup hook and centralizes basic logs without standing up a whole Kubernetes cluster. This guide covers the ecosystem file, env vars for the token and how it fits hosting in Brazil. 4 min Read guide](https://streethosting.com.br/en/guides/discord-bots/deploy-discord-bot-pm2)

[← Back to the Guide Center](https://streethosting.com.br/en/guides)
