First Run — Setup CLI¶
VANTAGE follows the same initialization model as GLPI: the system ships with no default users and refuses to serve authenticated requests until an administrator account exists.
The setup:create-admin command is the only way to initialize a fresh installation.
How it works¶
When the backend starts, it checks whether any user with role: admin exists in the
database:
Admin found → normal boot, all endpoints available.
No admin found → the system enters uninitialized mode:
/health/readyreturnsHTTP 503(prevents load-balancers from routing traffic).All authenticated endpoints return
HTTP 503with an instructive message.Public endpoints (
/health,/api/auth/login) continue responding normally.The backend emits a log line with the exact command to run.
Running the setup command¶
Interactive mode (recommended for first install)¶
docker compose exec backend python bin/console setup:create-admin
Prompts:
Field |
Validation rules |
|---|---|
Full name |
1–128 characters |
Username |
Alphanumeric + underscores, 3–32 characters, unique in the database |
Valid e-mail format, unique in the database |
|
Password |
Minimum 12 characters (entered via |
Confirm password |
Must match the password field |
Language |
One of |
Non-interactive mode (CI/CD)¶
docker compose exec -T backend python bin/console setup:create-admin \
--name "Admin" \
--username admin \
--email admin@example.com \
--password "$(cat /run/secrets/admin_pass)" \
--lang pt \
--no-interaction
Caution
Never pass the password as a literal string in shell history.
Use $(cat /run/secrets/file) or a secrets manager.
What happens after setup¶
The admin account is created with an Argon2-hashed password.
The system transitions to initialized mode —
/health/readyreturns200.The command cannot be run again. If attempted:
[WARNING] System already initialized. This command cannot be run again.
The process exits with code
1.
Verifying initialization¶
curl -s http://localhost/health/ready | python -m json.tool
Before setup returns:
{"status": "not_initialized"}
After setup returns:
{"status": "ok"}