Skip to content

Server - Configuration

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-data server start --env-file .env

After changing the environment variables, you need to restart the server to take effect.

Terminal window
lavender-data server restart

General

Environment VariableDescriptionDefault
LAVENDER_DATA_PORTThe port number to listen on for API requests8000
LAVENDER_DATA_HOSTThe host address to bind the server to0.0.0.0
LAVENDER_DATA_DB_URLThe database URL. Uses local sqlite db if not set.""
LAVENDER_DATA_REDIS_URLThe Redis URL. Uses memory if not set.""
LAVENDER_DATA_NUM_WORKERSThe number of workers to use for the background worker. (0 for auto)0
LAVENDER_DATA_DISABLE_AUTHDisable authenticationfalse

If you want to use a different database or cache, you need to install the corresponding dependencies.

Terminal window
# Postgres
pip install lavender-data[pgsql]
# Redis
pip install lavender-data[redis]

Web UI

Environment VariableDescriptionDefault
LAVENDER_DATA_UI_PORTThe port number to listen on for Web UI requests3000
LAVENDER_DATA_DISABLE_UIDisable the Web UIfalse

Logging

Environment VariableDescriptionDefault
LAVENDER_DATA_LOG_LEVELThe log level for the stdout/stderr."INFO"
LAVENDER_DATA_LOG_FILEThe log file. Always logs to this file with DEBUG level."~/.lavender-data/server.log"

Pipeline

Environment VariableDescriptionDefault
LAVENDER_DATA_MODULES_DIRThe directory to load the modules from""
LAVENDER_DATA_READER_DISK_CACHE_SIZEThe disk cache size for the shard file reader4294967296 (4GB)
LAVENDER_DATA_BATCH_CACHE_TTLThe TTL for the batch cache300 (5 minutes)

Cluster

Environment VariableDescriptionDefault
LAVENDER_DATA_CLUSTER_ENABLEDEnable the clusterfalse
LAVENDER_DATA_CLUSTER_SECRETThe shared secret for the cluster""
LAVENDER_DATA_CLUSTER_HEAD_URLThe URL of the head node""
LAVENDER_DATA_CLUSTER_NODE_URLThe URL of the current node""