Configuration

Database connection

After installation, configuration is stored in config/local/config.local.ini.

Environment variables

tirreno can be configured via environment variables or config file settings. Environment variables take precedence over config file settings and are useful for Docker/Heroku deployments.

Required settings:

SettingEnv VariableConfig KeyDescription
DatabaseDATABASE_URLDATABASE_URLPostgreSQL connection string (e.g., postgres://user:pass@host:5432/dbname)
Site URLSITESITEBase URL for the application (e.g., https://tirreno.example.com)
PepperPEPPERPEPPERPassword pepper for secure hashing (random string, keep secret)

Optional settings:

SettingEnv VariableConfig KeyDefaultDescription
Admin emailADMIN_EMAILADMIN_EMAILAdministrator email address
SMTP loginMAIL_LOGINMAIL_LOGINSMTP username for sending emails
SMTP passwordMAIL_PASSMAIL_PASSSMTP password
Enrichment APIENRICHMENT_APIENRICHMENT_APIhttps://api.tirreno.comEnrichment API endpoint
Force HTTPSFORCE_HTTPSFORCE_HTTPSfalseForce HTTPS redirects
Forgot passwordALLOW_FORGOT_PASSWORDALLOW_FORGOT_PASSWORDfalseEnable forgot password feature
Show email/phoneALLOW_EMAIL_PHONEALLOW_EMAIL_PHONEfalseEnable email/phone display
Logbook limitLOGBOOK_LIMITLOGBOOK_LIMIT3000Maximum logbook entries to retain

Config file only settings (config/config.ini):

Config KeyDefaultDescription
DEBUG0Debug mode (0=off, 1-3=verbosity levels)
SEND_EMAIL1Enable email sending
SMTP_DEBUG0SMTP debug output
MIN_PASSWORD_LENGTH8Minimum password length

Cronjob setup

tirreno uses a built-in cron system. Jobs are configured in config/crons.ini and invoked through a single cron entry:

System crontab entry (run every 10 minutes):

*/10 * * * * /usr/bin/php /absolute/path/to/tirreno/index.php /cron

Built-in cron jobs (config/crons.ini):

JobScheduleDescription
enrichmentQueueHandlerEvery minuteProcess IP/email/phone enrichment
riskScoreQueueHandlerEvery minuteCalculate user risk scores
batchedNewEventsEvery minuteProcess new incoming events
blacklistQueueHandlerEvery minuteProcess blacklist updates
deletionQueueHandlerEvery minuteHandle data deletion requests
notificationsHandlerEvery minuteSend alert notifications
totalsEvery minuteUpdate dashboard statistics
logbookRotation0-10 Rotate logbook entries
retentionPolicyViolations0-10 0 *Check retention policy daily
queuesClearer0-10 0 2Clear stale queues weekly

Verify cron is running:

# Check cron service
systemctl status cron

# View tirreno cron logs
tail -f /var/log/tirreno-cron.log

# Run cron manually to test
/usr/bin/php /absolute/path/to/tirreno/index.php /cron
________________________________________________________________________________