Environment Variables

reflex.config.EnvironmentVariables

Environment Variables

NameTypeDefaultDescription
ALEMBIC_CONFIGPathalembic.ini

Path to the alembic config file

APP_HARNESS_DRIVERstrChrome

Which app harness driver to use.

APP_HARNESS_DRIVER_ARGSstr

Arguments to pass to the app harness driver.

APP_HARNESS_HEADLESSboolFalse

Whether to run app harness tests in headless mode.

NPM_CONFIG_REGISTRYstr | NoneNone

The npm registry to use.

REFLEX_ADD_ALL_ROUTES_ENDPOINTboolFalse

Used by flexgen to enumerate the pages.

REFLEX_BACKEND_COLD_START_TIMEOUTint10

The timeout for the backend to do a cold start in seconds.

REFLEX_BACKEND_ONLYboolFalse

Whether to run the backend only. Exclusive with REFLEX_FRONTEND_ONLY.

REFLEX_BACKEND_PORTint | NoneNone

The port to run the backend on.

REFLEX_BUILD_BACKENDstrhttps://flexgen-prod-flexgen.fly.dev

The reflex.build backend host.

REFLEX_BUILD_FRONTENDstrhttps://reflex.build

The reflex.build frontend host.

REFLEX_CHECK_LATEST_VERSIONboolTrue

Whether to check for outdated package versions.

__REFLEX_COMPILE_CONTEXTCompileContextCompileContext.UNDEFINED

Indicate the current command that was invoked in the reflex CLI.

REFLEX_COMPILE_EXECUTORreflex.config.ExecutorType | NoneNone
REFLEX_COMPILE_PROCESSESint | NoneNone

Whether to use separate processes to compile the frontend and how many. If not set, defaults to thread executor.

REFLEX_COMPILE_THREADSint | NoneNone

Whether to use separate threads to compile the frontend and how many. Defaults to min(32, os.cpu_count() + 4).

REFLEX_DIRPath/home/runner/.local/share/reflex

The directory to store reflex dependencies.

REFLEX_DOES_BACKEND_COLD_STARTboolFalse

Enables different behavior for when the backend would do a cold start if it was inactive.

REFLEX_ENV_MODEEnvEnv.DEV

This env var stores the execution mode of the app

REFLEX_FRONTEND_ONLYboolFalse

Whether to run the frontend only. Exclusive with REFLEX_BACKEND_ONLY.

REFLEX_FRONTEND_PORTint | NoneNone

The port to run the frontend on.

REFLEX_HOT_RELOAD_EXCLUDE_PATHSlist[]

Paths to exclude from the hot reload. Takes precedence over include paths. Separated by a colon.

REFLEX_HOT_RELOAD_INCLUDE_PATHSlist[]

Additional paths to include in the hot reload. Separated by a colon.

REFLEX_HTTP_CLIENT_BIND_ADDRESSstr | NoneNone

The address to bind the HTTP client to. You can set this to "::" to enable IPv6.

REFLEX_IGNORE_REDIS_CONFIG_ERRORboolFalse

Whether to ignore the redis config error. Some redis servers only allow out-of-band configuration.

REFLEX_PERF_MODEPerformanceModePerformanceMode.WARN

In which performance mode to run the app.

REFLEX_PERSIST_WEB_DIRboolFalse

Whether to skip purging the web directory in dev mode.

__REFLEX_SKIP_COMPILEboolFalse

If this env var is set to "yes", App.compile will be a no-op

REFLEX_SOCKET_INTERVALint25

The interval to send a ping to the websocket server in seconds.

REFLEX_SOCKET_MAX_HTTP_BUFFER_SIZEint1000000

Maximum size of the message in the websocket server in bytes.

REFLEX_SOCKET_TIMEOUTint120

The timeout to wait for a pong from the websocket server in seconds.

REFLEX_STATES_WORKDIRPath.states

The working directory for the states directory.

REFLEX_STATE_SIZE_LIMITint1000

The maximum size of the reflex state in kilobytes.

REFLEX_UPLOADED_FILES_DIRPathuploaded_files

The directory to store uploaded files.

REFLEX_USE_GRANIANboolFalse

Whether to use Granian for the backend. By default, the backend uses Uvicorn if available.

REFLEX_USE_NPMboolFalse

Whether to use npm over bun to install and run the frontend.

REFLEX_USE_SYSTEM_BUNboolFalse

Whether to use the system installed bun. If set to false, bun will be bundled with the app.

REFLEX_USE_TURBOPACKboolFalse

Whether to use the turbopack bundler.

REFLEX_WEB_WORKDIRPath.web

The working directory for the next.js commands.

SQLALCHEMY_ECHOboolFalse

Whether to print the SQL queries if the log level is INFO or lower.

SQLALCHEMY_POOL_PRE_PINGboolTrue

Whether to check db connections before using them.

SSL_NO_VERIFYboolFalse

Disable SSL verification for HTTPX requests.

Built with Reflex