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.
What a 24/7 Lavalink server needs
| Need | On your own Linux server | On a PlayNHost Lavalink plan |
|---|---|---|
| Java | Install Java 17 or newer yourself. | Java 21, installed. |
| Lavalink | Download Lavalink.jar from the GitHub release page. | 4.2.2, downloaded at install and checked against a fixed checksum. |
| Password | Change youshallnotpass in the example file. | Made for your node at install. |
| A port bots can reach | Open it in your firewall. | Your server's own address and port, shown on Overview. |
| Restart after a crash or reboot | A 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. |
| YouTube | Add 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.
- Install Java 17 or newer and check it with
java -version. - Make a folder, for example
/home/lavalink/lavalink, and putLavalink.jarin it, downloaded from the newest release on Lavalink's GitHub. On 6 November 2026 that is 4.2.2. - 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
- Start it once by hand with
java -jar Lavalink.jarand wait forLavalink is ready to accept connections. - To keep it running, make it a systemd service. Lavalink's documentation gives this unit; save it as
/usr/lib/systemd/system/lavalink.servicewith 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
- Run
sudo systemctl daemon-reload,sudo systemctl enable lavalinkandsudo systemctl start lavalink.sudo journalctl -u lavalinkshows its log. - Set
-Xmxto fit the machine:-Xmx4Glets 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
pluginsfolder asyoutube-plugin-1.18.2-playnhost1.jar. - An
application.ymlwith a password made just for your node, and these sources switched on: Bandcamp, Twitch, Vimeo, Niconico and directhttplinks. 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
- Open your server in the panel. Overview shows the Lavalink card with Node name, Address and Password.
- Next to Address, press the copy icon. It copies
host:port. - Password says In application.yml. Press Open application.yml. Under
lavalink:andserver:, copy the value ofpassword:without the quotes.

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
- Open Console (or press Logs on the card) and press Start.
- Lavalink is ready when the console shows:
Lavalink is ready to accept connections.
- 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. The2333written 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.
- Open the Settings tab and click Launch Details.
- On the Reinstall card ("Downloads Lavalink and its plugins again at the versions PlayNHost has tested. Your application.yml stays."), press Reinstall.
- Confirm in Reinstall this server? by pressing Reinstall. The node stops while the install runs.
- When it is done, press Start on Console.

Plugins you uploaded yourself stay in the plugins folder. The install replaces only the YouTube plugin file it ships.
How much memory a Lavalink node uses
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:
| Plan | CPU | Java heap can grow to | Memory at rest | Ready after start |
|---|---|---|---|---|
| 1 GB | 1 core | 884 MiB | 234 to 247 MiB | 11 to 13 seconds |
| 2 GB | 1.5 cores | 1,690 MiB | 234 to 246 MiB | 8 to 9 seconds |
| 4 GB | 2 cores | 3,226 MiB | 216 to 274 MiB | about 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.
Do you need your own Lavalink node?
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.
| Question | Free public node | Your own VPS | A 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 cost | Free. | 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
- Connect your bot: How to connect your Discord bot to Lavalink.
- Play YouTube: How to play YouTube on Lavalink 4.
- Add sources and features: How to add plugins to Lavalink.
- Something fails: Lavalink errors and what they mean.



