Skip to content

Helpful commands and documentation to properly host Lavalink.

License

Notifications You must be signed in to change notification settings

AceAsin/Lavalink

Repository files navigation

Helpful commands and documentation to properly get Lavalink to run on Ubuntu 18/20 (LTS). It's also possible to run Lavalink with Ubuntu 16 (LTS) and Debian 9/10, but you might encounter a few issues. All zeros for the tunnel must be replaced with the appropriate addresses when setting up a route planner. These can either be the Server IPv4 Address, Client IPv4 Address, or Routed /48.

Information

   .   _                  _ _       _    __ _ _
  /\\ | | __ ___   ____ _| (_)_ __ | | __\ \ \ \
 ( ( )| |/ _` \ \ / / _` | | | '_ \| |/ / \ \ \ \
  \\/ | | (_| |\ V / (_| | | | | | |   <   ) ) ) )
   '  |_|\__,_| \_/ \__,_|_|_|_| |_|_|\_\ / / / /
=========================================/_/_/_/

Version:        8ac9b9576910aabff7a683195cb1cd904bb59ee8-SNAPSHOT
Build:          1337
Build time:     26.01.2022 11:01:52 UTC
Branch          dev
Commit:         8ac9b95
Commit time:    26.01.2022 10:58:41 UTC
JVM:            13
Lavaplayer      1.3.97-original

Setup

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
nvm i --lts
sudo apt update
sudo apt install openjdk-13-jre-headless
sudo apt install openjdk-13-jdk-headless
sudo apt upgrade
git clone https://github.com/AceAsin/Lavalink.git
npm i pm2 --g
npm run build
pm2 start Lavalink
pm2 stop Lavalink
pm2 delete Lavalink
pm2 log Lavalink
pm2 [list|ls|status]

Configure

sysctl -w net.ipv6.ip_nonlocal_bind = 1
echo 'net.ipv6.ip_nonlocal_bind = 1' >> /etc/sysctl.conf

Debian/Ubuntu

/etc/network/interfaces
auto he-ipv6
iface he-ipv6 inet6 v4tunnel
        address 0:0:0::2 # Routed /48
        netmask 64
        endpoint 0.0.0.0 # Server IPv4 Address
        local 0.0.0.0 # Client IPv4 Address
        ttl 255
        gateway 0:0:0::1 # Routed /48

Netplan (Linux)

/etc/netplan/99-he-tunnel.yaml
network:
  version: 2
  tunnels:
    he-ipv6:
      mode: sit
      remote: 0.0.0.0 # Server IPv4 Address
      local: 0.0.0.0 # Client IPv4 Address
      addresses:
        - '0:0:0::/48' # Routed /48
      gateway6: '0:0:0::1' # Routed /48

Route

ip -6 route replace local 0:0:0::/48 dev lo

Test

ping6 google.com
ip -6 route

Strategy

lavalink:
  server:
    # ...
    ratelimit:
      ipBlocks: ['0:0:0::/48'] # Routed /48
      strategy: "LoadBalance" # RotateOnBan | LoadBalance | NanoSwitch | RotatingNanoSwitch

About

Helpful commands and documentation to properly host Lavalink.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published