by IamTheRealSami



Lavalink on Heroku, in a nutshell


If you want to run this:

Easy Install

  • Click the button "Deploy to Heroku" above to install

The hard way

  • Create an application on Heroku
  • Add Java to buildpacks
  • Fork this repo and deploy it to Heroku

Important notes:

  • To run this 24/7, you need to make an account on UptimeRobot service, and make HTTP request to your app every 5 minutes. For example, if your app is named test-lavalink then make HTTP request to
  • Do not forget to edit config file (application.yml)
  • Do not forget to set your password (PASSWORD environment variable)


  • Uses latest release of Lavalink on (re)start
  • Free to use
  • Easy setup in 3 clicks


  • Lavalink's port will be always 80, DO NOT edit port in application.yml!
  • Password is in PASSWORD environment variable, if variable does not exist, it is youshallnotpass



async def initiate_nodes(self):
    nodes = {"MAIN": 
            "host": "",
            "port": 80,
            "rest_url": "",
            "password": "youshallnotpass",
            "identifier": "MAIN",
            "region": "europe"

    for n in nodes.values():
        # ...
async def initiate_nodes(self): = lavalink.Client(
    )  # Host, Port, Password, Region, Name
    # ...
const { PlayerManager } = require("discord.js-lavalink");

const nodes = [
    { host: "UR_URL_HEROKU_LINK", port: 80, password: "youshallnotpass" }

const manager = new PlayerManager(client, nodes, {
    user:, // Client id
    shards: shardCount // Total number of shards your bot is operating on


If you don't like default Heroku options for Java:

  • You can set custom Java flags in ADDITIONAL_JAVA_OPTIONS variable. They override default config. Do not do this if you don't know what you're doing