navidrome user

Create, edit, list, and delete users

The user commands create, edit, list, and delete Navidrome users.

These commands need at least one admin user in the database. On a new install, create the first admin in the web UI.

Usage

navidrome user <subcommand> [flags]

All commands also accept the global flags.

Subcommands

SubcommandAliasDescription
createcCreate a user
editeChange a user
listList users
deletedDelete a user

user create

Creates a user. The command asks for the password twice. Press Enter with no password to cancel. There is no flag for the password, so run the command in a terminal. With docker run, add -it.

navidrome user create --username <username> [flags]

Without --library-ids, the user can access all libraries. Admins can always access all libraries, so the command ignores --library-ids when you pass --admin. If a library ID doesn’t exist, the command fails and creates nothing.

Flags

FlagDefaultDescription
-u, --usernameUsername to log in with. Required
--nameThe usernameDisplay name of the user
-e, --emailEmail address of the user
-a, --adminfalseMake the user an admin
-i, --library-idsAll librariesComma-separated IDs of the libraries the user can access

Examples

# Create an admin user
navidrome user create --username alice --email [email protected] --admin

# Create a regular user who can access libraries 1 and 3 only
navidrome user create --username bob --name "Bob Smith" --library-ids 1,3

user edit

Changes a user. Find the user by username or ID, then pass the flags for what you want to change. If nothing changes, the command says so.

navidrome user edit --user <username-or-id> [flags]

Some flags come in pairs, and you can’t use both flags of a pair in one call. The pairs are --set-admin and --set-regular, --email and --remove-email, and --name and --remove-name.

--set-admin gives the user access to all libraries. --set-regular keeps the libraries the user has, so add --library-ids to limit them.

Flags

FlagDefaultDescription
-u, --userUsername or ID of the user to change. Required
--set-adminfalseMake the user an admin
--set-regularfalseMake the user a regular user
--set-passwordfalseAsk for a new password
-e, --emailNew email address
--remove-emailfalseClear the email address
--nameNew display name
--remove-namefalseClear the display name
-i, --library-idsComma-separated IDs of the libraries the user can access. Replaces the current list. Ignored with --set-admin

Examples

# Make an admin a regular user
navidrome user edit --user alice --set-regular

# Change a password. The command asks for the new one
navidrome user edit --user alice --set-password

# Limit a user to libraries 1 and 2
navidrome user edit --user bob --library-ids 1,2

user list

Lists all users. The CSV output has these columns: user id, username, user’s name, user email, admin, created at, updated at, last access, last login, and libraries. The libraries column lists each library as id:path, separated by |.

navidrome user list [-f csv|json]

Flags

FlagDefaultDescription
-f, --formatcsvOutput format. One of csv, json

Examples

# List users as CSV
navidrome user list

# List users as JSON
navidrome user list --format json

user delete

Deletes a user. The command doesn’t ask for confirmation. It won’t delete the last user.

navidrome user delete --user <username-or-id>

Flags

FlagDefaultDescription
-u, --userUsername or ID of the user to delete. Required

Examples

navidrome user delete --user alice