To configure the server, you can set the following environment variables.
Set them in the .env file in the current directory.
Alternatively, you can set them in any other file and pass it to the server using --env-file option.
Terminal window
lavender-dataserverstart--env-file.env
After changing the environment variables, you need to restart the server to take effect.
Terminal window
lavender-dataserverrestart
General
Environment Variable
Description
Default
LAVENDER_DATA_PORT
The port number to listen on for API requests
8000
LAVENDER_DATA_HOST
The host address to bind the server to
0.0.0.0
LAVENDER_DATA_DB_URL
The database URL. Uses local sqlite db if not set.
""
LAVENDER_DATA_REDIS_URL
The Redis URL. Uses memory if not set.
""
LAVENDER_DATA_NUM_WORKERS
The number of workers to use for the background worker. (0 for auto)
0
LAVENDER_DATA_DISABLE_AUTH
Disable authentication
false
If you want to use a different database or cache, you need to install the corresponding dependencies.
Terminal window
# Postgres
pipinstalllavender-data[pgsql]
# Redis
pipinstalllavender-data[redis]
Web UI
Environment Variable
Description
Default
LAVENDER_DATA_UI_PORT
The port number to listen on for Web UI requests
3000
LAVENDER_DATA_DISABLE_UI
Disable the Web UI
false
Logging
Environment Variable
Description
Default
LAVENDER_DATA_LOG_LEVEL
The log level for the stdout/stderr.
"INFO"
LAVENDER_DATA_LOG_FILE
The log file. Always logs to this file with DEBUG level.