Skip to content

Create the first administrator

Before you begin

You need
  • Shell access to the host, as a user who may use Docker

Nothing in the app can make the first instance administrator, because only an administrator can make another. install creates the first one on the host, before anyone can reach the installation. This page also covers adding more later.

Name the administrator when you run install the second time, at a terminal, and type their password twice when it asks:

Terminal window
./mockhub install --admin-email admin@example.com

To pass the password from a script, add --admin-password-stdin and send it on standard input; the first line is used. It is never an argument, so it does not land in the shell’s history.

install keeps ingress closed until the installation has an administrator, so nobody can register an account first. Without --admin-email, it asks for the address at a terminal, and otherwise stops, still closed, with the command to run.

The address gets a new account that is an instance administrator, with its address already verified and its own personal workspace on the installation’s plan. They sign in at the app’s address with that password.

install creates a new account only. If an account already holds the address, install leaves it as it is and stops, with ingress closed; name another address, or promote that account on purpose.

Once an administrator exists, install asks for nothing more. If it was interrupted after creating the administrator, running it again carries on and opens ingress.

The administrator opens the Admin console from the app’s navigation, under Admin.

Once one exists, an instance administrator can make others in the app:

  1. Open Admin → Users.

  2. Select Edit in the person’s row.

  3. Turn on Platform administrator, and select Save user.

The person’s sessions end, and their administrator rights start when they sign in again.

On the host, app:admin:create does the same for an address, and creates the account when there is none. It also makes an existing account an administrator on purpose, which install never does:

Terminal window
./mockhub compose exec app php bin/console app:admin:create admin@example.com

A new account’s password is asked for, or read from standard input with --password-stdin. An existing account keeps its password and verification. Running it again changes nothing.

A new installation has no licence until you install one, and refuses changes until then. It still allows exactly one account to be created: the first administrator, while no account exists. The licence counts that account once it is installed. Every later account, administrator or not, takes an ordinary licence seat, and the command ends with the reason when none is free:

All 25 seats of this installation's licence are taken. Deactivate an account or install a licence with more seats.
  • app:admin:create needs the app running. ./mockhub status shows whether it is.
  • The address must be one MockHub accepts for an account, as signing up checks it, and the password is checked against known breaches, as everywhere. The registration mode does not apply: neither command is a sign-up.
  • --admin-email on an installed host changes nothing. install says so and carries on; use app:admin:create to add an administrator.
  • An instance administrator is not a workspace role. To work in a workspace, they are invited to it like anyone else, or use their own.

Report a problem with this page