Skip to content

Users and groups ​

[bootstrap.groups] and [bootstrap.users] declare local accounts on Linux and macOS, such as a service user and its groups. mise applies them before it writes system files, so a file can name an account from the same config as its owner.

Example ​

This creates a system user for a cache service, with its own group and read access to container logs through a second group:

[bootstrap.groups.mise-cache]
system = true

[bootstrap.groups.container-readers]
system = true

[bootstrap.users.mise-cache]
system = true
group = "mise-cache"
groups = ["container-readers"]
home = "/var/lib/mise-cache"
shell = "/usr/sbin/nologin"
comment = "mise cache service"
create_home = true

Preview the changes, then apply them:

sh
mise bootstrap accounts apply --dry-run
mise bootstrap accounts apply

For macOS, see On macOS.

Before you apply ​

Applying changes needs root. Unless you are already root, mise starts a privileged copy of itself with sudo. On Linux that copy runs the shadow-utils commands groupadd, groupmod, groupdel, useradd, usermod, and userdel. sudo can prompt for a password in an interactive terminal; otherwise mise needs passwordless sudo. system_packages.sudo = false forbids elevation, so only root can apply. Names reach these commands as arguments, never through a shell.

Minimal images may lack those commands, and mise then stops with required account command 'useradd' was not found. Install the package that provides them, such as shadow on Alpine. On macOS the copy runs dscl and dseditgroup instead; see On macOS.

Change existing accounts ​

mise manages only the fields you set and leaves the rest of an account as it is. Inspect the dry run before you change an account that already exists: UID, GID, and group changes affect the account database even for files outside this config.

  • uid and gid pin numeric IDs. If the requested ID belongs to another account, mise reports the resource as unknown and does not apply it.
  • On Linux, changing an existing user's uid or primary group runs usermod, which also re-owns that user's files inside the home directory and mail spool. Files elsewhere keep the old IDs, and mise does not rewrite them. macOS never renumbers an existing account; see On macOS.
  • On Linux, changing a group's gid updates the group database only.
  • system = true picks the system ID range when mise creates an account. It does not reclassify an account that already exists.
  • groups adds missing supplementary groups and keeps memberships that are not listed. With exclusive_groups = true, the list is exact, and groups = [] removes every supplementary membership.
  • Changing home updates only the account entry, unless you also set move_home = true to move the existing directory.
  • mise does not change the UID 0 user or the GID 0 group. One that differs from its declaration is reported as unknown, and apply fails.

How configs combine ​

When several config files declare the same user or group, the most local declaration is used as a whole; mise does not merge fields across files.

Within a run, mise creates and updates groups before users, and accounts before the system files and directories that name them as owner or group. Removals run in the other order: users before the groups they depend on. mise bootstrap plan shows these dependencies.

Remove users and groups ​

Deleting a declaration leaves the account in place. To remove an account, declare it absent:

[bootstrap.users.old-service]
state = "absent"
remove_home = true

[bootstrap.groups.old-service]
state = "absent"

mise keeps a user's home directory unless you set remove_home = true, which also deletes the mail spool. remove_home works only on Linux: on macOS, leave it out and delete the home directory yourself after the user is removed. mise refuses to remove UID 0, GID 0, or the user running mise, and the operating system's own checks still apply; for example, groupdel rejects a group that is still another user's primary group.

Preview and apply ​

sh
mise bootstrap accounts status
mise bootstrap accounts status --json
mise bootstrap accounts apply --dry-run
mise bootstrap accounts apply --yes

mise bootstrap applies accounts first, before every other part. To use a new account as a file owner with --only, include both parts: mise bootstrap --only accounts,files.

Reference ​

Account names use at most 32 ASCII letters, digits, _, or -, start with a letter or _, and may end with $. A user's group and groups may also name an existing group with dots, such as macOS's com.apple.access_ssh. Two present accounts of the same kind cannot declare the same uid or gid.

User fields:

