Project
ActiveSUB/WAVE
Setting up SUB/WAVE, a self-hosted AI radio station, on top of my Navidrome library

In my Roon vs. the rest roundup I said I’d keep Navidrome running for one reason: SUB/WAVE. I didn’t want to get side-tracked in that note, so this is the side-track.
SUB/WAVE is a self-hosted internet radio station with an AI DJ. It sits on top of Navidrome, picks tracks from my own library, talks between them in a synthesised voice, and broadcasts one stream that everyone tunes in to. There’s no skip button and no queue to fiddle with. No need to spend time figuring out what you want to listen to. You just tune in.
That last part is the bit that won me over. Roon’s radio has never really worked for me. I can’t point it at my whole 25,000+ track catalogue and say “play me something”. SUB/WAVE does exactly that and adds a presenter, which is something I didn’t know I wanted.
How it works
Under the hood there are a handful of moving parts, all running in Docker on a single machine:
- Navidrome is the music source. SUB/WAVE talks to it over the Subsonic API, so it reads the same tags and artwork that Psysonic does.
- The controller is a Node.js service, the brains of the station. It decides what plays next, asks the language model for track picks and DJ links, and manages the queue.
- A language model writes the DJ’s words and chooses the music. The default is a local model through Ollama, but it can also use a hosted provider.
- Text-to-speech turns the script into a voice.
- Liquidsoap and Icecast (bundled together in a
broadcastcontainer) mix the music and voice with crossfades and ducking, then serve the stream. - A Next.js web UI gives you the player, the admin console and a landing page, fronted by a bundled Caddy reverse proxy.
The components hand work to each other through shared files rather than a message queue.
My choices
LLM: Claude, for a week
The homelab default is Ollama with a tool-capable model. To see SUB/WAVE at its best before committing to anything, I started with a hosted model instead and pointed it at Claude Haiku 4.5 through Anthropic’s API.
It worked really well, and hearing a DJ talk about my own music was genuinely fun. It isn’t free, though. I put $5 of credit on the account and it lasted about a week of testing. That’s cheap for an experiment, but it’s a running cost I didn’t want to fund for a radio station only I (and a few family members) listen to.
So I let the credit run out. Without an LLM, SUB/WAVE doesn’t fall over. It drops back to an auto-playlist built from the library, so the music keeps playing, but the DJ goes quiet and stops making picks. The Stats page makes that very clear: a column of failed LLM calls where the picks used to be.
The next step for this project is to run a local LLM for SUB/WAVE on my own hardware, which brings the running cost back to zero. I’ll write that up as a follow-on.
Voice: Piper
For the voice I kept things local from the start with Piper, the lightest of SUB/WAVE’s built-in engines. It runs comfortably on CPU inside the controller container and costs nothing per word. On the Stats page, a spoken segment takes about 1.5 seconds to render. Kokoro is the step up in quality while staying local, and ElevenLabs is there if you want a cloned voice, but Piper does the job.
So the split was: Claude wrote the script and Piper read it out on my own hardware.
Installation
SUB/WAVE runs on my homelab server, an HP EliteDesk Mini G3 running Proxmox. It’s the same Docker host as my Navidrome stack (the Tailscale + Navidrome + cloudflared compose I described in the Psysonic Orbit project). The music itself lives on the Roon server and is mounted over SMB.
The docs suggest about 2 GB of RAM for the core services, plus another 1 GB for the default track analyser. In practice it’s lighter than that. The admin Stats page shows all six containers using under 800 MB between them, with the broadcast container (the audio encoding) the busiest at around 14% CPU on a 4-core box.
![]()
The CLI makes setup painless:
curl -fsSL https://cli.getsubwave.com | sh
subwave setup
The installer drops the binary in place, then subwave setup walks through:
- Install directory: the default
~/subwaveis fine. - Deployment mode:
produses the bundled Caddy;prod-byois for bringing your own reverse proxy. - Admin credentials: these are for the admin console.
- Navidrome: the URL, username and password. I’m using my admin account for now, but a dedicated Navidrome user for the station would be tidier.
- LLM provider: Anthropic, plus the API key.
- TTS engine: Piper.
I chose prod, so the bundled Caddy is the station’s front door.
Surprisingly little ends up in ~/subwave/.env. Only three values are required to boot the stack:
ADMIN_USER=...
ADMIN_PASS=...
SITE_URL=https://subdomain.yourdomain.com # public address, for absolute URLs and playlist files
Everything else (Navidrome, the LLM, the voice, the first DJ persona) is collected by the setup wizard, either in the terminal or in the browser at /onboarding. It’s saved to state/settings.json, with API keys kept separately in state/secrets.env. The .env file has commented-out overrides for nearly everything, for anyone who prefers config-as-code to clicking through a UI.
The CLI also pins the image version in .env (SUBWAVE_VERSION=1.13.0 for me), and subwave update moves the pin forward, so the stack never silently drifts onto :latest.
After that, subwave status gives a snapshot of the stack, and subwave logs, restart and update cover day-to-day running.
What the stack looks like
The production compose file brings up six containers, with one more (heavy TTS) left off by default:
caddy: the public edge, and the only service bound to a host port (7700:80).broadcast: Icecast and Liquidsoap together. If either dies, the container restarts the pair.controller: the AI DJ. It reads.envplus the wizard’s settings from the sharedstate/folder. Piper runs here too, so I didn’t need the optionaltts-heavysidecar for Chatterbox and PocketTTS.web: the Next.js player and admin console.analyzer: works out BPM, key, intros and loudness for each track so the DJ can mix sensibly. It’s on by default with a 6 GB memory cap.docker-socket-proxy: a read-only window onto the Docker API, so the admin Stats page can show per-container usage without the controller touching the raw Docker socket.
Startup is health-gated. Caddy waits for the controller and broadcast containers to report healthy, so you don’t get 502s while the stack is still booting.
Reaching Navidrome
SUB/WAVE and Navidrome are separate compose projects, so the station can’t reach Navidrome by name. The SUB/WAVE compose maps host.docker.internal to the Docker host, and my Tailscale container publishes port 4533 on the host, so the server URL in the station’s Music Source settings is simply http://host.docker.internal:4533. The settings page warns against 127.0.0.1, which inside a container points at the container itself.
Making it public with the Cloudflare Tunnel
I already had a Cloudflare Tunnel running for Psysonic, so exposing the station meant adding one more hostname rather than building anything new.
docker run -it --rm -v ~/.cloudflared:/home/nonroot/.cloudflared \
cloudflare/cloudflared:latest tunnel route dns navidrome subdomain.yourdomain.com
The interesting part is how cloudflared reaches the station. In my Navidrome stack, Navidrome rides on the Tailscale container’s network stack (the sidecar pattern from the Psysonic post). cloudflared doesn’t. It sits on the Navidrome project’s default network and also joins SUB/WAVE’s network as an external one:
cloudflared:
image: cloudflare/cloudflared:latest
container_name: cloudflared
restart: unless-stopped
command: tunnel run
volumes:
- ~/.cloudflared:/home/nonroot/.cloudflared
networks:
- default # reaches Navidrome via the tailscale container
- subwave # reaches SUB/WAVE's Caddy
depends_on:
- navidrome
networks:
subwave:
external: true
name: subwave_default
Because cloudflared sits on both networks, it can resolve containers by name in both projects. The ingress rules in ~/.cloudflared/config.yml stay simple, with one hostname per app above the catch-all 404:
ingress:
- hostname: orbit.yourdomain.com
service: http://tailscale:4533
- hostname: subdomain.yourdomain.com
service: http://sub-wave-caddy:80
- service: http_status:404
Note that the station is reached on Caddy’s container port (80), not the host port 7700. Traffic from the tunnel never touches the host’s published ports. Port 7700 is only there for listening on the LAN.
After restarting cloudflared, Cloudflare terminates TLS, no inbound ports are opened on the router, and the station is reachable from anywhere.
Gotchas
- Start SUB/WAVE before the Navidrome stack.
subwave_defaultis declaredexternal, so Docker Compose won’t create it. If the Navidrome stack comes up first (after a reboot, say) and SUB/WAVE’s network doesn’t exist yet,cloudflaredfails to start. Bring SUB/WAVE up first, or create the network yourself withdocker network create subwave_defaultso the order doesn’t matter. - Bad gateway means a networking problem. As with Psysonic, a Cloudflare “Bad gateway” with everything else green means
cloudflaredcan’t reach the app. Test from inside the container withdocker exec -it cloudflared wget -qO- http://sub-wave-caddy:80. - Keep the state directory on local disk. SUB/WAVE keeps its library index in SQLite (
state/library.db, in WAL mode), and WAL needs proper POSIX file locking. An NFS or SMB share will corrupt it under load. My music is mounted read-only over SMB from the Roon server (/mnt/roon-music), and that’s fine for Navidrome reading tracks. SUB/WAVE’sstatefolder, like Navidrome’s own database, stays on local disk. - A public URL means a public station. Anyone with the link can listen. Mine is open for now while I experiment, and a few family members are tuning in. Since the music is really for my own listening, it’ll go behind a login once I’ve finished experimenting, using the station password under Settings → Station → Privacy. Unlike Psysonic, there’s no Subsonic client in the way, so Cloudflare Access would work too.
- Don’t trust Cloudflare’s IP header unless the tunnel is the only way in.
TRUST_CF_CONNECTING_IP=1makes the controller key its rate limits (request cooldowns, the admin lockout, the password throttle) on Cloudflare’sCF-Connecting-IPheader. Port 7700 is still open on my LAN, though, and anyone who reaches it directly could spoof that header. So I’ve left it unset, and the bundled Caddy’sX-Forwarded-Forhandling does the job. - Navidrome version. Version 0.62 or later is recommended, for security fixes and the
sonicSimilaritysupport that SUB/WAVE uses to find tracks that sound alike.
The admin console
First, the listener’s side. The player is deliberately radio-like. There’s a big “tap to tune in”, the now-playing card, and panels for the day’s schedule, a timeline of what’s played, and a request slip where you write to the DJ in plain language (“play me something for late-night driving…”).
Behind it is the admin console, and this is where the fun is:
- Personas: the DJs. I have three: Wren (“Small details, quiet rooms, one good image”), Hale (“Says less, means more. Leaves space.”) and Marlowe (“Late-night company and well-chosen records”). Each has a short personality sketch, called its soul, that goes into every prompt. Sliders set how often they talk and how long their scripts run, and tone dials cover humour, local colour and warmth.
- Schedule: a weekly grid of shows. Mine runs from Sunrise Service and Madonna Mornings, the Pop Queen through The Pop Show, The Golden Era Cypher and Metal Monday, to Night Romance and The Country Show overnight. Each show has a theme and a persona, and the DJ leans into it.
- Moods and festivals: the vocabulary the library is tagged with, plus a calendar of dates (Valentine’s Day, the summer solstice and so on) that the station’s music and tone drift towards as they come round.
- Idle pause: after five minutes with no listeners, the programme pauses, with no Navidrome pulls and no LLM or TTS calls, and picks up again within seconds of someone tuning in. It’s a nice touch when every DJ link is a paid API call.
- Observatory: a data-art map of the library, laid out by how each track sounds. Mine is still showing the built-in 400-track demo. The map only plots tracks that have been tagged with moods, and tagging is a job for the LLM. With the API credit gone, none of my 20,000+ tracks have been tagged yet. That’s another reason to get a local model running.
Result
For a week I had my own radio station playing my own music, with a presenter who actually talked about it. The software is free and MIT-licensed, with no subscription. The only running cost was the Claude API usage, roughly $5 a week. But your mileage may vary depending on how many music requests you make or how chatty you want the DJs. Worth a try though to see what the station can do, but not something I want to pay for indefinitely. Right now it’s a very good auto-playlist with the DJ off air. Getting the DJ back on air with a local LLM is my next task, though this will depend on what hardware I want to leave running. Is an RTX4060 Ti/16GB based machine overkill for a radio station? It’ll keep the room warm no doubt.
Roon is still my daily driver though for deliberate listening whether I’m lounging in the living room or having a headphone session in the bedroom with my feet up. When I just want music on in the background, without making a single decision, SUB/WAVE is what I want to reach for. In the first week I had it running with Claude it made my own library feel new again and surfaced music in a way that Roon simply couldn’t do.
SUB/WAVE is here to stay.