How to make lavalink server

By Darren Nathanael on Fri, Dec 3, 2021 / Updated at Wed, May 29, 2024

What are we doing today

In this tutorial we will be setting up lavalink server! 🎉

The steps for v4 are the same, but remember that v4 introduces breaking changes. If you see errors like these:

Good to know: blog.darrennathanael.com/posts/lavalink-hotfix

Lavalink errors

GET / No mapping for GET /

then your bot is not compatible with v4 and you should use v3 instead. You can download v3 from this link: https://lore.dpaste.org/g/Lavalink-v3-403-retry.jar

If you see errors like these:

Lavalink library errors

Unexpected response: 404

then your library is also not compatible with v4 and you should use a library that supports v4. You can find a list of compatible libraries here: https://github.com/lavalink-devs/Lavalink#client-libraries

Your bot is not compatible with v4 and you should use v3 instead. You can download v3 from this link: https://lore.dpaste.org/g/Lavalink-v3-403-retry.jar


Let’s get started.

Now, first thing first

Setting up the enviroment

To make a lavalink server, you will need a java 13 or greater, I recommend using Azul Zulu java 16 or 17.

You can download & setup java by going to here:

If you want to host lavalink on replit. you can just visit this url https://repl.it/github/DarrenOfficial/lavalink-replit

Once install you can verify it by doing java -version, the output should look something like this

1openjdk version "16.0.2" 2021-07-20
2OpenJDK Runtime Environment Zulu16.32+15-CA (build 16.0.2+7)
3OpenJDK 64-Bit Server VM Zulu16.32+15-CA (build 16.0.2+7, mixed mode, sharing)

depending on your os, you may need to restart to for it to apply.

Congratulations 🥳 you’ve got Java installed!


Setting up lavalink.jar

To get started, you need to download the lavalink.jar and application.yml It’s pretty simple!

I would recommend getting the stable version, not the pre-release.

application.yml download

Once you’ve downloaded the jar and application.yml file, you can simply edit the application.yml port and password to your preferences.

Now last step is to move both into a single folder, then open a terminal to that folder using cd

How to use cd in windows

How to use cd in mac

If your on linux go figure out yourself nerd.

Then run it by doing java -jar Lavalink.jar or if you wanna limit it to only using X amount of ram you can do java -XmxXG -jar Lavalink.jar I.e. java -Xmx2G -jar Lavalink.jar

and you should get an output similar to this:

 1[root@darren-aws-testsrv lavalink]# java -Xmx2G -jar Lavalink.jar
 22021-12-03 04:22:25.402  INFO 1826146 --- [           main] lavalink.server.Launcher                 :
 3
 4       .   _                  _ _       _    __ _ _
 5      /\\ | | __ ___   ____ _| (_)_ __ | | __\ \ \ \
 6     ( ( )| |/ _` \ \ / / _` | | | '_ \| |/ / \ \ \ \
 7      \\/ | | (_| |\ V / (_| | | | | | |   <   ) ) ) )
 8       '  |_|\__,_| \_/ \__,_|_|_|_| |_|_|\_\ / / / /
 9    =========================================/_/_/_/
10
11        Version:        3.3.2.3
12        Build:          1239
13        Build time:     31.08.2021 17:26:20 UTC
14        Branch          main
15        Commit:         2ad6b46
16        Commit time:    31.08.2021 17:17:13 UTC
17        JVM:            17.0.1
18        Lavaplayer      1.3.93-original

“Help, I’ve tried the steps above but It doesn’t work.” If you’ve followed this entire guide and It doesn’t work, then please contact me on my discord server discord.darrennathanael.com and I’ll help you out. and also provide the following information:

  • Which distro you are on
  • What java version are you using
  • (Optional)What hosting provider you are using
  • Don’t say “doesn’t work”. Describe your problem in details

Thank you for reading, have a great day!

Last update 10/30/2023