Running Lavalink on a Raspberry Pi Zero 2 W
In this post you'll get a tutorial on how to run Lavalink on a tiny Raspberry Pi Zero 2 W and learn the hitches along the way.

If you're here, you probably know what Lavalink is, but to quote the project readme:
A standalone audio sending node based on Lavaplayer and JDA-Audio. Allows for sending audio without it ever reaching any of your shards.
Or for what it means to me: How a Discord bot can have audio playing functionality - particularly YouTube.
Lavalink is written in Java and has many libraries in your favourite language to interact with it. In the .NET space, I personally like to use Victoria:
In this post we'll be looking at how to get Lavalink running on a Raspberry Pi Zero 2 W by:
- Installing Java
- Running Lavalink
Installing Java
Lavalink has issues with a couple of Java versions and as such I opted to install Java 16 which seems to work. Follow the post below for installation instructions:

Running Lavalink
Issue resolution a little lower.
We can grab Lavalink from the releases page on the GitHub repo. However, in order to run Lavalink you also need to put an application.yaml
file in the same directory as Lavalink.jar. Thankfully, there is a good default example hosted in the repo too.
From here head to where you put the two files mentioned just above and we can run the following command (might take a little to get going):
java -jar Lavalink.jar
Which should result in:

Lavalink Zero 2 W Problem Resolution
As hinted to earlier, for some reason the .jar file does not properly work specifically on the Zero 2 W. We can fix this by using a custom patched .jar:
This repo seems to take the Lavalink repository and create custom patched versions. I originally stumbled upon it with this GitHub issue comment:
Essentially using the custom patched .jar works just the same as the original. For my purposes I use the original when using Windows and the patched version when running on the Pi. Remember you'll need the application.yaml
still.
To Conclude
With this you can now successfully run Lavalink on your little Pi Zero 2 W (or Windows for development like I did). Happy coding!