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.
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 = ""
All settings use the BIGRAG_ prefix. Environment variables override TOML values.
Variable Description Default BIGRAG_PORTServer port 6100BIGRAG_HOSTBind address 0.0.0.0BIGRAG_WORKERSUvicorn workers 4BIGRAG_LOG_LEVELLog level (debug, info, warning, error) infoBIGRAG_LOG_FORMATLog format (text, json) textBIGRAG_CORS_ORIGINSAllowed CORS origins ["*"]
Variable Description Default BIGRAG_DATABASE_URLPostgres connection URL postgres://bigrag:bigrag@localhost:5433/bigrag?sslmode=disableBIGRAG_MILVUS_URIMilvus connection URI http://localhost:19530BIGRAG_REDIS_URLRedis connection URL redis://localhost:6380/0
Variable Description Default BIGRAG_API_SECRETShared API secret (open access if unset) —
Variable Description Default BIGRAG_DB_POOL_MINMinimum connection pool size 5BIGRAG_DB_POOL_MAXMaximum connection pool size 50
Variable Description Default BIGRAG_MAX_UPLOAD_SIZE_MBMax upload file size in MB 1024BIGRAG_INGESTION_WORKERSBackground processing workers 4BIGRAG_INGESTION_BATCH_SIZEVectors per embedding batch 128BIGRAG_CHUNK_SIZEDefault chunk size (characters) 512BIGRAG_CHUNK_OVERLAPDefault chunk overlap (characters) 50BIGRAG_CONVERSION_TIMEOUTDocument conversion timeout (seconds) 300
Variable Description Default BIGRAG_STORAGE_BACKENDStorage backend (local, s3) localBIGRAG_UPLOAD_DIRLocal upload directory ./data/uploadsBIGRAG_S3_BUCKETS3 bucket name — BIGRAG_S3_ENDPOINT_URLS3 endpoint URL — BIGRAG_S3_REGIONS3 region us-east-1
Variable Description Default BIGRAG_EMBEDDING_CONCURRENCYMax concurrent embedding requests 8BIGRAG_MILVUS_MAX_WORKERSMilvus thread pool size 32BIGRAG_MILVUS_NPROBEMilvus search nprobe parameter 32BIGRAG_COLLECTION_CACHE_TTLCollection cache TTL in seconds 30BIGRAG_QUEUE_MAX_DEPTHMax ingestion queue depth 10000BIGRAG_WEBHOOK_DELIVERY_TIMEOUTWebhook HTTP timeout (seconds) 10BIGRAG_WEBHOOK_CACHE_TTLWebhook cache TTL in seconds 60
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.