PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.
- download and install java here
Note: Java v11 or newer is required to run the Lavalink.jar. Java v13 is recommended. If you are using sdkman then its a manager, not Java, you have to install sdkman and use sdkman to install Java
Warning: Java v14 has issues with Lavalink.
- download or gitclone
git clone https://github.com/brblacky/lavalink-server.git
-
go into the folder with
lavalink-server
-
edit
application.yml
Password and port -
run for: double click on
start.sh
pm2
- install node.js
- install pm2
npm i pm2
- run
pm2 start java -- -jar Lavalink.jar
- download curl
sudo apt install -y curl
Note: Java v11 or newer is required to run the Lavalink.jar. Java v13 is recommended. If you are using sdkman then its a manager, not Java, you have to install sdkman and use sdkman to install Java
Warning: Java v14 has issues with Lavalink.
- download or gitclone
git clone https://github.com/brblacky/lavalink-server.git
-
cd
lavalink-server
-
Run lavalink and install java
chmod +x start.sh
To run your script : ./start.sh
Another option is as follows to execute shell script: sh start.sh
OR bash start.sh
Or sudo bash start.sh
pm2
- install node.js
sudo apt update
sudo apt install nodejs
- install pm2
npm i pm2
- run
pm2 start java -- -jar Lavalink.jar
Connecting
- Lavalink's port will always 443 in replit
- Default password
youshallnotpass
- using custom lavalink client
Important notes
- To keep 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
lavalink-repl
and your repl username isahmasa
then make HTTP request tohttps://lavalink-repl.ahmasa.repl.co
- Do not forget to set your password (in
application.yml
file) - Connection to node must be secured E.g https/wss
example
"host": "lavalink.brblacky1.repl.co",
"password": "LAVA",
"port": 443,
"identifier": "lavalink 5",
"secure": true