NEW 📢 Limited launch offer: up to 70% off your first month on every game!See plans

How to host a Lavalink server 24/7

Lavalink hostingUpdated Nov 6, 202610 min read

To keep a Lavalink server online 24/7 you need four things: a machine that never sleeps, Java 17 or newer, Lavalink.jar from Lavalink's GitHub releases with an application.yml that sets your own password, and something that starts Lavalink again after a crash or a reboot. Your bot then connects with the server's address, port and password. For YouTube you also need the YouTube plugin, signed in with a spare Google account; its current release needs more than that, see How to play YouTube on Lavalink 4. A PlayNHost Lavalink plan has all of that installed: Lavalink 4.2.2, the YouTube plugin and a password made for your node. In our test on the 1 GB plan it was ready 11 to 13 seconds after start and used about 240 MiB of memory at rest.

NeedOn your own Linux serverOn a PlayNHost Lavalink plan
JavaInstall Java 17 or newer yourself.Java 21, installed.
LavalinkDownload Lavalink.jar from the GitHub release page.4.2.2, downloaded at install and checked against a fixed checksum.
PasswordChange youshallnotpass in the example file.Made for your node at install.
A port bots can reachOpen it in your firewall.Your server's own address and port, shown on Overview.
Restart after a crash or rebootA systemd service (below) or Docker.The panel starts it again after a crash. If it crashes again within a minute it stays stopped and the console shows why.
YouTubeAdd the YouTube plugin and sign it in.The plugin is installed; you sign it in once.

Run it on your own Linux server

These are the steps from Lavalink's own documentation.

  1. Install Java 17 or newer and check it with java -version.
  2. Make a folder, for example /home/lavalink/lavalink, and put Lavalink.jar in it, downloaded from the newest release on Lavalink's GitHub. On 6 November 2026 that is 4.2.2.
  3. Next to it, create application.yml. The smallest useful one sets the port, the address and a password of your own, and switches off the old built-in YouTube source, which Lavalink no longer updates:
server:
  port: 2333
  address: 0.0.0.0
lavalink:
  server:
    password: "change-this-to-a-long-random-password"
    sources:
      youtube: false
      soundcloud: true
      http: true
  1. Start it once by hand with java -jar Lavalink.jar and wait for Lavalink is ready to accept connections.
  2. To keep it running, make it a systemd service. Lavalink's documentation gives this unit; save it as /usr/lib/systemd/system/lavalink.service with your own user and folder:
[Unit]
Description=Lavalink Service
After=syslog.target network.target

[Service]
User=lavalink
Group=lavalink
WorkingDirectory=/home/lavalink/lavalink
ExecStart=java -Xmx4G -jar /home/lavalink/lavalink/Lavalink.jar
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target
  1. Run sudo systemctl daemon-reload, sudo systemctl enable lavalink and sudo systemctl start lavalink. sudo journalctl -u lavalink shows its log.
  2. Set -Xmx to fit the machine: -Xmx4G lets Java's heap grow to 4 GB, more than a small server has. Open the port in your firewall, then test it as in step 2 below.

From then on you update Java, Lavalink and its plugins yourself, and watch for crashes. YouTube needs the plugin: How to play YouTube on Lavalink 4.

On a PlayNHost plan: what the install sets up

  • Lavalink 4.2.2, downloaded from Lavalink's GitHub release and checked against a fixed checksum.
  • The YouTube source plugin, version 1.18.2 with PlayNHost fixes, in the plugins folder as youtube-plugin-1.18.2-playnhost1.jar.
  • An application.yml with a password made just for your node, and these sources switched on: Bandcamp, Twitch, Vimeo, Niconico and direct http links. Lavalink's own SoundCloud and YouTube sources are off; YouTube goes through the plugin. All audio filters (equalizer, timescale, karaoke and the rest) are on.

A later reinstall keeps your application.yml and prints Kept your application.yml.

1. Find the address and password

  1. Open your server in the panel. Overview shows the Lavalink card with Node name, Address and Password.
  2. Next to Address, press the copy icon. It copies host:port.
  3. Password says In application.yml. Press Open application.yml. Under lavalink: and server:, copy the value of password: without the quotes.

The Lavalink card on Overview showing Node name, Address with its copy icon, Password In application.yml, and the Open application.yml and Logs buttons.

Treat the password like a key: anyone with the address and the password can use your node. To change it, edit password: in the same file, save, restart the node, and update your bot.

2. Start it and check it

  1. Open Console (or press Logs on the card) and press Start.
  2. Lavalink is ready when the console shows:
