Skip to main content

Introduction

Lavalink is a standalone audio sending node for Discord bots. It allows you to stream high-quality music to Discord without consuming your bot’s resources.
1

Get Lavalink JAR

Download the latest Lavalink release from the official GitHub releases. Download the Lavalink.jar file.
2

Create Configuration File

Create an application.yml file with your Lavalink configuration.

Configuration File

Create an application.yml file:
application.yml
server:
  port: 80
  address: 0.0.0.0

lavalink:
  server:
    password: "your-secure-password-here"
    sources:
      youtube: true
      bandcamp: true
      soundcloud: true
      twitch: true
      vimeo: true
      http: true
      local: false
    bufferDurationMs: 400
    frameBufferDurationMs: 5000
    youtubePlaylistLoadLimit: 6
    playerUpdateInterval: 5
    youtubeSearchEnabled: true
    soundcloudSearchEnabled: true
    gc-warnings: true

logging:
  file:
    path: ./logs/
  level:
    root: INFO
    lavalink: INFO
Important: Set the port to 80 for Shard Cloud hosting.

Shard Cloud Configuration

Create a .shardcloud file:
.shardcloud
DISPLAY_NAME=Lavalink Server
DESCRIPTION=Lavalink Audio Server
MAIN=Lavalink.jar
MEMORY=1024
VERSION=recommended
SUBDOMAIN=my-lavalink
The SUBDOMAIN gives you a URL like my-lavalink.shardweb.app to connect your bot.

Deploying

1

Prepare Files

Create a folder with: - Lavalink.jar - application.yml - .shardcloud
2

Create ZIP Archive

Compress the folder into a .zip file.
3

Upload to Shard Cloud

Go to Shard Cloud Dashboard and upload your ZIP file.

Connecting Your Bot

When connecting to your Lavalink server from your Discord bot:
  • Host: my-lavalink.shardweb.app
  • Port: 443 (SSL/HTTPS)
  • Password: Your configured password
  • Secure: true

Example Connection (discord.js + Shoukaku)

const { Shoukaku, Connectors } = require("shoukaku");

const nodes = [
  {
    name: "main",
    url: "my-lavalink.shardweb.app:443",
    auth: "your-secure-password-here",
    secure: true,
  },
];

const shoukaku = new Shoukaku(new Connectors.DiscordJS(client), nodes);
import wavelink

node = wavelink.Node(
    uri='https://my-lavalink.shardweb.app:443',
    password='your-secure-password-here'
)
Always use port 443 and secure: true when connecting to your Lavalink on Shard Cloud.

Additional Resources

Troubleshooting

  • Verify the password matches - Use port 443 with secure/SSL enabled - Check that your Lavalink server is running
Increase the MEMORY value in your .shardcloud config (minimum 512MB recommended).
Check your application.yml to ensure the required sources are enabled.