Skip to content

Device setup ​

From a blank microSD card to a working speaker. The wiring can be done before or after; the assembly guide recommends doing the software first.

Two ways to install ​

  • The Boombox image, the quick way: Armbian with the speaker already on it. Flash it with Armbian Imager and a profile for your Wi-Fi and login, set the hardware in one file on the card, boot. Nothing to install by hand.
  • Armbian and the Debian package: flash plain Armbian (or use a board that already runs it), then install the boombox package. For another Armbian image, or to see each step.

Both end in the same speaker, and First use is the same for both. On a board with eMMC, either route installs onto a card first and moves to the eMMC afterwards.

What you need ​

  • The Radxa ZERO 3W, a microSD card (16 GB or more) and the 5 V / 3 A supply.
  • For the image: boombox-<version>-radxa-zero3.img.xz of a release, and Armbian Imager (macOS, Windows, Linux).
  • For the package: the boombox_<version>_all.deb and boombox-setup.sh of a release, from the project's Deploy → Package registry (package boombox), or else your computer, with:
    • this repository,
    • DDEV (or Node.js 24 and Docker) to build the package,
    • SSH access to the board as root.
    • Temporary network access for the board: a USB-C Ethernet adapter, or Wi-Fi configured once with armbian-config or nmtui.

The Boombox image with Armbian Imager ​

The release's boombox-<version>-radxa-zero3.img.xz is Armbian (Debian trixie) with the package installed. The speaker is set up from the card's BOOMBOX drive: boombox.txt (name, Wi-Fi, hardware) and, for SSH, an authorized_keys file. It reads both on its first boot.

Flash it ​

  1. Download boombox-<version>-radxa-zero3.img.xz from the release.
  2. Write it to the card: in Armbian Imager, load your own image file instead of picking a manufacturer, or use balenaEtcher (Flash & verify). Armbian Imager offers no first-boot profile for an image of your own.
  3. Before you put the card in the board, open its BOOMBOX drive (a small FAT partition, which macOS and Windows show) and edit boombox.txt: the hostname, the Wi-Fi and its country, and the hardware: DAC, antenna, e-Paper, knob, TV and HDMI. Every line is commented; a value left empty keeps its default. Without a hostname the speaker is boombox.
  4. For SSH, put your public keys on the same drive: a file named authorized_keys, authorized_keys.txt (as a Mac saves it, with the extension hidden), or a copy of your id_ed25519.pub. They become root's keys: ssh root@<hostname>.local. Root has no password and takes keys only; without such a file nobody logs in over SSH.
  5. Put the card in the board and power it on. The first boot applies the file, sets the speaker up (a few minutes), erases the Wi-Fi password from the card once it is saved, and reboots once. It leaves firstboot.log on the BOOMBOX drive: what it did, the fingerprints of root's keys, and what it rejected, readable on any computer. Go on with First use: with the Wi-Fi in the file the speaker joins your network at once, without its setup network.

What the speaker does with the profile ​

Armbian Imager writes a first-boot profile (/root/.not_logged_in_yet) only with Armbian's own images; the Boombox image gets none from it. A profile there anyway (written onto the card from Linux, or on a board installed from plain Armbian) is applied. Armbian applies one only at a console login, which a speaker with a TV never gets; the speaker does it on its first boot instead, together with boombox.txt:

  • Wi-Fi, country, timezone, locale: the profile wins where it and boombox.txt both set one; boombox.txt fills in the rest. The Wi-Fi needs the profile's network settings turned on (PRESET_NET_CHANGE_DEFAULTS=1 in the profile).
  • Hostname: the profile has none. It comes from boombox.txt, or later from Settings → System.
  • User: created with the profile's password and shell, in the groups Armbian gives its user (sudo among them). Log in over SSH with it. A name that exists already is left as it is. Without a password the account is locked: its key is the way in.
  • Root: stays locked unless the profile sets a root password, and logs in over SSH with a key only, never with that password.
  • SSH keys: fetched from their https:// address (plain http:// is refused) once the speaker is online, again until the address answers; only lines that are public keys are taken (journalctl -u boombox-armbian-preset-keys shows their fingerprints). Once every key is in, SSH takes keys only: passwords are no longer tried.
  • Afterwards: the passwords are erased from the card and the profile (/root/.not_logged_in_yet) is removed, so Armbian's own first login neither asks nor applies it again. A /root/provisioning.sh runs once at the end, as on Armbian.

