Skip to main content

BillaBear Environment Variables

BillaBear uses environment variables for configuration. Some variables are required for the system to function, while others are optional and can be used to override default settings.

The "Since" column indicates the version of BillaBear in which the variable was introduced.

Core Configuration

Environment VariableDescriptionRequiredDefaultSince
APP_SECRETA unique string used by Symfony for security purposesYesNone
DATABASE_URLThe DSN (connection string) for database accessYesNone
MESSENGER_TRANSPORT_DSNSymfony Messenger DSN for background processing configurationNodoctrine://default

Payment Processing

Environment VariableDescriptionRequiredDefaultSince
STRIPE_PRIVATE_API_KEYSecret API key for StripeYesNone
STRIPE_PUBLIC_API_KEYThe publishable API key for StripeYesNone

Email Configuration

Environment VariableDescriptionRequiredDefaultSince
MAILER_DSNThe Symfony Mailer DSN used for system email settingsNonull://null

Error Tracking

Environment VariableDescriptionRequiredDefaultSince
ROLLBAR_ENABLEDEnable or disable Rollbar error logging (true or false)Nofalse2024.01.01
ROLLBAR_API_KEYRollbar's API KeyNoNone2024.01.01
ROLLBAR_ENVThe environment name to report to RollbarNoproduction2024.01.01

Xero Integration

Environment VariableDescriptionRequiredDefaultSince
XERO_CLIENT_IDThe Client ID for the Xero AppNoNone2025.01.01
XERO_CLIENT_SECRETThe client secret for the Xero AppNoNone2025.01.01
XERO_CLIENT_REDIRECT_URIThe redirect URL to provide to XeroNoNone2025.01.01

HubSpot Integration

Environment VariableDescriptionRequiredDefaultSince
HUBSPOT_APP_IDThe App ID for HubSpotNoNone2025.02.01
HUBSPOT_CLIENT_IDThe client ID for the HubSpot AppNoNone2025.02.01
HUBSPOT_CLIENT_SECRETThe client secret for the HubSpot AppNoNone2025.02.01
HUBSPOT_REDIRECT_URIThe redirect URL to provide to HubSpotNoNone2025.02.01

Elasticsearch Configuration

Environment VariableDescriptionRequiredDefaultSince
ELASTICSEARCH_HOSTThe hostname for ElasticsearchNoelasticsearch2025.02.01
ELASTICSEARCH_PORTThe port for ElasticsearchNo92002025.02.01
AUDIT_LOG_INDEXThe Elasticsearch index name for the audit logNoaudit_log2025.02.01

Examples

Database Configuration

DATABASE_URL=postgresql://billabear:password@127.0.0.1:5432/billabear?serverVersion=14&charset=utf8

Email Configuration

# Gmail
MAILER_DSN=smtp://username:password@gmail

# Mailgun
MAILER_DSN=mailgun://KEY:DOMAIN@default

# SendGrid
MAILER_DSN=sendgrid://KEY@default

For more information on Symfony Mailer DSN formats, refer to the Symfony documentation.