User Management
New as of 1.3
users:create <user> [<password>] # Create a user
users:destroy <user> # Destroy a user
users:list # List all users
users:refresh-reset-token <user> # Refresh the password reset token for a user
users:report [<user>] # Gets info for a user
Usage
Users are a Dokku Pro construct that build on top of the ssh-keys
Dokku functionality. Users created via the users:add
command are automatically mapped to the corresponding ssh key added via the ssh-keys:add
command. Users can additionally log into the Dokku Pro UI and interact with the Dokku Pro API, granting them access to any functionality granted to them via their respective teams.
Installing the users plugin
The users plugin requires enabling the teams plugin
Before usage, the users plugin must be installed via the following commands:
# make the plugin available for dokku
sudo dokku-pro teams:install
# enable the teams plugin in dokku
sudo dokku plugin:enable teams
# enable the users plugin in dokku
sudo dokku plugin:enable users
# enable integration with dokku
sudo dokku teams:enable
Special users
The admin
and dokku
users are considered special, root-level users, and cannot be added or removed. A password can be associated with these users, and ssh-keys will also be associated with the users appropriately
In addition to the aforementioned users, the Dokku Pro UI generally comes configured with a single root user. By default, this username is root
, and may be reconfigured via environment variable. See the configuration documentation for more details.
Adding users
By default, only admins can create users. The user commands can be added to a given team.
To add a user, run the users:add
command. This command takes a username and an optional password.
If no password is specified, a reset token will be written to the user's record, and a message similar to the following will be printed to the screen. Users can be given the reset URL to reset their password directly in a secure fashion.
Password not specified for user, please have user browse to https://admin.dokku.me/auth/reset?token=ztYsYDzGAl to set an initial password
Destroying users
A user can be removed from Dokku Pro via the users:destroy
command. Note that only the user is removed - the ssh-key must be separately removed from Dokku via the ssh-keys:remove
command.
-----> Destroying camilla...
! Skipping ssh-key removal for user, run 'dokku ssh-keys:remove camilla' to remove ssh-keys
Listing users
Warning
This command does not include the default root user configured for Dokku Pro, and will only include those explicitly added via users:create
.
Users can be listed using the users:list
command.
Refreshing the password reset token for a user
The password reset token can be refreshed for a user using the users:refresh-reset-token
command. This command will refresh the password reset token for the user, and print the new refresh url to the screen.
-----> Refreshing password reset token for camilla...
Password reset token refreshed for user, please have user browse to https://admin.dokku.me/auth/reset?token=bowYpDyPCv to set a password