The bugsoft command
Every admin task on the server goes through sudo bugsoft: the commands of Bugsoft Portal itself, plus update, backup, restore, status, keys and uninstall.
A server set up with install.sh has one command for all admin tasks: bugsoft.
Always use sudo bugsoft …. Never run php bin/console as root: files then become
owned by root, and Bugsoft Portal can no longer use them.
Each command with --help after it explains what it does. sudo bugsoft list shows all commands with
their options.
Server commands
These commands belong to the server set-up of install.sh.
| Command | What it does |
|---|---|
sudo bugsoft status | Is everything all right? See Check and monitor the server. |
sudo bugsoft update --latest | Download the newest version that the licence check names, check it and install it (--yes: do not ask); see Update Bugsoft Portal. |
sudo bugsoft update PACKAGE | Install a new version from a downloaded package; see Update Bugsoft Portal. |
sudo bugsoft backup | Make a backup now; see Backups and restoring. |
sudo bugsoft restore DATE | Restore a backup (--list, --keys, --decrypt-key). |
sudo bugsoft keys | Confirm that the keys are in your password vault. |
sudo bugsoft uninstall | Remove Bugsoft Portal from the server; see Stop using Bugsoft Portal. |
Bugsoft Portal commands
All other commands go to Bugsoft Portal itself. They run as the user bugsoft, with the settings from
/etc/bugsoft/bugsoft.env.
Checks and help
| Command | What it does |
|---|---|
sudo bugsoft production:check | The checklist (with --json for scripts); see Check and monitor the server. |
sudo bugsoft license:status | The licence: status, plan, users and end date. |
sudo bugsoft license:latest | The newer version this installation may download, from the last licence check: version, SHA-256, link and until when it works (--check: check first; --json for scripts). Installs nothing; see Update Bugsoft Portal. |
sudo bugsoft license:install BH1.… | Check and save a licence key (or --file=PATH); see The licence. |
sudo bugsoft mail:test ADDRESS | Send a test e-mail; see Set up e-mail. |
sudo bugsoft support:report | A file with support details, without passwords, keys or e-mail addresses (--with-logs, --out=PATH); see Get help and support details. |
sudo bugsoft audit:verify | Check that the audit log has not been changed; see The audit log. |
sudo bugsoft entra:check | Test the connection with Microsoft Entra ID: tenant, app, secret and permissions (--brief for one line). |
sudo bugsoft permissions:list | All permissions, with their module, an explanation and the roles that have them. |
sudo bugsoft modules:check | Check that the parts of Bugsoft Portal are in order (after an update this should show nothing). |
Administrators and the emergency account
| Command | What it does |
|---|---|
sudo bugsoft admin:grant ADDRESS | Make an account from the sign-in system an administrator, now or at its first sign-in (--role=, default superadmin). |
sudo bugsoft breakglass:create | Create an emergency account (password and required TOTP; --email=, --name=); see The emergency account. |
sudo bugsoft breakglass:list | List all emergency accounts. |
sudo bugsoft breakglass:reset-totp ADDRESS | Give the emergency account a new authenticator key. |
sudo bugsoft breakglass:disable ADDRESS | Switch off an emergency account and end its sessions. |
sudo bugsoft seed:production | Set the basis for production again: migrations, optionally the name and language, and one emergency account if there is none (--admin=ADDRESS, --starter=microsoft365; --fresh first empties everything, with a backup). |
sudo bugsoft starter:install microsoft365 | Add the starter set with tiles for Microsoft 365. Running it again puts back starter content that was removed. |
Keys
| Command | What it does |
|---|---|
sudo bugsoft key:generate | A new APP_KEY, only for a new installation; see Keys and secrets on the server. |
sudo bugsoft vault:keygen | Make a new key (KEK) for the saved sign-in details; see Keys and secrets on the server. |
sudo bugsoft vault:rotate-kek | Encrypt everything again with the active KEK (after changing VAULT_KEK_ACTIVE). |
sudo bugsoft vault:rotate-dek NUMBER | Give one store of sign-in details a new data key, and encrypt everything in it again. |
sudo bugsoft vault:knop-key | Make the key for your own Bugsoft Connect package and show the values for Intune (--rotate only after misuse); see Your server's own package. |
Data and settings
| Command | What it does |
|---|---|
sudo bugsoft config:export FILE | Export the settings as JSON (--sections=a,b), for example from the test environment. |
sudo bugsoft config:import FILE --dry-run | See what an import changes; then run it without --dry-run. See A test environment and production. |
sudo bugsoft backup:run | Make a backup now with the PHP backup of Bugsoft Portal (SQLite). On an install.sh server, use sudo bugsoft backup. |
sudo bugsoft backup:list | List the backups of the PHP backup. |
sudo bugsoft backup:restore NAME --force | Restore a backup of the PHP backup. The current state is saved first (--database-only). With install.sh: sudo bugsoft restore. |
sudo bugsoft directory:sync | Update the names of the Microsoft Entra groups through Microsoft Graph (--dry-run to look first). |
sudo bugsoft stats:aggregate | Summarise the statistics of a day (--day=) or a period (--from= --to=) again. Cron does this every night. |
sudo bugsoft retention:prune | Delete statistics and sign-ins past their retention period now (--dry-run to look first). Cron does this too. |
sudo bugsoft cache:clear | Empty the cache. |
sudo bugsoft cron:run | Run the scheduled tasks that are due. The server starts this every minute by itself (Check and monitor the server). |
The database and the installation
| Command | What it does |
|---|---|
sudo bugsoft migrate | Run pending database changes (an update does this by itself). |
sudo bugsoft migrate:status | Show which database changes have been made. |
sudo bugsoft migrate:rollback | Undo the last database changes (--steps=). Only when support asks you to: restoring a backup is usually better. |
sudo bugsoft install:lock | Lock the installation: checks the configuration file, the database and the migrations, and removes install.token. |
php bin/console install | Install Bugsoft Portal without a browser; install.sh uses this itself. See Install by hand. |
For the demo and for developers
These commands do not belong on a production server.
| Command | What it does |
|---|---|
php bin/console demo:reset | Rebuild the database and fill the fictional demo world (only in demo mode); see Try the demo. |
php bin/console demo:seed | Fill the demo world (--modules=a,b, only in demo mode). |
php bin/console demo:check | Check that the demo works. |
php bin/console migrate:fresh | Drop all tables and start again; refuses in production. |
php bin/console serve | Start the development server (--port=, --host=). |
php bin/console test | Run the tests (only in the source code, not in the package). |
php bin/console list | All commands (on the server: sudo bugsoft list). |
Without install.sh
On a server you set up by hand (Install by hand), use this instead of bugsoft:
sudo -u <web user> php /path/to/bugsoft/bin/console <command>
Stuck? See Questions and problems or contact Bugsoft at ugurs156@gmail.com.