Discord Player
Remedia runtime

Remote playback

Run Remedia on another machine and connect your bot to it.

You are reading the v8 docsDev

A remote node is the same engine running in remedia-server. Your bot still owns the Discord gateway connection and source plugins. The server processes audio and sends it to Discord voice using bundled FFmpeg 9. A remote-only bot does not need @remedia/node.

Connect the bot

import { Player } from 'discord-player';

const player = new Player({
  nodes: [
    {
      id: 'audio-1',
      type: 'remote',
      url: 'remedias://audio.example.com',
      auth: { username: 'bot', password: process.env.REMEDIA_PASSWORD! },
    },
  ],
  send,
});

await player.initialize(botUserId);
URL schemeConnects with
remedia://WebSocket
remedias://Secure WebSocket
ws://, wss://Also accepted

When the URL has no path, /v1/ws is used. The server listens on 127.0.0.1:8787 by default.

Run the server

Install the Remedia server on the audio machine, following the server installation guide.

remedia-server --generate-config-file
remedia-server doctor --config ./remedia.config.json --env-file .env
remedia-server serve --config ./remedia.config.json --env-file .env
CommandPurpose
--generate-config-fileWrites a starter remedia.config.json without overwriting an existing file
doctorReports bundled runtime diagnostics and checks configuration
serveStarts the server
--listShows Remedia servers running on this machine for the current user

The generated configuration denies all media URLs and files until you allow them. Put the password in .env and reference it from the configuration. --env-file requires the file to exist, and --optional-env-file does not.

Official server releases statically link FFmpeg 9. No separate FFmpeg installation or library-path configuration is needed. Install the complete release, including its CLI and runtime executables, and keep them together when deploying or upgrading.

For configuration and deployment details, see the Remedia configuration reference and deployment guide.

Protect the server

Put TLS in front of a server that is reachable over a network, restrict which media sources it may open, and never expose it without authentication.

What a remote node can play

SourceWorks
A URL the server can reach and its policy allowsYes
A file path that exists on the server and is allowedYes
A track from a remote source hostYes. Audio flows from the host to the server
A local Readable, a buffer, or a file only on the botNo

Source plugins on the bot should return a URL the server can open. See media sources.

Join timeouts

A voice join has its own deadlines, separate from normal requests:

await queue.connect({ channelId, connectTimeoutMs: 120_000 });

Do not serialize guild joins to avoid timeouts. Each guild has an independent session. Read voice recovery before you change timeouts.

Reconnects and affinity

A guild stays on the node it was assigned to. When the connection drops, the client reconnects and tries to resume its sessions. A lost session is not a finished track, so watch the sessionLost and sessionResumed events and recover on purpose.

The Remedia client has explicit session migration, but Discord Player does not automatically move guilds for load shedding. A move can reconnect voice and reopen supported sources; it is not gapless. Operation sources retain host and node affinity and cannot be migrated to another node. Do not use raw client migration to bypass the queue's placement rules.

Crossfade

The server must have crossfade enabled and must report capabilities.crossfade.available. If it does not, the guild plays without crossfade and the Player emits a debug message. An explicit adaptive request also requires capabilities.crossfade.curves to include it, and rejects if unsupported. See crossfade.

On this page