Environment Variables
reflex.config.EnvironmentVariables
Environment Variables
Name | Type | Default | Description |
---|---|---|---|
ALEMBIC_CONFIG | Path | alembic.ini | Path to the alembic config file |
APP_HARNESS_DRIVER | str | Chrome | Which app harness driver to use. |
APP_HARNESS_DRIVER_ARGS | str |
| Arguments to pass to the app harness driver. |
APP_HARNESS_HEADLESS | bool | False | Whether to run app harness tests in headless mode. |
NPM_CONFIG_REGISTRY | str | None | None | The npm registry to use. |
REFLEX_ADD_ALL_ROUTES_ENDPOINT | bool | False | Used by flexgen to enumerate the pages. |
REFLEX_BACKEND_COLD_START_TIMEOUT | int | 10 | The timeout for the backend to do a cold start in seconds. |
REFLEX_BACKEND_ONLY | bool | False | Whether to run the backend only. Exclusive with REFLEX_FRONTEND_ONLY. |
REFLEX_BACKEND_PORT | int | None | None | The port to run the backend on. |
REFLEX_BUILD_BACKEND | str | https://flexgen-prod-flexgen.fly.dev | The reflex.build backend host. |
REFLEX_BUILD_FRONTEND | str | https://reflex.build | The reflex.build frontend host. |
REFLEX_CHECK_LATEST_VERSION | bool | True | Whether to check for outdated package versions. |
__REFLEX_COMPILE_CONTEXT | CompileContext | CompileContext.UNDEFINED | Indicate the current command that was invoked in the reflex CLI. |
REFLEX_COMPILE_EXECUTOR | reflex.config.ExecutorType | None | None | |
REFLEX_COMPILE_PROCESSES | int | None | None | Whether to use separate processes to compile the frontend and how many. If not set, defaults to thread executor. |
REFLEX_COMPILE_THREADS | int | None | None | Whether to use separate threads to compile the frontend and how many. Defaults to |
REFLEX_DIR | Path | /home/runner/.local/share/reflex | The directory to store reflex dependencies. |
REFLEX_DOES_BACKEND_COLD_START | bool | False | Enables different behavior for when the backend would do a cold start if it was inactive. |
REFLEX_ENV_MODE | Env | Env.DEV | This env var stores the execution mode of the app |
REFLEX_FRONTEND_ONLY | bool | False | Whether to run the frontend only. Exclusive with REFLEX_BACKEND_ONLY. |
REFLEX_FRONTEND_PORT | int | None | None | The port to run the frontend on. |
REFLEX_HOT_RELOAD_EXCLUDE_PATHS | list | [] | Paths to exclude from the hot reload. Takes precedence over include paths. Separated by a colon. |
REFLEX_HOT_RELOAD_INCLUDE_PATHS | list | [] | Additional paths to include in the hot reload. Separated by a colon. |
REFLEX_HTTP_CLIENT_BIND_ADDRESS | str | None | None | The address to bind the HTTP client to. You can set this to "::" to enable IPv6. |
REFLEX_IGNORE_REDIS_CONFIG_ERROR | bool | False | Whether to ignore the redis config error. Some redis servers only allow out-of-band configuration. |
REFLEX_PERF_MODE | PerformanceMode | PerformanceMode.WARN | In which performance mode to run the app. |
REFLEX_PERSIST_WEB_DIR | bool | False | Whether to skip purging the web directory in dev mode. |
__REFLEX_SKIP_COMPILE | bool | False | If this env var is set to "yes", App.compile will be a no-op |
REFLEX_SOCKET_INTERVAL | int | 25 | The interval to send a ping to the websocket server in seconds. |
REFLEX_SOCKET_MAX_HTTP_BUFFER_SIZE | int | 1000000 | Maximum size of the message in the websocket server in bytes. |
REFLEX_SOCKET_TIMEOUT | int | 120 | The timeout to wait for a pong from the websocket server in seconds. |
REFLEX_STATES_WORKDIR | Path | .states | The working directory for the states directory. |
REFLEX_STATE_SIZE_LIMIT | int | 1000 | The maximum size of the reflex state in kilobytes. |
REFLEX_UPLOADED_FILES_DIR | Path | uploaded_files | The directory to store uploaded files. |
REFLEX_USE_GRANIAN | bool | False | Whether to use Granian for the backend. By default, the backend uses Uvicorn if available. |
REFLEX_USE_NPM | bool | False | Whether to use npm over bun to install and run the frontend. |
REFLEX_USE_SYSTEM_BUN | bool | False | Whether to use the system installed bun. If set to false, bun will be bundled with the app. |
REFLEX_USE_TURBOPACK | bool | False | Whether to use the turbopack bundler. |
REFLEX_WEB_WORKDIR | Path | .web | The working directory for the next.js commands. |
SQLALCHEMY_ECHO | bool | False | Whether to print the SQL queries if the log level is INFO or lower. |
SQLALCHEMY_POOL_PRE_PING | bool | True | Whether to check db connections before using them. |
SSL_NO_VERIFY | bool | False | Disable SSL verification for HTTPX requests. |