Building a Kids' Radio With AzuraCast and TeddyCloud
How I put together two Toniebox radio stations: TeddyCloud, AzuraCast on Proxmox, music on a NAS, printed figures and a custom album control app.
2886 Words … ⏲ Reading Time: 13 Minutes, 7 Seconds
2026-11-25 00:24 +0000
I wanted each of my kids to have a figure that looks like them and plays their own radio station on a Toniebox. They should be able to choose an artist or an album through the control app, hear the tracks in order and have the next album start automatically. The control app will run in a browser on a tablet.
The result combines AzuraCast, TeddyCloud, two figures I 3D printed on my Snapmaker U1 and a small control app. The stations share a music library but have independent queues, so changing one child’s selection does not change the other station.
I first looked at running Icecast and Liquidsoap separately. AzuraCast already bundles them with media management, station controls and an API, which left me with the album selection behavior to build.
The TeddyRadio repository on GitLab contains the control app, Docker files and setup notes under the MIT license. The public copy uses configurable profiles and leaves out our family pictures and home deployment details. The app is my own addition to AzuraCast. Start with two playable stations, then add the album controls once the audio path works.
The Copy&Paste section collects the radio stack commands in one place.
The figures select continuous radio streams. They do not hold a separate copy of each album, and removing a figure does not pause the station. Playback still depends on the NAS, radio server, TeddyCloud and Wi-Fi being available.
The tools and what they do
| Tool or component | What I used it for |
|---|---|
| AzuraCast | The media library, two stations, Icecast streams and Liquidsoap audio scheduling. |
| TeddyCloud | Connecting the modified Tonieboxes to my own content and converting each MP3 stream into audio the box can play. |
| Proxmox and Ubuntu 24.04 | Hosting the radio backend and control app in a VM with two vCPUs and 4 GiB RAM. |
| Synology DS418play and NFS | Keeping one music library on the NAS and sharing it with both stations. |
| Docker Compose and Portainer | Deploying the services. I used Portainer on the NAS and Compose for the final VM deployment. |
| Traefik and NetBird | Providing HTTPS hostnames and restricting access to the controls to my home network or VPN. |
| Node.js 22 and GitLab CI | Running the custom album controller, testing it and building its container image. |
| Codex | Helping develop the control app, inspect configuration and correlate logs while I tested the physical boxes. |
| Snapmaker U1 and compatible tags | 3D printing a figure resembling each child and mapping its tag to a station. |
TeddyCloud stayed on a Raspberry Pi 3 Model B. My playback tests used TeddyCloud 0.7.1 with a CC3200 box and an ESP32 box. The radio backend started on the NAS, but I moved it to Proxmox after finding competing Plex transcoding processes on the NAS’s two CPU cores.
The audio travels from the NAS library through AzuraCast, then as MP3 to TeddyCloud and finally to the Toniebox. The browser app sends control commands to AzuraCast; it does not carry the audio.
1. Get the Toniebox connected to TeddyCloud
Start with a box that can already play content from TeddyCloud. That gives you a working device connection before adding radio streams.
For an unmodified box, follow the TeddyCloud setup instructions. Identify whether it is a CC3200, CC3235 or ESP32, then use the matching certificate extraction, replacement CA and DNS instructions. I had already done this preparation on my two boxes.
Deploy TeddyCloud using the project’s Docker Compose example and preserve its certificate, configuration and content volumes. On my Pi it has its own LAN address. The box connection needs TeddyCloud’s client certificate handling on port 443, so a normal HTTPS reverse proxy terminating TLS in front of it is not a substitute. The project documents the required setup in the same guide.
Check that the box appears in TeddyCloud and plays a known audio file before continuing. Keep this interface on your private network.
2. Install AzuraCast and create two stations
Use the official AzuraCast Docker installer. The commands are collected in the Copy&Paste section below.
Open the installation’s web interface and create the administrator account. Create two stations using Icecast and Liquidsoap. Leave AutoDJ enabled for this initial test.
Use distinct station short names, for example radio_one and radio_two. Also note their actual station directory names, because the music mounts in the next step must match them.
My deployment publishes the web service on port 8088. The example addresses below use a radio host at 192.168.1.50 and a NAS at 192.168.1.20; replace those and the port with your own values.
3. Make the music available to both stations
Organize the library into artist and album folders, with track numbers in the filenames. My controller uses natural path sorting, so these names determine the order:
Kids Music/
Example Artist/
01 - First Album/
01 - First Track.mp3
02 - Second Track.mp3
02 - Second Album/
01 - First Track.mp3
You can start by uploading a small album through AzuraCast’s media manager. I already had the library on the NAS and wanted both stations to read it without duplicating it on the VM.
Enable NFS on the NAS and export the music directory read-only to the radio VM’s IP. Ensure the mapped NFS user can read the files and traverse their directories. My Synology export maps reads to UID/GID 65534, which had access to this library.
The NFS override in the Copy&Paste section mounts the same export below both station media directories. Adapt the NAS address, export and actual station directory names. Merge with any existing overrides, apply it from the AzuraCast installation directory and let indexing finish. Both media managers should show the same album and its tracks under plex.
Mount the library below media, leaving the rest of the station storage writable. An earlier attempt to make the whole media directory read-only interfered with generated cover files. The plex directory here is just a mount name; Plex does not serve the audio.
For the initial playback test, put the test album in an enabled sequential playlist on each station and start broadcasting. Check the track count and order in both stations before importing a large library.
4. Test the streams before assigning the figures
Copy each station’s MP3 listening URL from AzuraCast. With the example names and port, they are:
http://192.168.1.50:8088/listen/radio_one/radio.mp3http://192.168.1.50:8088/listen/radio_two/radio.mp3
Play both in a browser or audio player. Then check reachability from TeddyCloud’s container, because that is where the stream will be consumed. For a container named teddycloud, this command decodes 30 seconds without saving audio:
docker exec teddycloud ffmpeg -hide_banner \
-i http://192.168.1.50:8088/listen/radio_one/radio.mp3 \
-t 30 -f null -
Repeat for radio_two. Resolve source connection or decoding errors here before involving the figures. I use direct LAN stream URLs for TeddyCloud, while Traefik provides HTTPS for the browser interfaces.
5. Give each figure a station
I 3D printed two figures on my Snapmaker U1, each made to look like one of the kids, and reused their reference illustrations as profile pictures in the control app. The physical figure and the profile picture therefore represent the same child. Its tag is what TeddyCloud maps to a station.
Use tags compatible with your box firmware. The custom tag guide specifies SLIX-L tags with privacy mode for the standard setup and explains the firmware exceptions. An arbitrary NFC sticker is not sufficient.
Place one tag or figure on the box, then find it in TeddyCloud’s recently played tags. It can report an error before any content is assigned. Identify that tag’s existing content mapping and set its source to the first station. In my container, these mappings are .json files beneath /teddycloud/data/content/default/, alongside the tag’s content path. Use the identifier shown by TeddyCloud; an NFC reader can display its bytes in a different order.
The relevant content JSON fields are:
{
"live": true,
"nocloud": true,
"source": "http://192.168.1.50:8088/listen/radio_one/radio.mp3",
"skip_seconds": 0,
"cache": false
}
Merge those fields into the existing mapping; do not replace the entire file with this excerpt. Preserve the tag’s other metadata. Save, perform the freshness check described in the tag guide and lift and replace the figure. Repeat with the second figure and radio_two.
Check that each figure selects the intended station. TeddyCloud can replay a cached prefix when a figure returns; the fresh-start setting and its version-specific caveat are covered in the final section. Even with that setting, the box buffers audio, so it can lag behind the station.
6. Add album selection and continuation
The first control approach was to switch native AzuraCast playlists. That got music playing, but I wanted complete albums followed by the next album from the same artist. Several enabled playlists could introduce tracks from elsewhere, even when the individual playlists were sequential.
I vibe-coded the curator app myself with Codex to own that sequence. It is a Node.js 22 service with a browser interface that the kids will use on a tablet. They choose a profile, an artist and an album. The backend clears that station’s old queues, submits the album through AzuraCast’s API and appends the next album when the queue runs low.
The curator directory contains the server, browser UI, state handling and Dockerfile. There is no npm dependency installation step. The public repository’s compose.yml builds the app locally and connects to an existing AzuraCast installation.
Profiles come from RADIO_STATIONS_JSON, including their names, station IDs and stream URLs. For your own pictures, put PNG, JPG or WebP files in the ignored profiles/ directory and add an image field such as /profiles/one.png to the matching profile. The pictures are mounted separately from the image build. Without a picture, the public app shows initials.
The final deployment uses these settings:
| Setting | Purpose |
|---|---|
AZURACAST_BASE_URL |
The API address reachable from the app container. |
AZURACAST_PUBLIC_URL |
The browser-accessible base URL used for artwork. |
AZURACAST_API_KEY |
Server credentials for media, queue and broadcasting operations, including the admin debug endpoint used for fixed Liquidsoap commands. |
RADIO_STATIONS_JSON |
Profile keys and names, AzuraCast station IDs, listening URLs and optional pictures. |
STATE_FILE=/data/playback.json |
Persistent artist, album and recovery state for each station. |
AUTOPILOT_MIN_QUEUE_TRACKS=3 |
The queue threshold used for continuation. |
AUTOPILOT_INTERVAL_MS=15000 |
The interval between continuation checks. |
CONTROL_BIND_IP |
The radio host’s LAN address on which Docker publishes port 3000. |
CONTROL_NETWORKS, CONTROL_HOSTS, TRUSTED_PROXIES |
The allowed client networks, request hostnames and exact proxy addresses. |
The Copy&Paste section starts it with persistent state and direct LAN access. Test both profiles there before adding a proxy. The API key stays on the server. TLS verification remains enabled; use a trusted certificate or mount your own CA if the API uses HTTPS.
My private deployment uses GitLab CI to build the image. The public copy includes a test job template, which readers can enable on their own isolated runner. Its app tests pass, but the complete installation recipe has not been exercised on a fresh VM.
After confirming that the app can queue an album on each station, disable populated native playlists that could insert unrelated audio. My final station configuration uses backend_config.use_manual_autodj=true, with the controller supplying the tracks; I restarted the station services after changing it. This is specific to the custom queue controller. Leave native scheduling active if you are using AzuraCast without it.
Select one album on each profile to initialize continuation. Verify that its first track starts, the rest remain in order and the next album follows automatically. Selecting something on the other profile must leave the first station’s queue alone.
7. Put the controls behind your proxy
My Traefik instance stays on the NAS. Its file provider forwards the radio management hostname to the VM on port 8088 and the control hostname to port 3000. Docker labels on a different host do not automatically give this Traefik instance the new routes.
The control route has a LAN/NetBird IP allowlist. The app checks the client network, host and browser origin too. Set TRUSTED_PROXIES to the address the app actually sees for Traefik, then include the control hostname in CONTROL_HOSTS. A move between hosts can change that source address.
The kids do not need an AzuraCast login, and the API key stays in the app’s server configuration. The existing TeddyCloud box connection remains separate from these browser routes.
8. Check playback on the actual boxes
Test each figure alone, then both together. Leave them playing through an album change and try replacing a figure after it has already downloaded part of the stream. A successful API request or an online station does not prove that buffered audio is still reaching the speaker.
These were the issues that mattered in my setup:
- TeddyCloud 0.7.1 crashed on a resumed stream in its TAF append path. Setting
encode.ffmpeg_stream_restart=trueon each box overlay and saving avoided that path during my tests. It is a workaround: issue 608 also describes a cleanup race with forced restart, and PR 609 proposes fixes. I have not deployed that patch. - Retaining the initial burst with
encode.ffmpeg_sweep_startup_buffer=falsedid not solve the remaining stops. One run still ended after about 22 minutes, so I would not present extra buffering as the fix. - The boxes were directly beside each other. Native event logging reported a figure being removed and detected again while it was untouched. After separating the boxes by roughly one meter, neither logged another removal or playback stop during the following 19 minutes, until I removed both figures manually. That suggests reader interference, but it is not a confirmed diagnosis or a completed endurance test.
Keep the boxes separated for testing, note whether a stop was intentional and compare box events with server logs. I disabled the temporary logging after saving the evidence.
The radio, mappings and album controls are functional. Longer playback validation remains open. Back up the AzuraCast database and station volumes, the controller’s /data, TeddyCloud’s persistent data and the NAS music separately. Moving the backend to a VM does not include the external music library in the VM’s backup.
Copy&Paste: the radio stack
Run these blocks in order as root in Bash on a fresh Linux radio host with Git, curl, Docker and Compose v2 available. This installs AzuraCast and the control app, with music read directly from an NFS export. TeddyCloud and the box certificates are prepared separately in step 1. The two pauses for station creation and an API key are intentional.
The example uses 192.168.1.50 for the radio host, 192.168.1.20 for the NAS, /volume1/kids-music for the export and 192.168.1.0/24 for allowed clients. Replace those values with yours. The NAS must already allow read-only NFS access from the radio host. These are fresh-install commands; merge existing configuration instead of overwriting it.
Install AzuraCast with its upstream installer:
(
set -e
mkdir -p /var/azuracast
cd /var/azuracast
test ! -e docker-compose.yml || { echo "AzuraCast already exists; stop here."; exit 1; }
curl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh -o docker.sh
chmod 755 docker.sh
./docker.sh install
)
Use HTTP port 8088 during installation. If it kept port 80, run cd /var/azuracast && ./docker.sh change-ports and set HTTP to 8088, keeping the other ports as appropriate for your host. This uses the installer’s supported port configuration, described in the AzuraCast Docker guide.
Open http://192.168.1.50:8088, create the administrator account and two Icecast/Liquidsoap stations with short names radio_one and radio_two. Check that their station directories have those same names. Keep AutoDJ enabled for the initial playback test.
Mount the NAS music below both stations’ writable media directories:
(
set -e
cd /var/azuracast
test ! -e docker-compose.override.yml || { echo "Merge with the existing override instead."; exit 1; }
cat > docker-compose.override.yml <<'YAML'
services:
web:
volumes:
- kids_music:/var/azuracast/stations/radio_one/media/plex:ro
- kids_music:/var/azuracast/stations/radio_two/media/plex:ro
volumes:
kids_music:
driver: local
driver_opts:
type: nfs
o: addr=192.168.1.20,nfsvers=3,proto=tcp,ro,nosuid,nodev,noexec
device: ":/volume1/kids-music"
YAML
docker compose config --quiet
docker compose up -d
)
Wait for indexing, put a test album in a sequential playlist on each station and verify both MP3 streams. Create an API key permitted to read media and playback data, manage queues and access the admin debug endpoint used for the controller’s fixed Liquidsoap commands. Keep this privileged key in the app’s .env file.
Build and start the control app. The block prompts for the key without showing it or putting it in shell history. Edit the example addresses and station IDs before pasting:
(
set -e
umask 022
git clone https://gitlab.andremohrmann.de/am-admin/teddyradio.git /opt/teddyradio
cd /opt/teddyradio
umask 077
cat > .env <<'ENV'
CONTROL_BIND_IP=192.168.1.50
CONTROL_NETWORKS=127.0.0.1/32,::1/128,192.168.1.0/24
CONTROL_HOSTS=localhost,127.0.0.1,192.168.1.50
TRUSTED_PROXIES=
AZURACAST_BASE_URL=http://192.168.1.50:8088
AZURACAST_PUBLIC_URL=http://192.168.1.50:8088
RADIO_STATIONS_JSON='{"one":{"name":"One","id":"radio_one","streamUrl":"http://192.168.1.50:8088/listen/radio_one/radio.mp3"},"two":{"name":"Two","id":"radio_two","streamUrl":"http://192.168.1.50:8088/listen/radio_two/radio.mp3"}}'
AUTOPILOT_MIN_QUEUE_TRACKS=3
AUTOPILOT_INTERVAL_MS=15000
ENV
read -r -s -p 'AzuraCast API key: ' radio_api_key </dev/tty
printf '\n'
[[ "$radio_api_key" =~ ^[A-Za-z0-9._:/+=-]+$ ]] || { echo "Empty or unexpected API key format."; exit 1; }
printf "AZURACAST_API_KEY='%s'\n" "$radio_api_key" >> .env
unset radio_api_key
chmod 600 .env
chmod 755 profiles
docker compose config --quiet
docker compose up -d --build
docker compose ps
)
The repository supplies compose.yml; it builds from source and does not need access to my container registry. Open http://192.168.1.50:3000 from the allowed subnet. Confirm that both profiles browse and select albums, then disable conflicting native playlists, enable backend_config.use_manual_autodj=true on each station and restart its services as described in step 6. Select an album on each profile to initialize continuation. Assign the two stream URLs to the figures in step 5.
The examples have passed shell syntax and Compose configuration checks. The app has automated tests for queueing, profile configuration and recovery. This is not yet a tested unattended installer or a completed endurance test of the boxes.
