The configuration file
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:
.envin 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
| Setting | What it does | Default |
|---|---|---|
APP_ENV | production on a real server. Other values are for development and testing. | production |
APP_URL | The exact address in the browser, with https:// and without / at the end, for example https://portal.klaverveld.example. | required |
APP_KEY | The main key; see Keys and secrets on the server. | required |
APP_DEBUG | Error details in the browser. Never on in production. | false |
APP_TIMEZONE | The time zone for the calendar, reminders and the audit log. | Europe/Amsterdam |
APP_DEMO | Demo mode with fictional data (Try the demo). Never on a production server. | false |
APP_DEMO_PUBLIC | The 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_LOGIN | Only 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_SUITE | sodium 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_PROXIES | The 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_TOKEN | A 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_LEVEL | debug, info, warning or error. | info |
LOG_CHANNEL | file (in storage/logs/), stderr (for containers) or both. | file |
The database
| Setting | What it does | Default |
|---|---|---|
DB_CONNECTION | sqlite or mysql (also for MariaDB). | sqlite |
DB_DATABASE | With SQLite: the path to the file (outside the web folder). With MySQL: the name of the database. | storage/database.sqlite |
DB_HOST | The database server (MySQL only). | 127.0.0.1 |
DB_PORT | The port (MySQL only). | 3306 |
DB_USERNAME | The database user (MySQL only). | empty |
DB_PASSWORD | The password of that user (or DB_PASSWORD_FILE). | empty |
DB_SSL_CA | The CA file for an encrypted connection to a database on another server. | empty |
DB_SSL_CERT | A client certificate for the database, if it asks for one. | empty |
DB_SSL_KEY | The key of that client certificate. | empty |
DB_SSL_VERIFY | Check the certificate of the database server. Do not switch it off. | true as soon as DB_SSL_CA is set |
Saved sign-in details
| Setting | What it does | Default |
|---|---|---|
VAULT_KEKS | The keys for the saved passwords, as number:key, separated by commas; see Keys and secrets on the server. | required |
VAULT_KEK_ACTIVE | The 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.
| Setting | What it does | Default |
|---|---|---|
ENTRA_TENANT_ID | The tenant ID (Directory ID) of Microsoft Entra ID. | empty |
ENTRA_CLIENT_ID | The client ID (Application ID) of the app registration. | empty |
ENTRA_CLIENT_SECRET | The client secret (or ENTRA_CLIENT_SECRET_FILE). | empty |
ENTRA_CLIENT_SECRET_EXPIRES | When the secret expires (YYYY-MM-DD). Administrators are warned in time (Sign-in and sign-in systems). | empty |
ENTRA_REDIRECT_URI | The return address you register in Entra. | APP_URL + /auth/callback |
ENTRA_ALLOWED_TENANTS | Tenant IDs that may sign in, separated by commas. | your own tenant |
SSO_<KEY>_SECRET | The 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_TOTP | Temporary: 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 |
See Set up e-mail for examples with Microsoft 365 and other mail servers.
| Setting | What it does | Default |
|---|---|---|
MAIL_DRIVER | smtp, 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_HOST | The mail server. | empty |
MAIL_PORT | The port. | 587 |
MAIL_ENCRYPTION | tls (STARTTLS, port 587), ssl (port 465) or none (only for a relay on the same network). | tls |
MAIL_USERNAME | The account at the mail server, if it asks you to sign in. | empty |
MAIL_PASSWORD | The password of that account (or MAIL_PASSWORD_FILE). | empty |
MAIL_FROM | The sender address. | empty |
MAIL_FROM_NAME | The sender name. | the name of the portal |
The assistant
| Setting | What it does | Default |
|---|---|---|
ASSISTANT_AI_KEY | The key of the AI service, if the assistant may use an AI (Admin › Settings › Assistant). Empty = the assistant works without AI. | empty |
ASSISTANT_AI_HOSTS | The 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
| Setting | What it does | Default |
|---|---|---|
BACKUP_PATH | The folder for the backups (a full path). | storage/backups; install.sh sets /var/backups/bugsoft |
BACKUP_COPY_PATH | A second place, for example a mounted share of another system. Every backup is copied there too. | empty |
BACKUP_ENCRYPT_CERT | A certificate (PEM). Every backup is encrypted for it. The private key is never on the server. | empty |
BACKUP_EXTERNAL | true 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 |
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.envin the Bugsoft Portal folder.BUGSOFT_STORAGE_PATH: the folder for the data (uploads, log files, keys), if it is notstorage/.BUGSOFT_KEYS_PATH: the folder for the signing key of Bugsoft Connect, if it is notkeys/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.