← Back to BJ82 Music Request

Connecting accounts

Plex, Emby, Jellyfin and YouTube, and letting other people sign in. Server connections go in the Settings section, which only administrators see.

1. Create the administrator account

The first account becomes the administrator. It can only be created on the computer running the app, so nobody else on your network can claim it.

  1. Right-click the tray icon → Configure admin account, or open /?create=1 on that computer.
  2. Choose a username and a password (at least 8 characters) → Create account.
  3. Sign in with it. The Settings, Users and System sections appear.
Save & restart signs everyone out. After saving Settings, reload the page and sign in again.

Headless server without a browser on the machine itself? Set ALLOW_REMOTE_SETUP=true in .env, create the account, then remove it.

2. Plex

  1. URL: your Plex server's address, e.g. http://localhost:32400 (same PC) or http://192.168.1.20:32400 (another PC).
  2. Token (X-Plex-Token): in Plex Web open any song, album or film → ⋯ → Get Info → View XML. The address of the page that opens ends in X-Plex-Token=…: copy the value after the =.
  3. Settings → Plex: paste both → Save & restart.

New downloads then trigger a Plex library scan, songs already in Plex count as duplicates, downloads go into the "Music Discovery" playlist, and Plex becomes a sign-in option (only for Plex accounts with access to your server).

3. Emby

  1. URL: e.g. http://localhost:8096.
  2. API key: Emby dashboard → Advanced → API Keys → New API Key, name it (e.g. "Music Request") and copy the key.
  3. Settings → Emby: paste both → Save & restart.

4. Jellyfin

  1. URL: e.g. http://localhost:8096.
  2. API key: Jellyfin dashboard → API Keys → +, name it and copy the key.
  3. Settings → Jellyfin: paste both → Save & restart.

5. YouTube (liked songs and playlists)

YouTube needs a free Google "OAuth client" that you create once. It lets the app read (never change) your likes and playlists.

5a. Create the Google OAuth client

  1. Open console.cloud.google.com and create a project (any name).
  2. APIs & Services → Library → search YouTube Data API v3 → Enable.
  3. Google Auth Platform (or OAuth consent screen) → Get started: app name and your email, audience External, then finish.
  4. Audience → Test users → Add users: add the Google account(s) you will connect.
  5. Clients → Create client → application type Web application. Under Authorized redirect URIs add exactly:
    http://localhost:8457/api/oauth/google/callback
    → Create.
  6. Copy the Client ID and Client secret.

5b. Add it to the app

  1. Settings → YouTube: paste the client ID and secret.
  2. Optional: Playlist names to sync (comma separated, exact names), Sync own uploads, Sync interval (minutes, default 60).
  3. Save & restart, reload the page and sign in again.

5c. Connect your YouTube account

  1. On the computer running the app, in the YouTube accounts section → Connect account.
  2. Pick your Google account. Google warns "Google hasn't verified this app": it's your own client, so choose Continue (or Advanced → Go to … (unsafe)).
  3. Allow View your YouTube account. Back in the app the account is listed; Sync downloads your liked songs and chosen playlists.

Use Connect another account for more Google accounts.

Weekly reconnect while "Testing": Google expires sign-ins for apps in Testing after 7 days. To stop that, open Audience → Publish app (it stays private to you).

From another device (phone, other PC) you need a public HTTPS address: set Settings → Public (e.g. https://music.example.com) and add https://music.example.com/api/oauth/google/callback to the client's redirect URIs. Google does not accept LAN addresses like http://192.168.1.20:8457.

Connecting YouTube while signed out also signs you in with that Google account. If no administrator exists yet, that account becomes the administrator (only on the computer running the app).

6. Let other people sign in

Once Plex, Emby or Jellyfin is connected, its users can sign in with their own media-server username and password. In the Users section an administrator can:

YouTube sign-ins aren't listed there; while an access list is saved, only listed people (and administrators) can sign in.

Troubleshooting

MessageFix
redirect_uri_mismatch (Google)The redirect URI in the Google client must match exactly, including http, localhost and the port.
Access blocked: … has not completed the Google verification processAdd your Google account under Audience → Test users.
YouTube asks to reconnect after a weekThe Google app is in Testing: publish it (see 5c).
this Plex account has no access to this serverSign in with a Plex account that owns, or is shared, the server set in Settings.
Downloads don't appear in Plex/Emby/JellyfinCheck the URL and token/key, and that the server's music library points at the app's library folder (LIBRARY_PATH).
the first administrator must be created on the computer running the appOpen http://localhost:8457/?create=1 on that computer (see step 1).