Admin CLI
The AirTrail Docker image comes with a built-in administrative CLI (airtrail-admin) for managing your instance directly from the command line. This is useful for tasks like resetting passwords when you're locked out of the web interface, or managing user roles.
Usage
Run commands inside a running AirTrail container using docker exec:
docker exec -it <container-name> airtrail-admin <command>Replace <container-name> with your AirTrail container name. If you used the default Docker Compose setup, this is typically airtrail.
For a list of available commands, run:
docker exec -it airtrail airtrail-admin helpCommands
list-users
Lists all users with their roles and account details.
docker exec -it airtrail airtrail-admin list-usersExample output:
Users (3):
Username Display Name Role OAuth ID
-------- ------------ ----- ----- ---------------
alice Alice Smith owner no abc123def456ghi
bob Bob Jones admin yes jkl789mno012pqr
charlie Charlie Lee user no stu345vwx678yzareset-password
Interactively reset any user's password. You will be prompted for the username and new password.
docker exec -it airtrail airtrail-admin reset-passwordThe -it flags are required for interactive commands, as they need access to
your terminal for input.
The password must be at least 8 characters long. Input is hidden and you will be asked to confirm the new password.
grant-admin
Promote a regular user to the admin role. You will be prompted for the username.
docker exec -it airtrail airtrail-admin grant-adminThe owner role cannot be changed. This command only works on users with the
user role.
revoke-admin
Demote an admin back to a regular user. You will be prompted for the username.
docker exec -it airtrail airtrail-admin revoke-adminversion
Print the current AirTrail version.
docker exec -it airtrail airtrail-admin versionLast updated on