FieldDefaultEffect
groupRequired, unless state = "absent"Primary group. Declare it in the same config or have it exist on the host
groupsNot managedSupplementary groups to add
exclusive_groupsfalseRemove supplementary groups that groups does not list; needs groups
uidNot managedNumeric user ID
homeNot managedHome directory, as an absolute path without ..
create_hometrue, or false with system = trueCreate the home directory for a new user
move_homefalseMove the existing home directory when home changes; needs home
shellNot managedLogin shell, as an absolute path without ..
commentNot managedComment (GECOS) field, or RealName on macOS, without : or line breaks
systemfalseCreate the user in the system ID range
state"present""absent" removes the user; it then takes only remove_home
remove_homefalseWith state = "absent", also delete the home directory and mail spool
hiddenNot managedmacOS only: hide the user from the login window and user lists

Group fields:

FieldDefaultEffect
gidNot managedNumeric group ID
systemfalseCreate the group in the system ID range
state"present""absent" removes the group; it then cannot set gid or system

On macOS ​

mise manages local accounts on macOS through Directory Services: the privileged copy runs dscl . to create, change, and delete user and group records and dseditgroup to change memberships, so the accounts land in the local node, as sysadminctl or System Settings would put them. This declares a service account for a LaunchDaemon:

[bootstrap.groups.mise-ci]
gid = 450

[bootstrap.users.mise-ci]
uid = 450
group = "mise-ci"
home = "/opt/mise-ci/home"
shell = "/usr/bin/false"
comment = "mise CI"
hidden = true

[bootstrap.directories."/opt/mise-ci/work"]
owner = "mise-ci"
group = "mise-ci"
mode = "0750"

One mise bootstrap creates the group, then the user, then the directory it owns. The account differs from one that macOS creates for a person:

  • It has no password (Password is *), so nobody can log in as it with a password; launchd's UserName key needs none, and mise never sets one. That does not block SSH public-key login, and a shell such as /usr/bin/false does not block port forwarding. To deny SSH, limit Remote Login to the com.apple.access_ssh group and leave the account out of it, or list the account in sshd's DenyUsers.
  • It is not an administrator. mise adds the user only to the groups in groups, so it joins admin only if you list admin.
  • hidden = true sets IsHidden, which keeps the account out of the login window and the Users & Groups list. hidden = false sets IsHidden to 0; other macOS settings, such as the login window's Hide500Users, can still hide the account.
  • With home set, mise creates that directory for a new user, mode 0700, owned by the user and its group, unless create_home = false. A directory that already exists is used as it is: mise does not change its owner or mode. Without home, the home directory is /var/empty, as for Apple's own service accounts.
  • A user or group that macOS finds only through a directory service, such as LDAP, and not in the local node shows as unknown: mise edits only local accounts. So does a user that would be created or changed with such a group as its primary group or in groups.

Some fields work differently on macOS:

  • uid and gid are required to create a user or group, because dscl does not choose IDs, and does not stop two records from sharing one. Pick an ID that no account uses: Apple's own accounts use IDs below 500 and add new ones in macOS updates, and people's accounts start at 501. If the ID is taken, mise reports the resource as unknown and does not apply it.
  • mise does not change the uid or gid of an existing account. A declaration whose ID differs from the account's is reported as unknown, and apply fails.
  • groups compares and adds direct memberships, the ones a group lists in GroupMembership. Memberships that macOS grants to every account, such as everyone and localaccounts, are neither listed nor compared.
  • If creating an account fails partway, mise deletes the half-written record, any group memberships it gained, and the home directory it just created if that is still empty, so the next run creates it again. Anything it could not undo is named in the error. A new user's home directory is created before its record.
  • Right before it writes, mise checks again that the record is still missing, that no other record has taken its UID or GID, that the primary group still has the planned GID, and that every group in groups is in the local directory node, which is the only one it edits. Before updating a user, it checks that the name still has the user's UID, and it adds only the memberships the user lacks at that moment. Two runs of mise never write accounts at the same time.
  • Removing a user also takes it out of every group that lists it. Removing a group fails while it is still a user's primary group.
  • system, exclusive_groups, move_home, and remove_home fail on macOS rather than being ignored. hidden fails on Linux.

On Windows ​

Accounts are supported on Linux and macOS only. On another platform, mise bootstrap, mise bootstrap status, and mise bootstrap plan ignore these declarations with a warning, so one config can serve several platforms, while the explicit mise bootstrap accounts commands fail instead of doing nothing. When a system file or directory names one of the ignored accounts as its owner or group, that field is ignored with a warning too; the file's content, mode, and any other owner or group are still applied.

See also ​

MIT LicenseCopyright © 2026jdx.dev