Other tools ​

Any tool that writes images does, dd too: xzcat boombox-*.img.xz | sudo dd of=/dev/sdX bs=4M status=progress. Without Wi-Fi in boombox.txt the speaker opens its setup network (First use).

Afterwards ​

boombox.txt, authorized_keys and a profile are read once. Change the hardware options later with sudo dpkg-reconfigure boombox, the hostname and Wi-Fi in the web interface. journalctl -u boombox-firstboot shows what the first boot did and which values it rejected, journalctl -u boombox-firstboot-install the setup that follows once the network is up. The first boot reads the BOOMBOX drive of the card it boots from only: a USB stick with that name is left alone. Each card makes SSH host keys and a machine ID of its own on that boot. HDMI=always needs the TV attached at that boot; otherwise it stays auto and sudo boombox-install --hdmi=always does it later.

Armbian and the Debian package ​

Plain Armbian first, then the package, which installs and sets up everything else. Also the way for a board that already runs Armbian. On a board with eMMC, install onto a card and move it over afterwards (On a board with eMMC).

1. Flash Armbian ​

  1. Download Armbian for the Radxa ZERO 3 (the 3W and 3E share the image), choosing a minimal or server image with Debian trixie or bookworm, from https://www.armbian.com/radxa-zero-3/.
  2. Write it to the card with Armbian Imager, which can add a first-boot profile, with balenaEtcher, or with xzcat image.img.xz | sudo dd of=/dev/sdX bs=4M status=progress.
  3. Boot the board, log in on the console or over SSH, and finish Armbian's first-run wizard: root password, user, timezone. With an Armbian Imager profile the board does that by itself. If the profile has not been applied yet when you install, for example because nobody logged in, install.sh applies it. Its netplan Wi-Fi, static address and country move to NetworkManager either way.
  4. Get it online: sudo nmtui → Activate a connection.
  5. Check the radios:
    bash
    ip link show wlan0       # Wi-Fi
    bluetoothctl show        # Bluetooth adapter, "Powered: yes"
    If either is missing, see Troubleshooting → no Wi-Fi or Bluetooth. Note down the Armbian version and kernel that works (uname -r).

2. Prepare the system: install.sh --system ​

From the package: download boombox_<version>_all.deb and boombox-setup.sh from the package registry, copy both to the board, and run:

bash
sudo bash boombox-setup.sh ./boombox_1.2.0_all.deb

From a checkout: with SSH access to the board as root (or a user with sudo), one command builds the package, copies it over and runs the same script (see Development → Trying a build on the speaker):

bash
make install HOSTS=root@boombox.local

The script adds the PHP repository (its key checked), installs Pico for spoken prompts where Debian's non-free is on, then apt installs the package with everything it needs. On the way apt asks for the hardware: the DAC, the antenna, the e-Paper panel and the knob, HDMI and the TV. These are the options below. The package then runs install.sh with them, and steps 3 and 4 as well: go on with the reboot below, then First use.

The answers are kept for every update. To change them, run sudo dpkg-reconfigure boombox. For an install without questions, set them first:

bash
sudo debconf-set-selections <<EOF
boombox boombox/dac select uda1334a
boombox boombox/antenna select external
boombox boombox/epaper select v3
boombox boombox/knob boolean true
boombox boombox/hdmi select always
boombox boombox/tv boolean true
EOF
sudo DEBIAN_FRONTEND=noninteractive bash boombox-setup.sh ./boombox_1.2.0_all.deb

