Remote playback
Run Remedia on another machine and connect your bot to it.
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 scheme | Connects 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| Command | Purpose |
|---|---|
--generate-config-file | Writes a starter remedia.config.json without overwriting an existing file |
doctor | Reports bundled runtime diagnostics and checks configuration |
serve | Starts the server |
--list | Shows 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
| Source | Works |
|---|---|
| A URL the server can reach and its policy allows | Yes |
| A file path that exists on the server and is allowed | Yes |
| A track from a remote source host | Yes. Audio flows from the host to the server |
A local Readable, a buffer, or a file only on the bot | No |
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.
Continue reading
Node capacity and selection