alxpanel

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

  1. Lets the panel reach the agent, if /etc/alxpanel/agent.toml does not say who may. Values you set there are kept.
  2. Enables and starts the agent.
  3. Checks the panel's database is provisioned and migrated; starts the migration again if the last one failed.
  4. Enables and starts the panel's services.
  5. Gives admin a new one-time password, or creates admin when no administrator exists yet. Existing sessions of admin are signed out.
  6. 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:

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: