Local Development
Run the rdio app, API, database, and radio services on your machine.
Local development uses two layers:
- the TypeScript apps, run by pnpm
- local infrastructure, run by Docker Compose
The web admin, API, Postgres, Icecast, and Liquidsoap can all run from the repository root.
Prerequisites
Install these before starting:
- Node.js 22 or newer
- pnpm
- Docker
- Cloudflare R2 credentials (required for media uploads)
Environment files
Copy the example app environment files:
cp apps/api/.env.example apps/api/.env
cp apps/web/.env.example apps/web/.envEdit apps/api/.env and add your R2 credentials. See Cloudflare R2.
If you need to override Docker Compose defaults, also create the root environment file:
cp .env.example .envInstall dependencies
Install workspace packages from the repository root:
pnpm installStart infrastructure
Start Postgres, Icecast, and Liquidsoap:
docker compose upDocker Compose exposes the database, live source input, and Icecast listener ports locally. Keep this process running while you work on the app.
Prepare the database
Apply migrations before opening the app:
pnpm db:migrateStart the apps
Run the API and web admin in watch mode:
pnpm devYou can also run one app at a time:
pnpm api:dev
pnpm web:devThe worker package exists but is currently a stub. You do not need it for normal development.
Documentation site
Run the docs app separately:
pnpm docs:devOpen http://localhost:3000 for the documentation site.
Open rdio
Default local endpoints:
| Service | URL |
|---|---|
| Web admin | http://localhost:5173 |
| API | http://localhost:3001 |
| Docs | http://localhost:3000 |
| Postgres | postgres://rdio:rdio@localhost:5432/rdio |
| Icecast admin | http://localhost:8002/admin |
| Stream proxy | http://localhost:3001/live.mp3 |
| Liquidsoap live input | localhost:8005 |
Docker Compose maps Icecast container port 8000 to host port 8002. The API connects to Icecast on port 8000 inside the Docker network via ICECAST_PORT=8000 in apps/api/.env.
The first browser to complete setup creates the station administrator. See First-time setup.
Local stream check
Once the API and radio services are running, open the stream proxy:
http://localhost:3001/live.mp3If nothing is scheduled, Liquidsoap should use the fallback audio from media/fallback/v1-tone.mp3.
Local BUTT test
To test live broadcast locally, connect BUTT to localhost:8005 with user source, password from ICECAST_SOURCE_PASSWORD, and mount broadcast.mp3. Schedule a live broadcast slot first. See Live broadcast.