Update: our game, bot and database hosting plans are closed for now. A VPS is the better way to run them.
The workloads in this guide run great on an Altivora Cloud VPS. You get full root access, so you can host any game server, Discord bot, Lavalink node or database yourself, with fast NVMe storage, DDoS protection, instant setup and no per-slot limits. Choose the location closest to your players: India, Singapore, USA, Germany or Canada. Pay in INR with UPI or by card.
See VPS PlansHow to Connect Lavalink 4 to Discord.js v14 & Discord.py (Complete 2026 Tutorial)
Connecting your Discord bot to an external Lavalink 4 audio node separates CPU-heavy audio transcoding from your bot's core gateway event loop.
1. Connecting with Discord.js (v14) using Kazaguruma:
import { Client, GatewayIntentBits } from "discord.js";
import { Kazaguruma, Plugins } from "kazaguruma";
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
],
});
const Nodes = [
{
name: "Altivora-Node-India",
url: "node-in.altivorahosting.com:2333",
auth: "your_lavalink_password",
secure: false,
},
];
export const manager = new Kazaguruma(
{
plugins: [new Plugins.PlayerMoved(client)],
source: ["youtube", "soundcloud", "spotify"],
},
Nodes,
{
send: (guildId, payload) => {
const guild = client.guilds.cache.get(guildId);
if (guild) guild.shard.send(payload);
},
}
);
client.on("ready", () => {
console.log(`Bot is ready as ${client.user.tag}`);
});
client.login(process.env.DISCORD_TOKEN);
2. Connecting with Python (discord.py) using Wavelink:
import discord
from discord.ext import commands
import wavelink
class MusicBot(commands.Bot):
def __init__(self):
intents = discord.Intents.default()
intents.message_content = True
super().__init__(command_prefix="!", intents=intents)
async def setup_hook(self):
node: wavelink.Node = wavelink.Node(
uri="http://node-in.altivorahosting.com:2333",
password="your_lavalink_password"
)
await wavelink.Pool.connect(client=self, nodes=[node])
bot = MusicBot()
@bot.event
async def on_wavelink_node_ready(payload: wavelink.NodeReadyEventPayload):
print(f"Lavalink Node connected: {payload.node.identifier}")
bot.run("YOUR_DISCORD_BOT_TOKEN")
Deploy Dedicated NVMe Cloud VPS
Deploy high-IOPS Gen4 NVMe compute across USA, Germany (Frankfurt), India (Mumbai & Noida), and Singapore. Instant setup & enterprise DDoS protection.
Related Technical Guides
How to Host JMusicBot & Lavalink 4 for Crystal Clear Discord Audio
Complete setup guide for self-hosting JMusicBot and connecting it to a dedicated Lavalink 4 audio server with high player capacity.
How to Build and Deploy a 24/7 Telegram Bot with Python and Systemd
Step-by-step guide to writing a high-throughput Telegram bot using Aiogram / python-telegram-bot and managing it as a background service on Linux.
Ready to upgrade your infrastructure?
Experience the Altivora difference with a 99.9% uptime SLA and 60-second setup.