A powerful Node.js script that connects to your Navidrome instance and updates your Discord Rich Presence with your currently playing song.
Created by Star123451.
- Real-Time Updates: Automatically fetches your currently playing track from Navidrome and displays it on your Discord profile.
- Dynamic "Listening to" Status: By default, Discord locks your application name. However, this script is designed to bypass this and dynamically display "Listening to ARTIST" on your profile instead of a static application name.
- Dynamic Album Art: If your Navidrome instance is publicly accessible, it will automatically pull the album art of the currently playing song and display it in Discord.
- Status Auto-Clearing: Automatically clears your status when you stop playing music.
- Node.js: Ensure you have Node.js installed on your system.
- Discord Client: Either stock or modded.
- NOTE: While this script connects via standard Discord IPC, to get the dynamic "Listening to ARTIST" feature to work, you must use a Discord client that utilizes arRPC as its Rich Presence bridge (such as Vencord/Equicord, and their desktop versions, with the WebRichPresence/arRPC plugin running). Standard Discord actively ignores custom name overrides.
- Clone or download this project to a directory (e.g.,
/opt/navidrome-discord-rpc). - Open a terminal in that directory and run:
npm install
- Create a
.envfile in the root directory and add the following:NAVIDROME_URL=http(s)://[IP_ADDRESS] # (basically where you access Navidrome on your local network) NAVIDROME_PUBLIC_URL=https://your-navidrome-instance.com # (what you use to access navidrome from outside your network. If you have no public url, then you can just set this to your NAVIDROME_URL) NAVIDROME_USER=your_username NAVIDROME_PASS=your_password DISCORD_CLIENT_ID=1470554657506984069 # This is my Navidrome Application ID. It should work fine for everyone but If you want to make your own, be my guest. SHOW_SMALL_IMAGE=false # (set to true if you want a Navidrome Icon to show to the bottom right of the album art. This icon can be changed if you provide your own custom Client ID.
- Run the script:
node index.js
To run this in the background continuously on Linux, set it up as a systemd service.
-
Create a new service file:
sudo nano /etc/systemd/system/navidrome-rpc.service
-
Paste the following configuration (Adjust the
User,WorkingDirectory, andExecStartpaths to match your system. The User should ideally be the user running your desktop environment/Discord client):[Unit] Description=Navidrome Discord Rich Presence After=network.target [Service] Type=simple User=YOUR_LINUX_USERNAME WorkingDirectory=/path/to/navidrome-discord-rpc ExecStart=/usr/bin/node /path/to/navidrome-discord-rpc/index.js Environment="NODE_ENV=production" Restart=on-failure RestartSec=10 [Install] WantedBy=default.target
-
Reload systemd:
sudo systemctl daemon-reload
-
Enable it to start on boot:
sudo systemctl enable navidrome-rpc -
Start the service:
sudo systemctl start navidrome-rpc
-
Check the status:
sudo systemctl status navidrome-rpc
I may provide a Windows guide in the future.
If you cloned this via git, it is a very simple process:
- Open a terminal in your project directory (
/path/to/navidrome-discord-rpc). - Pull the latest changes from the repository:
git pull
- Update any dependencies (just in case new ones were added):
npm install
- Restart your script or systemd service to apply the updates:
# If running manually: # Stop it with Ctrl+C and run `node index.js` again # If using systemd: sudo systemctl restart navidrome-rpc
NOTE: Please git pull daily to get the latest updates.
This script is heavily inspired by and builds upon the foundation of the original Navidrome Discord Rich Presence Plugin. A huge thanks to the original creators and contributors for their amazing work!