bigRAG
Getting Started

Configuration

Configure bigRAG with TOML files and environment variables.

bigRAG reads configuration from a bigrag.toml file and/or environment variables. Environment variables take precedence over TOML values.

TOML Configuration

Create a bigrag.toml file in the project root:

[server]
host = "0.0.0.0"
port = 6100
workers = 4
log_level = "info"          # debug, info, warning, error
log_format = "text"         # text, json
cors_origins = ["*"]

[database]
url = "postgres://bigrag:bigrag@localhost:5433/bigrag?sslmode=disable"
pool_min = 5
pool_max = 50

[milvus]
uri = "http://localhost:19530"

[redis]
url = "redis://localhost:6380/0"

[auth]
api_secret = ""             # Shared API secret (open access if empty)

[ingestion]
workers = 4
upload_dir = "./data/uploads"
max_upload_size_mb = 1024

[storage]
backend = "local"           # local, s3

[s3]
bucket = ""
endpoint_url = ""
region = "us-east-1"
access_key = ""
secret_key = ""

Environment Variables

All settings use the BIGRAG_ prefix. Environment variables override TOML values.

Server

VariableDescriptionDefault
BIGRAG_PORTServer port6100
BIGRAG_HOSTBind address0.0.0.0
BIGRAG_WORKERSUvicorn workers4
BIGRAG_LOG_LEVELLog level (debug, info, warning, error)info
BIGRAG_LOG_FORMATLog format (text, json)text
BIGRAG_CORS_ORIGINSAllowed CORS origins["*"]

Infrastructure

VariableDescriptionDefault
BIGRAG_DATABASE_URLPostgres connection URLpostgres://bigrag:bigrag@localhost:5433/bigrag?sslmode=disable
BIGRAG_MILVUS_URIMilvus connection URIhttp://localhost:19530
BIGRAG_REDIS_URLRedis connection URLredis://localhost:6380/0

Authentication

VariableDescriptionDefault
BIGRAG_API_SECRETShared API secret (open access if unset)

Database

VariableDescriptionDefault
BIGRAG_DB_POOL_MINMinimum connection pool size5
BIGRAG_DB_POOL_MAXMaximum connection pool size50

Ingestion

VariableDescriptionDefault
BIGRAG_MAX_UPLOAD_SIZE_MBMax upload file size in MB1024
BIGRAG_INGESTION_WORKERSBackground processing workers4
BIGRAG_INGESTION_BATCH_SIZEVectors per embedding batch128
BIGRAG_CHUNK_SIZEDefault chunk size (characters)512
BIGRAG_CHUNK_OVERLAPDefault chunk overlap (characters)50
BIGRAG_CONVERSION_TIMEOUTDocument conversion timeout (seconds)300

Storage

VariableDescriptionDefault
BIGRAG_STORAGE_BACKENDStorage backend (local, s3)local
BIGRAG_UPLOAD_DIRLocal upload directory./data/uploads
BIGRAG_S3_BUCKETS3 bucket name
BIGRAG_S3_ENDPOINT_URLS3 endpoint URL
BIGRAG_S3_REGIONS3 regionus-east-1

Tuning

VariableDescriptionDefault
BIGRAG_EMBEDDING_CONCURRENCYMax concurrent embedding requests8
BIGRAG_MILVUS_MAX_WORKERSMilvus thread pool size32
BIGRAG_MILVUS_NPROBEMilvus search nprobe parameter32
BIGRAG_COLLECTION_CACHE_TTLCollection cache TTL in seconds30
BIGRAG_QUEUE_MAX_DEPTHMax ingestion queue depth10000
BIGRAG_WEBHOOK_DELIVERY_TIMEOUTWebhook HTTP timeout (seconds)10
BIGRAG_WEBHOOK_CACHE_TTLWebhook cache TTL in seconds60

Embedding provider, model, API key, chunk size, and chunk overlap are configured per collection via the API. The CHUNK_SIZE and CHUNK_OVERLAP settings above are server-level defaults used when not specified per-collection.

On this page