Skip to content

How to configure your Lavalink server on Linux, Windows and Replit

License

Notifications You must be signed in to change notification settings

infnibor/lavalink-server

 
 

Repository files navigation

Contributors Forks Stargazers Issues Support Server MIT License Run on Repl.it

Lavalink Server

Serveur Support · Report Bug & Request Feature

Where can I host Lavalink?

Windows

  1. Setup the server:
# Run Windows PowerShell as administrator
cd "C:\"
bitsadmin /transfer myDownloadJob /download /priority normal https://raw.githubusercontent.com/LucasB25/lavalink-server/main/LavalinkWindows/ServerSetup.ps1 C:\ServerSetup.ps1
& .\ServerSetup.ps1
  1. ⚠️ Restart Windows ⚠️

  2. Run ServerSetup.ps1 again:

# Run Windows PowerShell as administrator
cd "C:\"
& .\ServerSetup.ps1
  1. Setup Lavalink:
# Run Windows PowerShell as administrator
cd "C:\"
bitsadmin /transfer myDownloadJob /download /priority normal https://raw.githubusercontent.com/LucasB25/lavalink-server/main/LavalinkWindows/LavalinkSetup.ps1 C:\LavalinkSetup.ps1
& .\LavalinkSetup.ps1
  1. Config application.yml:
Edit: C:\LavalinkServer\application.yml
# EDIT
  - email: "your account mail" # Email of Google account
  - password: "your account password" # Password of Google account
  # If you want to use other sources (Spotify, AppleMusic, Deezer, YandexMusic & FloweryTTS), enable and configure them!
  1. How to start it 24/7:
cd "C:\LavalinkServer"
pm2 start --name Lavalink --max-memory-restart 4G java -- -jar Lavalink.jar

Linux

  1. Install sudo and wget:
sudo apt-get install -y sudo wget 
  1. Switch to root user and navigate to the home directory:
sudo su
cd ~
  1. Setup the server:
wget -O ServerSetup.sh https://raw.githubusercontent.com/LucasB25/lavalink-server/main/LavalinkLinux/ServerSetup.sh
chmod +rwx ServerSetup.sh
./ServerSetup.sh
  1. Switch to root user and navigate to the home directory:
sudo su
cd ~
  1. Setup Lavalink:
wget -O LavalinkSetup.sh https://raw.githubusercontent.com/LucasB25/lavalink-server/main/LavalinkLinux/LavalinkSetup.sh
chmod +rwx LavalinkSetup.sh
./LavalinkSetup.sh
  1. Config application.yml:
sudo nano /home/YOUR_USER_NAME/lavalink/application.yml
# EDIT
  - email: "your account mail" # Email of Google account
  - password: "your account password" # Password of Google account
  # If you want to use other sources (Spotify, AppleMusic, Deezer, YandexMusic & FloweryTTS), enable and configure them!
  1. Restart Lavalink:
sudo systemctl daemon-reload
sudo systemctl restart lavalink

Systemd Service Commands

  • Reload Systemd daemon:
sudo systemctl daemon-reload
  • Enable a service at boot:
sudo systemctl enable lavalink
  • Start a service:
sudo systemctl start lavalink
  • View service logs:
sudo journalctl -u lavalink
  • Check service status:
sudo systemctl status lavalink
  • Stop a service:
sudo systemctl stop lavalink
  • Restart a service:
sudo systemctl restart lavalink

Replit

Run on Replit

Connecting

  • Lavalink's port will always be 443 in Replit. application.yml

EDITE

server: # REST and WS server
  port: 443
  address: 0.0.0.0
  http2:
    enabled: false # Whether to enable HTTP/2 support
- email: "your account mail" # Email of Google account
- password: "your account password" # Password of Google account
# If you want to use other sources (Spotify, AppleMusic, Deezer, YandexMusic & FloweryTTS), enable and configure them!
  • 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 requests to your app every 5 minutes. For example, if your app is named - lavalink-repl and your Replit username is ahmasa, then make an HTTP request to https://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 Configuration

{
  "host": "lavalink.LucasB25.repl.co",
  "password": "youshallnotpass",
  "port": 443,
  "identifier": "lavalink v4",     
  "secure": true
}

👥 Contributors

Thanks goes to these wonderful people :

About

How to configure your Lavalink server on Linux, Windows and Replit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 53.2%
  • PowerShell 45.7%
  • Nix 1.1%