Skip to content

Configuration ​

Brainitive is configured with environment variables in the .env file. This page lists every setting that matters for a self-hosted installation, grouped by topic, with its default.

After changing .env:

  • Docker: docker compose up -d (the containers are recreated and the configuration is cached again).
  • Manual install: php artisan optimize and php artisan queue:restart.

A "default" is the value Brainitive uses when the variable is not set. The Docker template .env.docker.example already sets sensible values for most of them.

Some settings live in the admin console

Sign-up (open or invite-only), email verification and an SMTP server can also be set in Instance admin → Settings. SMTP saved there overrides the MAIL_* variables. See the Instance admin guide.

App ​

VariableDefaultWhat it does
APP_NAMEBrainitiveName shown in emails and the browser title
APP_ENVproductionKeep production on a real server
APP_DEBUGfalseShows detailed error pages. Never true on a public server
APP_URLhttp://localhostThe address people open, for example https://brainitive.example.com. Used for links in emails, OAuth callbacks and secure cookies
APP_KEY–Encryption key. Docker generates it on first start if empty. Never change it on a running installation
APP_PREVIOUS_KEYS–Comma-separated old keys, so data encrypted with them can still be read after a key rotation
APP_LOCALEenLanguage of the app
APP_FALLBACK_LOCALEenLanguage used when a translation is missing
TRUSTED_PROXIES–IP addresses or networks (comma-separated) of your reverse proxy. Needed behind a proxy so Brainitive sees HTTPS and the real client IP. * trusts everyone (only if the app can't be reached any other way)
LOG_CHANNELstackWhere logs go. Docker uses stderr (shown by docker compose logs)
LOG_STACKsingleChannels of the stack log: single (one file) or daily
LOG_LEVELdebugMinimum level to log. warning is a good choice in production
LOG_DAILY_DAYS14Days of log files kept with the daily channel

Docker only ​

These are read by compose.yaml, not by the app.

VariableDefaultWhat it does
BRAINITIVE_IMAGEghcr.io/armendzekjiri/brainitive:latestImage to run. Pin a version with a tag like :1.45
SERVER_NAME:80:80 serves plain HTTP (behind your own proxy). A domain name makes Caddy fetch a TLS certificate
HTTP_PORT8080Host port for HTTP
HTTPS_PORT8443Host port for HTTPS

In Docker, DB_CONNECTION, DB_HOST, DB_PORT, COLLAB_URL and LIVE_PUBLISH_URL are set by compose.yaml itself.

Database ​

Brainitive runs on PostgreSQL. Other databases are not supported.

VariableDefaultWhat it does
DB_CONNECTIONsqliteSet to pgsql
DB_HOST127.0.0.1Database server (Docker: db)
DB_PORT5432Database port
DB_DATABASElaravelDatabase name (Docker template: brainitive)
DB_USERNAMErootDatabase user (Docker template: brainitive)
DB_PASSWORD–Database password. Required in Docker
DB_URL–Alternative: the whole connection as one URL
DB_SSLMODEpreferPostgreSQL SSL mode, for example require for a remote database

Cache, sessions and queue ​

VariableDefaultWhat it does
CACHE_STOREdatabasedatabase or redis (Docker template: redis)
CACHE_PREFIXfrom APP_NAMEKey prefix, useful when several apps share one Redis
SESSION_DRIVERdatabasedatabase or redis (Docker template: redis)
SESSION_LIFETIME120Minutes of inactivity before a session expires
SESSION_ENCRYPTfalseEncrypt session data
SESSION_DOMAIN–Cookie domain. Leave empty unless you know you need it
SESSION_SECURE_COOKIEtrue when APP_URL starts with https://Send the session cookie only over HTTPS
SESSION_SAME_SITElaxSameSite setting of the session cookie
SESSION_COOKIEfrom APP_NAMEName of the session cookie
QUEUE_CONNECTIONdatabasedatabase or redis (Docker template: redis)
DB_QUEUE_RETRY_AFTER90Seconds before a stuck job on the database queue is retried
REDIS_QUEUE_RETRY_AFTER90Same for the Redis queue

Redis ​

Only needed when cache, sessions or queue use Redis.

VariableDefaultWhat it does
REDIS_CLIENTphpredisPHP Redis client (needs the redis PHP extension)
REDIS_HOST127.0.0.1Redis server (Docker: redis)
REDIS_PORT6379Redis port
REDIS_PASSWORD–Redis password
REDIS_USERNAME–Redis user (ACL)
REDIS_URL–Alternative: the whole connection as one URL
REDIS_DB0Database number for sessions and queue
REDIS_CACHE_DB1Database number for the cache
REDIS_PREFIXfrom APP_NAMEKey prefix

Mail ​

See Email for setup and testing.

VariableDefaultWhat it does
MAIL_MAILERlogsmtp to send mail. log only writes mails to the log
MAIL_HOST127.0.0.1SMTP server
MAIL_PORT2525SMTP port, usually 587 (STARTTLS) or 465 (SSL/TLS)
MAIL_SCHEME–smtps for port 465 (SSL/TLS); leave empty for 587
MAIL_USERNAME–SMTP user
MAIL_PASSWORD–SMTP password
MAIL_FROM_ADDRESShello@example.comSender address of every email
MAIL_FROM_NAMEExampleSender name, usually "${APP_NAME}"
MAIL_EHLO_DOMAINhost of APP_URLName the server uses to greet the SMTP server
MAIL_URL–Alternative: the whole SMTP connection as one URL
MAIL_SENDMAIL_PATH/usr/sbin/sendmail -bs -iUsed with MAIL_MAILER=sendmail
NOTIFICATION_EMAIL_DIGEST_SECONDS60Activity emails (assignments, mentions, comments, status changes, page updates, sprints) wait this many seconds from the first one and go out as one email per person and workspace. 0 sends every email on its own, at once. The bell and push are never delayed. Needs the queue worker; with QUEUE_CONNECTION=sync emails are always sent at once

Email to helpdesk ​

VariableDefaultWhat it does
INBOUND_MAIL_DOMAIN–Domain for helpdesk forwarding addresses (for example inbound.example.com). Off while empty
INBOUND_MAIL_PROVIDERpostmarkpostmark or mailgun: which setup the helpdesk settings describe
INBOUND_MAIL_POSTMARK_TOKEN–Long random string, the password in Postmark's webhook URL
INBOUND_MAIL_MAILGUN_SIGNING_KEY–Mailgun's HTTP webhook signing key
INBOUND_MAIL_REPLAY_WINDOW900Seconds a Mailgun signature stays valid
INBOUND_MAIL_MAX_ATTACHMENT_KB10240Larger attachments are dropped (the mail still arrives)
INBOUND_MAIL_MAX_ATTACHMENTS10Maximum attachments per mail
INBOUND_MAIL_MAX_TOTAL_KB30720Maximum size of all attachments together
HELPDESK_MAIL_MAX_MESSAGE_MB25Connected IMAP mailboxes: larger mails are not downloaded
HELPDESK_MAIL_ALLOW_PRIVATE_HOSTSfalseOnly with APP_ENV=local: allow mail servers on private networks and unencrypted connections

Realtime: live co-editing ​

Read by the app. See Realtime server.

VariableDefaultWhat it does
COLLAB_URL– (Docker: /collab)Where the browser connects, for example wss://brainitive.example.com/collab or the path /collab. Live co-editing is off while empty
COLLAB_SECRETderived from APP_KEYSecret shared with the realtime server
COLLAB_TOKEN_TTL120Seconds a connection token is valid
COLLAB_MAX_STATE_BYTES16777216Largest stored state of one document (16 MB)

Realtime: live channels ​

Instant notification bell, presence and typing indicators. They use the same realtime server.

VariableDefaultWhat it does
LIVE_ENABLEDtruefalse turns live channels off but keeps live co-editing
LIVE_URLCOLLAB_URL + ?live=1Where the browser connects for live channels. Normally leave empty
LIVE_PUBLISH_URL– (Docker: http://realtime:1234)The realtime server's own internal address, for example http://127.0.0.1:1234. Never the public URL. Without it, the bell checks every 30 seconds instead
LIVE_TOKEN_TTL120Seconds a channel token is valid for joining

The realtime server process has its own variables (COLLAB_HOST, COLLAB_PORT, COLLAB_APP_URL …), listed on the Realtime server page.

Web push ​

Browser notifications. Generate keys with php artisan webpush:vapid --show.

VariableDefaultWhat it does
VAPID_SUBJECT–Contact for push services, for example mailto:admin@example.com
VAPID_PUBLIC_KEY–Public key. Without it no browser can subscribe
VAPID_PRIVATE_KEY–Private key
VAPID_PEM_FILE–Alternative: path to a PEM file with the key pair

Search runs on PostgreSQL and has no settings. See Search.

Social logins and calendars ​

Each login button appears only when its client ID and secret are set. Setup guides: Google, Microsoft, GitHub.

VariableDefaultWhat it does
GOOGLE_CLIENT_ID–Google OAuth client (login, Google Calendar and Tasks)
GOOGLE_CLIENT_SECRET–
GOOGLE_REDIRECT_URIAPP_URL/login/google/callbackLogin callback URL
MICROSOFT_CLIENT_ID–Microsoft Entra app (login, Outlook calendars, Teams meetings)
MICROSOFT_CLIENT_SECRET–
MICROSOFT_TENANTcommoncommon allows personal and work/school accounts
MICROSOFT_REDIRECT_URIAPP_URL/calendar/connections/outlook/callbackCalendar callback URL
MICROSOFT_LOGIN_REDIRECT_URIAPP_URL/login/microsoft/callbackLogin callback URL
GITHUB_CLIENT_ID–GitHub OAuth app for "Continue with GitHub"
GITHUB_CLIENT_SECRET–
GITHUB_REDIRECT_URIAPP_URL/login/github/callbackLogin callback URL

GitHub App (repository connections) ​

Normally created in Instance admin → GitHub App. These variables override the stored app when GITHUB_APP_ID is set.

VariableDefaultWhat it does
GITHUB_APP_ID–App ID
GITHUB_APP_SLUG–App slug (from its URL)
GITHUB_APP_CLIENT_ID–Client ID
GITHUB_APP_CLIENT_SECRET–Client secret
GITHUB_APP_PRIVATE_KEY–The PEM key itself (\n escapes allowed) or a path to the .pem file
GITHUB_APP_WEBHOOK_SECRET–Webhook secret

GitHub stars ​

VariableDefaultWhat it does
GITHUB_STARStrueShow the star count on "Star on GitHub" buttons. The scheduler fetches it hourly from GitHub's API. false turns that off
GITHUB_REPOSITORYarmendzekjiri/brainitiveRepository the buttons link to

Update check ​

VariableDefaultWhat it does
BRAINITIVE_UPDATE_CHECKon (self-hosted)Once a day the scheduler asks GitHub's public API for the latest Brainitive release (anonymous, nothing about your instance is sent). Instance admins then see a newer version in Instance admin → Overview and in a small dismissible strip. Nothing is installed: see Upgrading. false turns it off. Empty means on, except on Brainitive Cloud. Check now with php artisan brainitive:check-update

AI, MCP and outgoing requests ​

VariableDefaultWhat it does
AI_ALLOW_PRIVATE_ENDPOINTSfalseLet workspace AI settings call servers on localhost or your private network (Ollama, LM Studio). Off so users can't make the server reach internal services
MCP_REDIRECT_HOSTS–Extra callback hosts for AI apps that register over OAuth, comma-separated (app.example.com,*.example.org). Claude, ChatGPT, Perplexity, Cursor, VS Code and the browser extension are allowed already
CALENDAR_ALLOWED_PORTS8443,5001,5232Ports a CalDAV server or calendar link may use besides 80 and 443
CALENDAR_MAX_RESPONSE_BYTES5000000Largest calendar file or CalDAV response read
CALENDAR_ICS_REFRESH_MINUTES15Minutes a subscribed calendar link is cached

A self-hosted installation never shows Brainitive Cloud's operator data. /privacy, /terms and /cookies show a short notice about your installation, and /imprint appears once you set your details. Empty values are hidden.

VariableDefaultWhat it does
LEGAL_OPERATOR_NAME–Your company or name
LEGAL_OPERATOR_DESCRIPTION–For example "GmbH, represented by …"
LEGAL_ADDRESS–Postal address, line breaks as \n
LEGAL_EMAIL–Contact email
LEGAL_PHONE–Phone
LEGAL_REPRESENTATIVE–Managing director or authorised representative
LEGAL_REGISTER–Commercial register entry
LEGAL_VAT_ID–VAT ID
LEGAL_CONTENT_RESPONSIBLE–Person responsible for content
LEGAL_DPO–Data protection officer
LEGAL_EU_REPRESENTATIVE–EU representative (outside the EU only)
LEGAL_SUPERVISORY_AUTHORITY–Data protection authority
LEGAL_GOVERNING_LAW–For example "German law"
LEGAL_JURISDICTION–Place of jurisdiction
LEGAL_PRIVACY_URL–Link your own privacy policy instead
LEGAL_TERMS_URL–Link your own terms instead
LEGAL_IMPRINT_URL–Link your own imprint instead
LEGAL_HOSTING_PROVIDER, LEGAL_HOSTING_LOCATION–Hosting provider and location
LEGAL_EMAIL_PROVIDER, LEGAL_EMAIL_PROVIDER_LOCATION–Email provider and location
LEGAL_BACKUP_PROVIDER, LEGAL_BACKUP_LOCATION–Backup provider and location
LEGAL_SERVER_LOG_RETENTION, LEGAL_BACKUP_RETENTION, LEGAL_ANALYTICS_RETENTION–Storage periods as free text, for example "14 days"
LEGAL_CLOUDdetected from APP_URLLeave empty. Only Brainitive Cloud uses its own legal texts

Each workspace can also add its own legal name, privacy policy and imprint in its workspace settings.

Analytics ​

Cookieless Umami analytics, loaded only after the visitor agrees, and only on the hosts in ANALYTICS_HOSTS. The default lists only Brainitive Cloud's hosts, so a self-hosted installation loads no analytics.

VariableDefaultWhat it does
ANALYTICS_HOSTSbrainitive.app,www.brainitive.appHosts where analytics may load
ANALYTICS_UMAMI_SCRIPTBrainitive Cloud'sUmami script URL
ANALYTICS_UMAMI_WEBSITE_IDBrainitive Cloud'sUmami website ID