Skip to main content

Documentation Index

Fetch the complete documentation index at: https://rockboxzig.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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 + SDL2. 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

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

Global flags

FlagDescription
--rebuild, -rRebuild the Typesense search index after scan
-h, --helpPrint help
-V, --versionPrint the version

Subcommands

SubcommandAliasesDescription
(none)Start the server
start [-r]Start the server
scan [-d PATH] [-r]Scan a library directory; -r rebuilds the search index
webuiwebOpen the web UI in your browser
tuiStart the terminal UI
replshellStart the Rockbox REPL
run <FILE>xRun a JS/TS script via Deno against the local rockboxd
open <PATH_OR_URL>Play a local file or HTTP URL directly
clearClear the current playlist
service installInstall + enable the systemd unit
service uninstallDisable + remove the systemd unit
service statusShow the unit status
login <handle>authLog in to Rocksky (BlueSky handle)
whoamimeShow the currently logged-in user
communityOpen the Discord invite
setupInstall host dependencies (SDL2, etc.)
bluetooth scan [--timeout S]Linux only — scan for Bluetooth devices
bluetooth devicesLinux only — list known devices
bluetooth connect <ADDR>Linux only — connect to a device
bluetooth disconnect <ADDR>Linux only — disconnect a device

Examples

# Start the daemon
rockbox start

# Scan the default music_dir, rebuild the search index
rockbox scan -r

# Scan a specific path
rockbox scan -d "/Volumes/Music/Recently Added"

# Play a URL
rockbox open "https://stream.example.com/jazz.mp3"

# Install as a systemd user service
rockbox service install
rockbox service status

# Run a small script against a local rockboxd
rockbox run scripts/scrobble.ts

# Bluetooth (Linux)
rockbox bluetooth scan --timeout 15
rockbox bluetooth connect AA:BB:CC:DD:EE:FF

rockboxd

The daemon. Usually you don’t run it directly — rockbox start or the systemd unit handles it. When you do invoke it manually, it takes no subcommands; behaviour is driven by environment variables and ~/.config/rockbox.org/settings.toml.
rockboxd

Environment variables

VariableDefaultDescription
RUST_LOGinfoTracing filter (per-crate supported)
ROCKBOX_TCP_PORT6063HTTP REST bind port
ROCKBOX_GRAPHQL_PORT6062GraphQL bind port
ROCKBOX_RPC_PORT6061gRPC bind port
ROCKBOX_MPD_PORT6600MPD bind port
ROCKBOX_LIBRARY$HOME/MusicDefault music library path
ROCKBOX_ADDR(auto-detected LAN IP)Address advertised to external players
ROCKBOX_UPDATE_LIBRARYunsetWhen 1, rebuild Typesense on startup
HOME(system)Used to derive config and library paths

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.
rockboxd | ffplay -f s16le -ar 44100 -ac 2 -

Logging

RUST_LOG=debug rockboxd
RUST_LOG=rockbox_airplay=debug,rockbox_slim=debug,info rockboxd
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

PathPurpose
~/.config/rockbox.org/settings.tomlPersistent configuration
~/.config/rockbox.org/library.dbSQLite library + listening stats
~/.config/rockbox.org/playlists/Saved playlists
~/.config/systemd/user/rockboxd.servicesystemd unit (after service install)