Skip to content

Star123451/NavidromeRPC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Navidrome Discord RPC

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.

Features

  • 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.

Prerequisites

  1. Node.js: Ensure you have Node.js installed on your system.
  2. 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.

Setup

  1. Clone or download this project to a directory (e.g., /opt/navidrome-discord-rpc).
  2. Open a terminal in that directory and run:
    npm install
  3. Create a .env file 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.
  4. Run the script:
    node index.js

Running in the Background (systemd Daemon)

To run this in the background continuously on Linux, set it up as a systemd service.

  1. Create a new service file:

    sudo nano /etc/systemd/system/navidrome-rpc.service
  2. Paste the following configuration (Adjust the User, WorkingDirectory, and ExecStart paths 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
  3. Reload systemd:

    sudo systemctl daemon-reload
  4. Enable it to start on boot:

    sudo systemctl enable navidrome-rpc
  5. Start the service:

    sudo systemctl start navidrome-rpc
  6. Check the status:

    sudo systemctl status navidrome-rpc

I may provide a Windows guide in the future.

Updating

If you cloned this via git, it is a very simple process:

  1. Open a terminal in your project directory (/path/to/navidrome-discord-rpc).
  2. Pull the latest changes from the repository:
    git pull
  3. Update any dependencies (just in case new ones were added):
    npm install
  4. 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.

Credits

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!

About

Node.js script allowing for the rich presense of the music you listen to on your Navidrome server.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors