Skip to content

nugget/roon-community-dj

Repository files navigation

Roon Community DJ

Version npm Dependency Status devDependency Status

What is this?

RCDJ is an extension for the popular Roon music player. It allows Roon users to synchronize their music playback with other Roon users over the Internet. One user is designated as the DJ. Whatever tracks the DJ user plays on their system will be syncronized to all the subscriber users on their local Roon servers.

This extension does not sync any actual music files or data. All songs played must be independently available to all the participating users

This only works if the users have common local libraries or -- more likely -- subscribe to the same streaming services like Tidal or Qobuz. In practice, this works really well as long as everyone playing along has the same subscriptions.

Why is this?

This extension is an outgrowth of the unofficial Roon Discord chat server. Several users there were using a Discord music bot to host group listening sessions, but grew unhappy at the unavoidable loss in quality that compressed streaming via voice chat requires.

This extension was created to allow the chat users to share new music with each other and enjoy communal listening while at the same time maintaining the high-quality, lossless experience that Roon users expect.

Sounds great! How to I install it?

While this will eventually be available in the Roon Extension Manager, for now the only way to use the extension is to run it "by hand" on a system with a suitable node.js/npm setup.

You can also visit the related thread on the Roon community discussion forums

Assuming you have a working node and npm installed on your host, it's simply a matter of:

git clone https://github.com/nugget/roon-community-dj.git
cd roon-community-dj
npm install
node roon-community-dj.js

Once the extension is running, go to Settings / Extensions in your Roon app. Select your playback Zone, choose a channel name to join, and set your nickname.

Example Configuration Screen

Architecture and Configuration

Each Roon Core running this extension will connect to a central DJserver which coordinates the playback for all the participating users. There is a public DJserver available for all to use, but the server code is included in this repository and it's possible to run a private DJserver if you desire.

In the extension settings, each roon core subscribes to a "channel" as either a DJ or Listener. WHen the DJ for a channel plays a song, all the listener users in that channel will begin playback of that same song if they have it available. In the event that the song is not available, a listener will either be met with silence or with a random selection depending on if they have Roon Radio enabled for that zone. When the DJ's next song begins, playback will resume for the listener.

Currently any user in a channel can elect to become DJ and there is no protection to prevent this from happening. If a user changes themselves to the channel DJ, the current DJ will be demoted to a Listener. This is ripe for griefing and will be extended in the future. But for now that's how it works.

Each Roon core is assigned a random User ID that is used on the server to track individual roon cores. You can view your ID in the "Developer Settings" of the extension settings page. This number is unique to the Community DJ extension, it's not part of your Roon Core or your account with Roon Labs. If you clear this value in the settings page a new ID will be generated.

Privacy and Data Retention

No permanent logs are kept for any users, playback data, or configuration details. All coordination in the DJserver is transient and persists only for as long as a channel or connection is active. Data is only tracked or retained to the degree necessary to provide the features of the extension.

The source code to the DJserver is in this repo and you have my promise that the public server runs this code unmodified with no shenanigans.

The DJserver will necessarily have access to the following information:

  • The public IP address of your Roon Core
  • Playback activity taking place in the Roon Zone configured in the extension
  • Which streaming services you have configured within Roon (Qobuz or Tidal)
  • Your Roon configuration settings for this extension.
  • A unique User ID that is generated by the extension for your Roon Core.

The DJserver will absolutely not have access to:

  • Your Roon Labs account, credentials, or server licenses
  • Your streaming account credentials
  • Any playback taking place on any zones other than the one you've configured for the extension.
  • Your blood type, mother's maiden name, or the name of your first pet.