Install by hand

  • For IT
  • Bugsoft Portal 4.12.14

Set up Bugsoft Portal without install.sh: the order that works, the packages per system, and what you arrange yourself afterwards.

In short

  1. Install the packages.
  2. Unpack Bugsoft Portal and install it: on the command line, or with the wizard in the browser.
  3. Lock down the file permissions.
  4. Set up PHP-FPM and the web server.
  5. Arrange the scheduled tasks, backups and updates yourself.

Can you not use install.sh, or are you not allowed to? Then you set up the server yourself. Follow exactly this order: first install, then lock down the permissions. The installation writes the configuration file. If it cannot, it stops before anything changes.

1. Install the packages

Ubuntu 24.04:

sudo apt install php8.3-fpm php8.3-cli php8.3-sqlite3 php8.3-mysql php8.3-curl php8.3-mbstring php8.3-gd php8.3-opcache nginx

Oracle Linux 9 (also Rocky and Alma 9):

sudo dnf module reset -y php nginx
sudo dnf module enable -y php:8.3 nginx:1.24
sudo dnf install php-fpm php-cli php-pdo php-mysqlnd php-mbstring php-gd php-opcache nginx

Oracle Linux 8: the same with php:8.2. MariaDB on EL: dnf module enable mariadb:10.11 (the default version of EL9 is too old).

Never install php-sodium on Oracle Linux, Rocky, Alma or RHEL. That package is not in the sources of the system, and the whole dnf install then fails. Bugsoft Portal uses OpenSSL for encryption instead.

Set in PHP: upload_max_filesize = 6M, post_max_size = 8M, memory_limit = 256M and allow_url_fopen = Off.

2. Unpack and install

sudo mkdir -p /opt/bugsoft/releases
sudo tar -xzf bugsoft-<version>.tar.gz -C /opt/bugsoft/releases
sudo ln -sfn releases/bugsoft-<version> /opt/bugsoft/current
sudo useradd --system --home-dir /var/lib/bugsoft --shell /usr/sbin/nologin bugsoft
sudo install -d -o bugsoft -g bugsoft -m 0750 /var/lib/bugsoft
sudo install -d -o root -g bugsoft -m 0770 /etc/bugsoft
cd /var/lib/bugsoft
sudo runuser -u bugsoft -- env BUGSOFT_ENV_FILE=/etc/bugsoft/bugsoft.env BUGSOFT_STORAGE_PATH=/var/lib/bugsoft \
  php /opt/bugsoft/current/bin/console install --accept-terms --db=sqlite \
  --url=https://portal.klaverveld.example --admin-email=emergency@klaverveld.example \
  --credentials-file=/var/lib/bugsoft/emergency-account.txt

Then lock down the permissions and move the emergency account file away:

sudo chmod 0750 /etc/bugsoft
sudo chown root:bugsoft /etc/bugsoft/bugsoft.env && sudo chmod 0640 /etc/bugsoft/bugsoft.env
sudo mv /var/lib/bugsoft/emergency-account.txt /root/ && sudo chmod 0600 /root/emergency-account.txt

Put APP_KEY and VAULT_KEKS from /etc/bugsoft/bugsoft.env in your password vault right away.

Or: install in the browser

Instead of bin/console install you can use the wizard in the browser. First set up the web server (step 3). Then open the address of Bugsoft Portal: as long as Bugsoft Portal is not installed, every page goes to /install. With Back you go back without losing anything.

  1. Welcome: enter the installation token. It is on the server, in install.token in the data folder (here /var/lib/bugsoft/install.token). So only someone with access to the server can install.
    Step 1: the install token
  2. Requirements: PHP, the extensions and the writable folders must be green. Orange is allowed, but fix HTTPS before you really use Bugsoft Portal.
    Step 2: the system requirements
  3. Database: SQLite (a path outside the web folder) or MySQL/MariaDB, with Test connection. The database must be empty.
    Step 3: the database
  4. Application: the address (always https:// in production), the name, the language, the time zone, the trusted proxies and, if you like, e-mail.
    Step 4: address, name, language, time zone and email
  5. Microsoft Entra ID (optional): the tenant ID, client ID, client secret and its expiry date. No Microsoft 365, or not ready yet? Click Set up later: you set up Microsoft, Google, Okta or another sign-in afterwards on Connections (Sign in with Microsoft Entra ID).
    Step 5: Microsoft Entra ID
  6. Keys: Bugsoft Portal makes APP_KEY, VAULT_KEKS and CRON_TOKEN. Download the configuration file and put it in your password vault (Keys and secrets on the server).
    Step 6: the keys and their fingerprints
  7. Emergency account: name, e-mail address, a password of at least 14 characters, and the QR code for the authenticator app.
    Step 7: the emergency account with the QR code for the authenticator app
  8. Demo data: choose an empty installation, optionally with the Microsoft 365 tiles. Never use demo data for real data.
    Step 8: empty installation or demo data
  9. Organisation: the name of your organisation.
    Step 9: the name of the organisation
  10. Licence: the trial or a licence key, and the tick box for the licence terms (The licence).
    Step 10: trial period or licence key, and the terms
  11. Finish: check the overview and choose Install.
    Step 11: the summary and Install

After that the installation is locked, the token is gone, and /install returns a 404. The last page shows the line for cron. Then lock down the permissions as described above.

Installation complete, with the cron line

3. Set up PHP-FPM and the web server

  • A PHP-FPM pool of its own that runs as bugsoft, with env[BUGSOFT_ENV_FILE] = /etc/bugsoft/bugsoft.env and env[BUGSOFT_STORAGE_PATH] = /var/lib/bugsoft.
  • nginx: the example the vendor supplies, with root /opt/bugsoft/current/public.
  • Apache: DocumentRoot /opt/bugsoft/current/public, AllowOverride All, and PHP through PHP-FPM (SetHandler "proxy:unix:/run/php/bugsoft.sock|fcgi://bugsoft-fpm"), never through mod_php.
  • SELinux (EL): semanage fcontext -a -t httpd_sys_content_t '/opt/bugsoft(/.*)?', semanage fcontext -a -t httpd_sys_rw_content_t '/var/lib/bugsoft(/.*)?', restorecon -R /opt/bugsoft /var/lib/bugsoft and setsebool -P httpd_can_network_connect 1.

4. What you arrange yourself

  • Run cron:run every minute as the user bugsoft.
  • Backups: with SQLite, Bugsoft Portal makes them itself (backup:run, every night). With MariaDB you make a dump yourself, plus a copy of /var/lib/bugsoft/uploads and /var/lib/bugsoft/keys. See Backups and restoring.
  • Updates: unpack the new version in a new folder next to the old one, point the link /opt/bugsoft/current to it, run migrate, cache:clear and modules:check, and reload PHP-FPM.

With install.sh all of this happens by itself; see Install with install.sh.

Stuck? See Questions and problems or contact Bugsoft at ugurs156@gmail.com.