Skip to main content

Environment Variables

Flowra reads configuration from .env at runtime. The CLI can regenerate the template using:

flowra env:example

Below is the full list of variables used by the default scaffold.

App

VariablePurposeDefault
APP_NAMEHuman-readable application nameFlowra
APP_ENVRuntime environment (development, staging, production)development
APP_DEBUGEnable verbose loggingtrue
APP_URLBase URL for outbound linkshttp://localhost:3387
APP_PORTHTTP server port3387
APP_TIMEZONEDefault application timezoneAsia/Jakarta
LOG_LEVELLogger severity thresholdinfo
CORS_ORIGINComma-separated list of allowed origins*
SESSION_SECRETSecret used for signing sessionsempty

Database (MySQL defaults)

VariablePurposeDefault
DB_MYSQL_HOST_PRIMARYPrimary database host127.0.0.1
DB_MYSQL_PORT_PRIMARYPrimary database port3306
DB_MYSQL_HOST_READONLYRead-only database hostempty
DB_MYSQL_PORT_READONLYRead-only database portempty
DB_MYSQL_HOST_STANDBYStandby database hostempty
DB_MYSQL_PORT_STANDBYStandby database portempty
DB_DEFAULT_USERNAMEDatabase usernameroot
DB_DEFAULT_PASSWORDDatabase passwordempty
DB_DEFAULT_DATABASEDatabase nameflowra
DB_MYSQL_HOSTFallback host if primary is not set127.0.0.1
DB_MYSQL_PORTFallback port if primary is not set3306
DB_MYSQL_SSLEnable TLS/SSL (true/false)false
DB_MYSQL_SSL_CAOptional CA certificate string or pathempty
DB_REMOTE_CLOUDReserved for custom socket logicfalse

Cache and queue

VariablePurposeDefault
CACHE_URLCache server connection stringempty
QUEUE_URLQueue server connection stringempty
Customize per project

You can change defaults by editing app/Config/*.js files. Update .env.example after changes.