Skip to content

CLI setup

Nicholas K. Dionysopoulos edited this page Jun 4, 2026 · 6 revisions

IMPORTANT! This installation method is meant for expert users only.

You can install Akeeba Panopticon using the command-line, e.g. as part of a deployment using Ansible, Puppet, etc. It can also come in handy if the person installing Panopticon does not have access to the web interface itself, e.g. a contractor deploying Panopticon to an Intranet over a tunnelled SSH connection.

Below, you can find the discrete installation steps and the relevant commands.

Create a configuration file

Before you start installing Akeeba Panopticon you need to create a MySQL database, and a user which can access it. The database user needs to have the following privileges on this database: ALTER, CREATE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EXECUTE, INDEX, INSERT, LOCK TABLES, REFERENCES, SELECT, SHOW VIEW, UPDATE.

Then, you need to run the following command:

php cli/panopticon.php config:create --driver mysqli --host localhost --user USER --password PASS --name DBNAME \
    --prefix "ak_"

The driver can be one of mysqli (using the PHP mysqli / mysqlnd extension) or pdomysql (using the PHP pdo extension).

The rest of the parameters are your database connection parameters.

The prefix must be one to five lowercase alphanumeric characters (a-z, 0-9) followed by an underscore. It does not have any special meaning. It's used to allow Panopticon to be installed alongside other software sharing the same database.

Upon successful execution of this command the config.php file will be created in Panopticon's installation root.

Create the database tables

Run the command

php cli/panopticon.php database:update

This will automatically connect to the database and create the necessary database tables.

Tip: You can use the same command after updating Panopticon to update the database tables, if necessary. The database:update command is idempotent.

Create an administrator user

You need to create a user to access Akeeba Panopticon's web interface. For example:

php cli/panopticon.php user:create --username=admin --password="MyP@s5w0rD" --name "Super Administrator" --email="foo@example.com"

Tip: If you omit the --password parameter you will be asked to type in your password. If you are using an automation script you can feed the password and a newline character to STDIN (standard input) in this case. This is a more secure alternative to having your password logged in the deployment log.

Update the CRON jobs timing settings

Assuming that you will be running the Panopticon CRON jobs from a CLI context, run the following command:

php cli/panopticon.php config:maxtime:test

You will then need to run:

php cli/panopticon.php config:set max_execution 180
php cli/panopticon.php config:set finished_setup true

the number (180 in the example) being the maximum number of seconds reported by the previous command.

Set up the CRON job

Finally, set up a CRON job which runs every minute. For example, add the following to your crontab file:

* * * * * /path/to/php /path/to/panopticon/cli/panopticon.php task:run --loop

where /path/to/php is the absolute path to the PHP-CLI executable and /path/to/panopticon is the absolute path to where Panopticon has been installed. The --loop option keeps the process alive between CRON invocations, greatly reducing the latency between a task being scheduled and it actually running. See CRON Jobs for a full explanation.

Tip: You can automate the creation of the CRON job using the following shell code:

crontab -u myuser -l > mycron
echo "* * * * * /path/to/php /path/to/panopticon/cli/panopticon.php task:run --loop" >> mycron
crontab -u myuser mycron
rm mycron

where myuser is the username under which you want the CRON job to run, /path/to/php is the absolute path to the PHP-CLI executable, and /path/to/panopticon is the absolute path to where Panopticon has been installed.

Further CLI commands

The commands above are the minimum required for installation. Panopticon's CLI also provides commands for managing sites, users, groups, tasks, backup schedules, scanner schedules, mail templates, and more — useful for scripting or automated deployments.

For a full reference with examples and use cases, see:

  • CLI Reference — invocation, output formats, exit codes, and namespace index
  • CLI configconfig:* and database:*: system configuration and schema management
  • CLI sitesite:*: adding, configuring, and operating managed sites
  • CLI user and groupuser:* and group:*: account and access control management
  • CLI task and schedulestask:*, backup:schedule:*, scanner:schedule:*: task engine and per-site schedules
  • CLI maintenancemailtemplate:*, selfupdate:*, log:*: email templates, self-update, and log rotation

To see all available commands and their options, run:

php cli/panopticon.php list

To see help for a specific command, run:

php cli/panopticon.php help <command>

For example: php cli/panopticon.php help site:add

Getting Started

Installation

Using Panopticon

Administration

How it works

For Experts

Installation and updates

Customisation

CLI Reference

Reference

JSON API

Translation

Miscellaneous

Clone this wiki locally