By hand: the package's answers are install.sh options. On a speaker with the package, run it with them:

bash
sudo boombox-install --system --dac=uda1334a   # UDA1334A + MAX98306 or TPA2012
# or: --dac=pcm5102a (PCM5102A + analog amp), --dac=max98357a (I2S amplifier);
#     without --dac a later run keeps the DAC the board has
# add: --antenna=external when an antenna is on the U.FL connector
# add: --hdmi=always to play through a TV on HDMI (run it with the TV on)
# add: --airplay=on for AirPlay (audio and screen mirroring)
# add: --tv=on to show the speaker's pages on that TV
# add: --epaper=v3 for a Waveshare 2.13" e-Paper HAT (v2, v3 or v4: the panel's version)
# add: --knob=on with a rotary encoder and a Back button beside the display
#      (--knob-steps=2 for an encoder that clicks twice per cycle)

The board uses its onboard antenna until told otherwise, even with an antenna plugged into the U.FL connector. Pass --antenna=external only when one is attached: without it, Wi-Fi and Bluetooth go deaf.

The script is idempotent: run it again any time, and it only changes what is not already in place. It does the following:

StepWhat happens
PackagesBlueZ, bluez-tools, bluez-alsa, ALSA utilities, NetworkManager with wpa_supplicant and dnsmasq, avahi, iw, sqlite3, gpiod, and FrankenPHP plus PHP 8.5 (ZTS) from pkg.henderkes.com. A speaker still on PHP 8.4 is switched to the 8.5 repository and upgraded, and its agent and web server restarted.
ConflictsMasks PipeWire/PulseAudio user services and Debian's own bluealsa-aplay.service. Hands wlan0 to NetworkManager.
UsersCreates group boombox (www-data joins it) and the user boombox-aplay for playback. Removes the user deploy that shippy deployed as, on speakers set up before; its files pass to root.
SecretsCreates the setup secret (/etc/boombox/setup-secret), the TYPO3 admin password (/etc/boombox/admin-password), the Mercure keys and /var/www/boombox/shared/.env.
OverlayRemoves Armbian's i2s3-m0 microphone overlay and adds the DAC's overlay, radxa-zero3-i2s3-uda1334a with --dac=uda1334a. A reboot is needed after this step.
AntennaOnly with --antenna=external (or onboard to switch back): enables Armbian's radxa-zero-3w-ext-ant overlay, which switches Wi-Fi and Bluetooth to the U.FL connector. A reboot is needed after this step.
HDMIOnly with --hdmi=always (or auto to undo): saves the connected TV's EDID as /usr/lib/firmware/edid/boombox-hdmi.bin, adds it to the initramfs and adds video=HDMI-A-1:1920x1080@60e drm.edid_firmware=… to extraargs, so HDMI and its sound stay on even when the TV was off at boot. A reboot is needed after this step.
e-PaperOnly with --epaper=v2|v3|v4 (or off): enables SPI3 on the M1 pins (radxa-zero3-spi3-m1-epaper overlay, /dev/spidev3.0), installs python3-libgpiod, python3-spidev, python3-pil, python3-cairosvg (for SVG logos) and fonts-symbola (emoji, black and white), and boombox-epaper.service, which shows what plays (see Usage). The version is the one printed on the back of the panel, not the board's "Rev2.1"; a wrong one leaves the screen blank or garbled, or (V4 on a V3 panel) makes every update a 4 s full refresh. journalctl -u boombox-epaper logs each full refresh (at start, and before the panel sleeps) and each wake, with how long it took; --verbose in the unit's command line logs every partial one and every card too. A reboot is needed after this step.
KnobOnly with --knob=on (or off), on a speaker with the display: the display's program reads a rotary encoder and a Back button on header pins 29, 31, 36 and 32; the radxa-zero3-knob overlay gives them pull-ups (a reboot is needed after the first --knob=on) (see Wiring). --knob-steps=2 for an encoder that clicks twice per quadrature cycle (default 4). Kept in /etc/boombox/epaper.env as EPAPER_KNOB and EPAPER_KNOB_STEPS.
TVOnly with --tv=on (or off): installs sway and cog, and lets tty1 log the user boombox-kiosk in, whose login shell /usr/local/bin/boombox-kiosk shows the speaker's pages full-screen while the TV is turned on (the agent keeps /run/boombox/tv-on). The TV account's random password goes to /etc/boombox/tv-password; --app then creates the account tv. The TV is turned on once the kiosk is set up (by --app, or the package, when the agent runs); afterwards the owner turns it off and on and chooses what it may do on the Settings page. The TV's remote works the pages: the arrows move the focus (the page scrolls so that it keeps a quarter of the screen from the top and bottom edges, and what comes next stays in sight; up and down scroll a third of the screen first while the next control is not in sight yet, so text between controls is read; right from the menu goes into the content, and to the content itself where it has no control in sight, which up and down then scroll), OK presses, Back goes back, green forward, red reloads (remote.ts). The kiosk opens the address the site is configured for (the base of config/sites/*/config.yaml, such as http://boombox-benni.local/, which the backend's Sites module writes and which then matches no other name); with the default, a relative or environment-set base, it opens http://localhost/. /tv/login accepts the speaker itself on either: loopback, or one of its own addresses (LocalAddresses). The TV's own remote works the pages over HDMI-CEC (Anynet+ on a Samsung): boombox-cec makes the speaker a CEC 1.4 playback device (a Samsung forwards no key to a 2.0 one), reads the remote's presses from cec-follower (v4l-utils) and plays them as keys on a virtual keyboard: the arrows and OK, Return as Back (a Samsung sends it as a vendor command), Exit as the start page / from wherever the page is, and the red key as Reload and the green key as Forward where the TV forwards them. Switch Anynet+ on in the TV and choose the speaker (it appears as a CEC device) in the TV's source list. --tv=on also installs boombox-wiimote, which plays a Wiimote's buttons as the same keys (and its +/− as the volume): while the pairing window is open it pairs with a Wiimote in sync mode (the red button; BlueZ's PIN for 1+2 does not work with this chip), and reads the input device the kernel's hid_wiimote makes of it once connected, grabbing it so that the browser does not see its raw keys. A paired Wiimote connects by itself on any button press, so it works right after a boot. A Wiimote counts as no phone for the agent (no connect sound, no place in maxConnections, never the last device). It needs no CEC adapter. The keyboard layout (Settings, System) is in /run/boombox/keyboard-layout, which the agent keeps and the login shell reads into XKB_DEFAULT_LAYOUT and XKB_DEFAULT_VARIANT before it starts sway; a change starts the browser over. The mouse's speed is in /run/boombox/mouse-speed, which boombox-mouse reads. The browser paints on the GPU (WEBKIT_SKIA_ENABLE_CPU_RENDERING=0 in the kiosk's login shell; WPE WebKit paints on the CPU by default, which stalled the page for about 900 ms every second), and the TV draws no card shadows (a CPU fallback would otherwise stall again). While the speaker boots, the TV shows the selected logo on the menu's colour (where the web interface puts the logo too: a white logo is made for a dark menu) instead of the console's text (a Plymouth theme, boombox, in the boot image: --tv=on sets bootlogo=true, verbosity=0 and quiet vt.global_cursor_default=0 systemd.show_status=false in /boot/armbianEnv.txt, and boombox-splash.service makes the theme and the image from the logo and the menu's colour; the logo stays on the TV until the kiosk's first page). A new logo or menu colour in the web app is in the image from the next boot; the rebuild takes about a minute of low-priority work, and a reboot or power-off waits for it. The first seconds of a boot, until the boot image starts Plymouth, stay black.
AirPlayWith --airplay=on (or off to remove it); the package sets it up without being asked, and a speaker that was offline then fetches UxPlay when AirPlay is switched on in the settings. Off in the settings until the owner turns it on (AirPlay). Installs the GStreamer plugins UxPlay needs, the user boombox-airplay, the key /etc/boombox/airplay.key, boombox-airplay.service (not enabled: the agent starts it when AirPlay is turned on) and boombox-airplay-update, which downloads the pinned UxPlay build from the project's package registry (the pipeline's manual job uxplay_binary makes it). Caddy forwards /boombox-airplay/ to the receiver's stream; a ticket from the web app, good for 30 seconds, opens it. A Caddyfile that was edited by hand needs the handle /boombox-airplay/* block from files/Caddyfile.device. Every later run of install.sh keeps it up to date and restarts the receiver when its scripts changed.
Tune inOn by default; --tunein=off removes it and is remembered (/etc/boombox/tunein-off), --tunein=on sets it up again. Lets the backend's toolbar listen to what the speaker plays. It loads the kernel's snd-aloop loopback card (as the last of the eight sound-card slots, index=7), after which the agent copies everything the speaker plays to it (AsoundConfig), makes the key /etc/boombox/tunein.key and the user boombox-tunein, and sets up boombox-tunein.socket: the first listener starts a service that encodes the loopback as a live MP3 stream with ffmpeg, which stops a few seconds after the last one left. Caddy forwards /boombox-tunein/ to it; a ticket from the backend, good for 30 seconds, opens it. Nothing runs while nobody listens; the copy costs a little while the speaker plays. A Caddyfile that was edited by hand needs the handle /boombox-tunein/* block from files/Caddyfile.device.
BluetoothSets /etc/bluetooth/main.conf: name Boombox, loudspeaker device class, never discoverable by itself, auto-enable. Starts bluealsa as an A2DP sink with every sink codec this build has.
NetworkNetworkManager config: no connectivity check, the captive DNS for the setup AP. Checks that the driver supports AP mode.
mDNSSets the hostname to boombox and advertises _http._tcp through avahi.
ServicesInstalls and enables the systemd units: boombox-agent, boombox-frankenphp, boombox-aplay, and removes the old boombox-release.path. Puts the agent's command line on root's PATH as /usr/sbin/boombox-agent (sudo boombox-agent secret shows the setup secret).
MetricsInstalls prometheus-node-exporter, bound to 127.0.0.1:9100. The web app offers it and Caddy's metrics to the home network (see Prometheus metrics).
ALSA/etc/asound.conf includes /etc/boombox/asound.conf, which the agent manages.
JournalKeeps the journal across reboots (at most 50 MB) and turns off Armbian's RAM log, so /var/log is on the SD card and a crash no longer loses it. A reboot is needed after this step.

At the end it prints the setup secret when run at a terminal; from a unit, inside apt or later, sudo boombox-agent secret shows it (a log would keep it). Write it on a label: it is the Wi-Fi password of the setup network, and the password of the web login owner until its first login, which asks for a password of your own (see The owner's password). It survives factory resets.

bash
sudo reboot     # if the script asked for it (overlay, antenna, HDMI, journal)

3. The release ​

The package makes a release of its app in /var/www/boombox/releases/<date> (install.sh --release). It links the shared files (.env, settings.php, var/sqlite, logs, fileadmin) into it, runs the TYPO3 commands once TYPO3 is installed, writes it to the card and only then switches current to it. The releases belong to root; the web server (www-data) writes their var/.

4. Install the application: install.sh --app ​

The package runs this after the release. By hand:

bash
sudo boombox-install --app

This installs TYPO3 on SQLite and imports the page tree with its content elements. It also creates the owner account in the "Boombox owners" group with the setup secret as its first password, switches the database to WAL mode, and starts the agent and the web server.

On a board with eMMC ​

A Radxa ZERO 3W with eMMC (the 32 GB one shows as about 29 GB) boots several times faster from it than from a card (Booting from eMMC). Either route installs onto the card first; then move the system to the eMMC:

  1. Set the speaker up from the card as above, with its first boot done (the profile and boombox.txt are applied then, and only then).
  2. Find the eMMC: of the mmcblk disks lsblk lists, it is the one whose /sys/block/mmcblkN/device/type reads MMC (a card reads SD).
  3. Copy the system over, with the speaker's services stopped so its databases copy cleanly (/dev/mmcblk0 is the eMMC here):
    bash
    sudo systemctl stop boombox-frankenphp boombox-agent
    sudo armbian-config --api module_partitioner --target /dev/mmcblk0 --boot emmc --fs ext4 --yes
    Armbian v25.11's armbian-install takes no options: it only opens its menu ("Boot from eMMC - system on eMMC" does the same). Newer Armbian makes it a wrapper of that armbian-config call. Without --yes, and with --api plan in front of --target, the call only shows what it would do.
  4. Power off, take the card out and power on. findmnt / names the eMMC's partition once the speaker runs from it.

Everything the speaker had comes along: settings, accounts, music. The BOOMBOX drive does not, as it is read on the first boot only. Keep the card: put back in, it boots the system it holds.

First use ​

  1. On your phone, join the Wi-Fi Boombox-XXXX with the setup secret. The setup network opens on its own whenever the speaker knows no Wi-Fi.
  2. The captive portal opens. If it doesn't, browse to http://10.42.0.1.
  3. Log in as owner with the setup secret, and choose your own password when asked. From now on it is the login password; the setup secret stays the setup network's.
  4. Pick your home network on the Wi-Fi page (under Settings) and enter its password. The speaker leaves the setup network.
  5. Rejoin your home Wi-Fi and open http://boombox.local.
  6. Settings: set the volume limit (about 90 % with the MAX98306 at 12 dB, 80 % with the TPA2012 at 12 dB).
  7. Bluetooth → Pair a new device, then choose "Boombox" on your phone.

Updating ​

The simplest way is the backend: Boombox → Updates shows a newer release and installs it (Backend modules). By hand, download the new package and install it:

bash
sudo apt install ./boombox_1.2.1_all.deb

From a checkout, make install HOSTS=root@boombox.local builds and installs it as the same upgrade, on several speakers at once with HOSTS="root@kitchen.local root@garden.local".

It asks nothing new; it sets up the system again with the kept answers, so a changed install.sh takes effect too. Then it copies the app to a new release in /var/www/boombox/releases/, links the shared files, runs extension:setup and upgrade:run as the web server, and switches current only when they succeeded. Then it runs install.sh --app, which restarts the agent and the web server. The two newest releases are kept, the live one and the one before. To go back, point current at the older one (ln -sfn /var/www/boombox/releases/<date> /var/www/boombox/current); a database migration is not undone.

Adding your own extensions ​

Packages that are not in the .deb live in shared/composer.user.json, which an upgrade never touches: see Advanced customization.

Pages back to the seed ​

Pages edited, moved or deleted in the backend stay that way across updates. To start over from the page tree a new speaker gets (packages/boombox/Initialisation/data.xml):

bash
sudo /var/www/boombox/current/deploy/device/install.sh --reseed

It replaces all pages, their content and the front-end groups with the seed's, and gives the TV's account its pages again. The accounts stay: the owner keeps their password. The music, the recordings and the speaker's settings are not touched. A copy of the database is kept next to it, as <database>.sqlite.before-reseed-<date>; with the web server stopped, copy it back over the database to undo.

Rehearsing without the board ​

deploy/device/test/emulate.sh runs all of the above in a Debian arm64 container with systemd, from the package, with checks of the web interface and the agent. See Development → Emulated device.