Lavalink is ready to accept connections.
  1. To test from your own computer, ask the node for its version with your password:
curl -H "Authorization: YOUR_PASSWORD" http://HOST:PORT/version

It answers 4.2.2 when it works. 403 means the password is wrong, 401 that the Authorization header is missing; no answer at all means the address is wrong or the node is stopped.

Then connect your bot: How to connect your Discord bot to Lavalink. The node uses plain http and ws, so leave the secure or SSL option off in your client. Your client must be a release that supports Discord's DAVE voice encryption; the connection guide lists the versions.

3. Sign in YouTube once

On the first start the console asks you to sign the YouTube plugin in to a Google account, with a line like:

OAUTH INTEGRATION: To give youtube-source access to your account, go to https://www.google.com/device and enter code XXXX-XXXX

Use a spare Google account made for this, never your own: the plugin's authors warn that the account can be terminated. In our test on 6 November 2026 (a 15-second start test per song, without a voice channel), the node could start none of 12 YouTube songs before the sign-in, and started every one of the 10 tests that completed after it without an error. Whether YouTube serves a given song to a server is YouTube's decision, and we cannot promise it. The steps, and how to keep the sign-in after a restart: How to play YouTube on Lavalink 4.

What the panel rewrites at every start

Two values in application.yml are set by the panel each time the node starts. Changes to them are put back:

  • server.port: your server's port, the only one open to the internet. The 2333 written at install is replaced.
  • plugins.youtube.remoteCipher.url: a PlayNHost service the YouTube plugin uses, reachable only from our servers.

Version

The Settings tab, Game Settings, has a Version field set to 4.2.2, the version we test and support. On 6 November 2026 it is also Lavalink's newest release. Other versions are downloaded without a checksum and are not supported. The value is read only while the server installs, so it applies when you reinstall.

Reinstall

A reinstall downloads Lavalink and its plugins again, which also repairs a damaged or deleted Lavalink.jar or plugin file. Your application.yml, with its password and your changes, stays.

  1. Open the Settings tab and click Launch Details.
  2. On the Reinstall card ("Downloads Lavalink and its plugins again at the versions PlayNHost has tested. Your application.yml stays."), press Reinstall.
  3. Confirm in Reinstall this server? by pressing Reinstall. The node stops while the install runs.
  4. When it is done, press Start on Console.

The Lavalink server's Settings tab, Launch Details, with the Reinstall card above the start command.

Plugins you uploaded yourself stay in the plugins folder. The install replaces only the YouTube plugin file it ships.

Lavalink's Java heap on our plans is capped at three quarters of the server's memory limit. We started the installed node three or four times on each plan size on 6 November 2026, with the same memory and CPU limits, image and start command the panel uses, on one of our busy production nodes, and read its memory 60 seconds after it was ready, with no bot connected:

PlanCPUJava heap can grow toMemory at restReady after start
1 GB1 core884 MiB234 to 247 MiB11 to 13 seconds
2 GB1.5 cores1,690 MiB234 to 246 MiB8 to 9 seconds
4 GB2 cores3,226 MiB216 to 274 MiBabout 6 seconds

An idle node used about the same memory on every plan, roughly a quarter of the 1 GB plan. The bigger plans give the heap room to grow and, with more CPU, started faster in our test. Each player that streams adds to that. We have not yet measured how many players each plan serves, so we give no number for it. Watch the Usage card on Overview after a day of real use: How to read your server's usage graphs.

A free public node is fine for testing or a tiny private bot. A bot people rely on is better on a node you control, because you choose its plugins, sources and password.

QuestionFree public nodeYour own VPSA PlayNHost Lavalink plan
Who sets plugins and sources?The node's owner.You.You, in application.yml and the plugins folder under Files.
Who knows the password?Everyone who reads the public list.You, once you change the example password.You. It is made for your node at install.
What if it stops?You wait for its owner.You fix it.The panel starts it again after a crash; if it crashes again within a minute it stays stopped and the console shows why.
What do you maintain?Nothing, and you can change nothing.The operating system, firewall, Java, Lavalink and plugins.application.yml and your plugins. The machine, Java and the panel are ours.
Monthly costFree.Your VPS bill.From US$3.49 (1 GB RAM), US$5.99 (2 GB) or US$10.99 (4 GB), regular monthly prices on 6 Nov 2026.

Before you rely on a public node, check that its Lavalink major version matches your client: a client for version 3 does not work with a version 4 node. Moving to your own node later means changing three values in your bot: host, port and password. Plans: Lavalink hosting.

Next

Already hosting your bot somewhere else? Move it to us

OUR LATEST BLOGS