alxpanel-setup
Makes an installed panel usable and prints the sign-in address with a one-time password.
The install runs this once by itself. Run it again, as root, whenever you need a new one-time password for admin, or after fixing something the install complained about. It never asks questions and is safe to repeat.
Usage
alxpanel-setup
There are no options for use by hand. (--first-install is what the package's own install script passes.)
What it does
- Lets the panel reach the agent, if
/etc/alxpanel/agent.tomldoes not say who may. Values you set there are kept. - Enables and starts the agent.
- Checks the panel's database is provisioned and migrated; starts the migration again if the last one failed.
- Enables and starts the panel's services.
- Gives
admina new one-time password, or createsadminwhen no administrator exists yet. Existing sessions ofadminare signed out. - Checks the server is ready and prints the result.
Output
==========================================================================
alxpanel is ready
URL: https://203.0.113.10:8443/admin
Login: admin
Password: k7RwTq3mVx9NpL2cHd8Z (one-time: you choose a new one at first sign-in)
The certificate is self-signed; your browser will warn once.
Lost this? Run 'alxpanel-setup' as root for a new password.
==========================================================================
Ready means the agent and the panel's services run, the web servers, MariaDB and PHP run, and /srv/hosting is mounted with project quotas. Otherwise the first line reads alxpanel is installed, but with problems: and each problem follows, with the command that shows more:
<unit> is not running: see 'journalctl -u <unit>', for the agent and the panel;<unit> is not running, so the hosted sites (or phpMyAdmin) do not work: see 'journalctl -u <unit>', for nginx, Apache, MariaDB and PHP.alxpanel-setupchecks these but does not start them: usesystemctl start <unit>;/srv/hosting is not mounted with project quotas, so accounts cannot be created: see Customer storage.
When the panel itself is not running, no sign-in is shown.
When there is no user named admin
If administrators exist but none is called admin, nothing is changed, and the output shows the command that resets one administrator's password:
runuser -u alxpanel -- php84 /usr/share/alxpanel/panel/artisan hosting:set-password <login-or-email>
Exit codes
| Exit code | Meaning |
|---|---|
| 0 | The server is ready. |
| 1 | Something is not ready, and the output says what. Also: not run as root, or an unknown argument. |
Two failures stop it before the summary:
panel database not ready: run 'alxpanel-provision-db', then 'alxpanel-setup'panel database not migrated: see 'journalctl -u alxpanel-panel-migrate', fix the cause, then run 'alxpanel-setup' again