Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI

BeetstreamNext can be started via two different entrypoints (via beet beetstreamnext in plugin mode, or via beetstreamnext in standalone mode, see Installation), but the command-line surface underneath is the same in both modes (user management, cache clearing, server flags).

Plugin mode

In plugin mode, everything goes through Beets’ own beet beetstreamnext subcommand:

beet beetstreamnext [options]
FlagEffect
(none)Start the server
--host HOST[,HOST...]Override host for this run (comma-separated for multiple)
--port PORTOverride port for this run
--threads NOverride how many threads the Waitress worker uses for this run
--debugRun in Flask debug mode
--force-trust-hostForce debug mode even when not bound to localhost (NOT recommended)
-c, --create-userCreate a new user (interactive prompts)
--noinputWith --create-user: non-interactive, see Unattended bootstrap below
-u, --update-user USERNAMEUpdate an existing user’s roles (interactive prompts)
-d, --delete-user USERNAMEDelete a user (asks for confirmation)
-p, --password USERNAMEChange a user’s password (interactive prompts)
--list-usersList all registered users and their roles
--clear-cacheClear the thumbnail and HTTP caches

A user-management or cache flag runs that action and exits (it doesn’t start the server).

Settings not overridden by a flag come from Beets’ config.yaml (under the beetstreamnext: key) as usual, see the configuration reference.

Standalone mode

beetstreamnext [command] [username] [options]
CommandEffect
runStart the server (default)
create-userCreate a new user (interactive prompts)
update-user [username]Update an existing user’s roles (interactive prompts)
delete-user [username]Delete a user (asks for confirmation)
passwd [username]Change a user’s password (interactive prompts)
list-usersList all registered users and their key roles
clear-cacheClear the thumbnail and HTTP caches

Note: command defaults to run if omitted



FlagsEnv varEffect
--config PATHBeetstreamNext YAML config file (default location is OS-dependent, see here)
--library-db PATHBEETS_LIBRARY_DBPath to the Beets library.db
--music-root PATHMUSIC_ROOTMusic root directory (where song paths are relative to)
--bsn-db PATHBSN_DB_PATHPath to BeetstreamNext’s own database (default: alongside library.db, or /config in Docker)
--beets-config PATHBSN_BEETS_CONFIGOptional Beets config file, for path formats/plugins only (default: $BEETSDIR/config.yaml, if set and present)
--host HOST[,HOST...]BSN_HOSTHost(s) to listen on
--port PORTBSN_PORTPort to listen on
--threads NBSN_THREADSWaitress worker threads
--debugRun in Flask debug mode
--force-trust-hostForce debug mode even when not bound to localhost (NOT recommended)
--noinputWith create-user: non-interactive, see Unattended bootstrap below

See the configuration reference for the full settings precedence rules, or Installation for more on library-db/music-root specifically.

Interactive prompts

create-user/--create-user, update-user/--update-user, passwd/--password, and delete-user/--delete-user all prompt on the terminal rather than taking everything as flags:

  • Create: asks for a username (flags invalid characters and offers a sanitized alternative), a password (enforcing a minimum length), and asks you if the new user should be an admin or not.
  • Update: walks through every role one at a time, showing its current state — press Enter to leave a role unchanged, or y/n to enable/disable it.
  • Password change: asks for the new password.
  • Delete: asks for a confirmation before removing the account.

This is deliberate: these commands touch credentials, and user input is mandatory. There is one exception to this, the unattended first run.