The configuration file

  • For IT
  • Bugsoft Portal 4.12.14

Every setting in .env (or bugsoft.env): what it does, its default, and when you need it.

The server settings are in one file, with lines like NAME=value:

  • with install.sh: /etc/bugsoft/bugsoft.env;
  • with a manual installation: .env in the Bugsoft Portal folder, outside the web folder.

The installation package has an example: .env.example. Most settings of the portal itself are not here, but in Settings.

After a change in the file, reload PHP-FPM: sudo systemctl reload php-fpm (the name differs per system, for example php8.3-fpm), or restart the container.

A value in the environment of the process wins over the file. A secret can also come from a file, with <NAME>_FILE (Keys and secrets on the server). Keep the file at chmod 600.

The application

SettingWhat it doesDefault
APP_ENVproduction on a real server. Other values are for development and testing.production
APP_URLThe exact address in the browser, with https:// and without / at the end, for example https://portal.klaverveld.example.required
APP_KEYThe main key; see Keys and secrets on the server.required
APP_DEBUGError details in the browser. Never on in production.false
APP_TIMEZONEThe time zone for the calendar, reminders and the audit log.Europe/Amsterdam
APP_DEMODemo mode with fictional data (Try the demo). Never on a production server.false
APP_DEMO_PUBLICThe demo, safe on the internet: visitors change nothing that others see. Only together with APP_DEMO=true, never with APP_ENV=production.false
APP_DEMO_LOGINOnly in demo mode: false keeps the made-up data but removes Demo from the sign-in page, so nobody signs in as a demo person. Only the emergency account and the people who sign in with your sign-in system get in. For a demo with its own people, for example a hosted trial. The online demo (APP_DEMO_PUBLIC) always has the demo people.true
CRYPTO_SUITEsodium or openssl. Fixed as soon as anything is encrypted: never change it. See Encryption and keys.sodium if PHP has that extension, otherwise openssl
TRUSTED_PROXIESThe IP addresses or networks (CIDR) of the reverse proxy or load balancer, separated by commas. Bugsoft Portal only trusts the X-Forwarded-* headers from these addresses. See HTTPS, proxy and load balancer.empty
CRON_TOKENA secret for POST /cron/run (header X-Cron-Token), for when you have no cron on the server. Empty = this call is off. See Check and monitor the server.empty
LOG_LEVELdebug, info, warning or error.info
LOG_CHANNELfile (in storage/logs/), stderr (for containers) or both.file

The database

SettingWhat it doesDefault
DB_CONNECTIONsqlite or mysql (also for MariaDB).sqlite
DB_DATABASEWith SQLite: the path to the file (outside the web folder). With MySQL: the name of the database.storage/database.sqlite
DB_HOSTThe database server (MySQL only).127.0.0.1
DB_PORTThe port (MySQL only).3306
DB_USERNAMEThe database user (MySQL only).empty
DB_PASSWORDThe password of that user (or DB_PASSWORD_FILE).empty
DB_SSL_CAThe CA file for an encrypted connection to a database on another server.empty
DB_SSL_CERTA client certificate for the database, if it asks for one.empty
DB_SSL_KEYThe key of that client certificate.empty
DB_SSL_VERIFYCheck the certificate of the database server. Do not switch it off.true as soon as DB_SSL_CA is set

Saved sign-in details

SettingWhat it doesDefault
VAULT_KEKSThe keys for the saved passwords, as number:key, separated by commas; see Keys and secrets on the server.required
VAULT_KEK_ACTIVEThe number of the key that Bugsoft Portal uses now.1

Sign-in

You can also set up Microsoft Entra ID and other sign-in systems in Admin › Settings › Sign-in › Connections, without this file. If a value is set here, it wins, and the page only shows it.

SettingWhat it doesDefault
ENTRA_TENANT_IDThe tenant ID (Directory ID) of Microsoft Entra ID.empty
ENTRA_CLIENT_IDThe client ID (Application ID) of the app registration.empty
ENTRA_CLIENT_SECRETThe client secret (or ENTRA_CLIENT_SECRET_FILE).empty
ENTRA_CLIENT_SECRET_EXPIRESWhen the secret expires (YYYY-MM-DD). Administrators are warned in time (Sign-in and sign-in systems).empty
ENTRA_REDIRECT_URIThe return address you register in Entra.APP_URL + /auth/callback
ENTRA_ALLOWED_TENANTSTenant IDs that may sign in, separated by commas.your own tenant
SSO_<KEY>_SECRETThe client secret of another sign-in system. <KEY> is the short name on Connections in capitals, with _ for -, for example SSO_WINKELS_SECRET.empty
BREAKGLASS_SKIP_TOTPTemporary: the emergency account signs in with the password only, without a code. Switch it off again as soon as the authenticator is linked (Check and monitor the server).false

E-mail

See Set up e-mail for examples with Microsoft 365 and other mail servers.

SettingWhat it doesDefault
MAIL_DRIVERsmtp, log (only in the log file) or off.smtp if MAIL_HOST is set, otherwise off (with APP_ENV demo, local or testing: log). The public demo never sends mail.
MAIL_HOSTThe mail server.empty
MAIL_PORTThe port.587
MAIL_ENCRYPTIONtls (STARTTLS, port 587), ssl (port 465) or none (only for a relay on the same network).tls
MAIL_USERNAMEThe account at the mail server, if it asks you to sign in.empty
MAIL_PASSWORDThe password of that account (or MAIL_PASSWORD_FILE).empty
MAIL_FROMThe sender address.empty
MAIL_FROM_NAMEThe sender name.the name of the portal

The assistant

SettingWhat it doesDefault
ASSISTANT_AI_KEYThe key of the AI service, if the assistant may use an AI (Admin › Settings › Assistant). Empty = the assistant works without AI.empty
ASSISTANT_AI_HOSTSThe hosts that may receive the key, separated by commas. If you use your own AI, put its host here. See Outbound connections.api.anthropic.com

Backups

SettingWhat it doesDefault
BACKUP_PATHThe folder for the backups (a full path).storage/backups; install.sh sets /var/backups/bugsoft
BACKUP_COPY_PATHA second place, for example a mounted share of another system. Every backup is copied there too.empty
BACKUP_ENCRYPT_CERTA certificate (PEM). Every backup is encrypted for it. The private key is never on the server.empty
BACKUP_EXTERNALtrue if the server makes the backups itself (sudo bugsoft backup of install.sh). The PHP backup of Bugsoft Portal then does nothing.false; install.sh sets true

See Backups and restoring.

Only in the server environment

These are not in the file itself, but in the environment of PHP-FPM or the container. install.sh sets the first two for you.

  • BUGSOFT_ENV_FILE: the path to the configuration file, if it is not .env in the Bugsoft Portal folder.
  • BUGSOFT_STORAGE_PATH: the folder for the data (uploads, log files, keys), if it is not storage/.
  • BUGSOFT_KEYS_PATH: the folder for the signing key of Bugsoft Connect, if it is not keys/ in the data folder. A server normally leaves it empty. The demo and the test runs use it to keep their key outside the project folder. Backups take the key from this folder and put it back there.

The licence and its online check have no setting in the configuration file: they come with the package of Bugsoft. See The licence.

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