Lavalink Setup

Deploy a Lavalink audio node on Witchly.host for your Discord music bot. Step-by-step setup, configuration, and connecting your bot.

Lavalink Setup

Lavalink is a standalone audio-sending node built on Lavaplayer and Koe. Instead of running audio processing inside your Discord bot, Lavalink handles it in a dedicated process — your bot stays responsive, audio quality improves, and you can share one Lavalink node across multiple bots.

  • You’re building a Discord music bot and want production-quality audio.
  • Your current bot’s audio has lag, skips, or eats all its memory.
  • You run multiple bots that need audio — one Lavalink can serve them all.

Deploying

  1. Open dash.witchly.hostDeployApplicationsLavalink.
  2. Pick a tier. For most use cases The Helper (1 GB RAM) is fine; heavy usage benefits from The Daemon (2 GB).
  3. Click Deploy.

The egg pulls the latest Lavalink JAR from lavalink-devs/Lavalink releases on install.

Configuration

Lavalink is configured via application.yml in your server’s root directory. A default config is created on install. Open it via the File Manager in the dashboard or SFTP.

Key settings to review:

server:
  port: 2333   # Use the port Witchly assigned your server
  address: 0.0.0.0

lavalink:
  server:
    password: "your-secure-password-here"
    sources:
      youtube: true
      soundcloud: true

Important: Change the default password. Your bot will use it to authenticate when connecting.

The server port Witchly assigned your server is shown on the server’s Overview tab — use that everywhere Lavalink docs say “port 2333”.

Connecting your bot

In your bot’s code (Discord.js, discord.py, JDA, etc.), point your Lavalink client at:

  • Host: Your server’s allocated IP and port (visible on the Overview tab)
  • Password: The one you set in application.yml

Example for erela.js:

new Manager({
  nodes: [{
    host: "your-server-ip.witchly.host",
    port: 12345,          // your Lavalink port
    password: "your-password",
  }],
  // ...
})

The Version variable on the Startup tab controls which release to pull. Set it to latest to always grab the newest, or pin a specific version like 4.0.8. Reinstall the server to apply a version change.

Troubleshooting

  • Bot can’t connect — verify you’re using the correct port (from the Overview tab, not 2333), and that the password matches application.yml.
  • Out of memory — Lavalink with YouTube plugins can use 1 GB+ under load. Upgrade to The Daemon if you see OOM errors.
  • YouTube playback broken — Google changes the YouTube API often; pin a recent Lavalink version that includes the fix, or install the youtube-source plugin.

Next steps