Skip to main content
There are two binaries:
  • rockbox — user-facing wrapper. Starts the server, scans the library, opens the web UI, manages the systemd service, runs JS/TS scripts, and acts as a Bluetooth client on Linux.
  • rockboxd — the daemon itself. Linked by Zig from the C firmware
    • Rust crates + CPAL. Lives at zig/zig-out/bin/rockboxd after a build, or /usr/local/bin/rockboxd after install.
Most users only ever invoke rockbox; rockboxd is the underlying process it spawns.

rockbox

Running rockbox with no subcommand starts the server. The subcommands below are dispatched in cli/src/main.rs.

Global flags

Subcommands

Examples

rockboxd

The daemon. Usually you don’t run it directly — rockbox start or the systemd unit handles it. When you do need to invoke it manually, most configuration is driven by environment variables and ~/.config/rockbox.org/settings.toml. A small set of subcommands are also available for account management and settings sync; they exit the process immediately without starting the Zig firmware or any servers.

Subcommands

login <handle>

Opens the Rocksky OAuth authorisation URL in your default browser and listens on localhost:6996 for the callback. On success the token is saved to ~/.config/rockbox.org/token.

whoami

Reads the stored token and resolves the Rocksky account associated with it.

settings pull

Downloads your audio settings (equalizer, crossfade, replaygain, tone) from Rocksky and merges them into ~/.config/rockbox.org/settings.toml. All other fields in settings.toml (e.g. music_dir, audio_output) are left untouched. Restart rockboxd to apply the new settings.

settings push

Reads the audio sections of ~/.config/rockbox.org/settings.toml and uploads them to Rocksky. Requires a stored token (rockboxd login first).

Environment variables

Stdout / stderr

  • Stderrtracing log output. Always safe to redirect or filter.
  • Stdout — normally empty, except when audio_output = "fifo" with fifo_path = "-", in which case stdout is raw S16LE 44.1 kHz PCM.

Logging

Never use eprintln! / println! from inside the codebase — they bypass the structured filter and pollute stdout (which breaks FIFO mode). Use tracing::{debug,info,warn,error}! in Rust code.

Files