Skip to content

Storage Configuration

File storage and upload settings. LambChat supports local filesystem storage and S3-compatible object storage.

S3 Object Storage

VariableDefaultSensitiveDescription
S3_ENABLEDfalseNoEnable S3 object storage.
S3_PROVIDERawsNoS3 provider: aws, aliyun, tencent, minio, custom.
S3_ENDPOINT_URL(empty)NoS3 endpoint URL. Required for MinIO and custom providers.
S3_ACCESS_KEY(empty)YesS3 access key.
S3_SECRET_KEY(empty)YesS3 secret key.
S3_REGIONus-east-1NoS3 region.
S3_BUCKET_NAME(empty)NoS3 bucket name.
S3_CUSTOM_DOMAIN(empty)NoCustom CDN domain for public URLs.
S3_PATH_STYLEfalseNoUse path-style addressing. Required for MinIO.
S3_MAX_FILE_SIZE10485760 (10MB)NoMaximum file upload size in bytes.
S3_INTERNAL_UPLOAD_MAX_SIZE52428800 (50MB)NoMaximum internal upload size in bytes.
S3_PUBLIC_BUCKETfalseNoWhether the bucket is publicly accessible.
S3_PRESIGNED_URL_EXPIRES604800 (7 days)NoPresigned URL expiration in seconds.

Local Storage

VariableDefaultDescription
LOCAL_STORAGE_PATH./uploadsPath for local file storage. Used when S3_ENABLED=false.
ENABLE_LOCAL_FILESYSTEM_FALLBACKtrueEnable local filesystem fallback when S3 is unavailable.

File Upload Limits

VariableDefaultDescription
FILE_UPLOAD_MAX_SIZE_IMAGE10Maximum image file size in MB.
FILE_UPLOAD_MAX_SIZE_VIDEO100Maximum video file size in MB.
FILE_UPLOAD_MAX_SIZE_AUDIO50Maximum audio file size in MB.
FILE_UPLOAD_MAX_SIZE_DOCUMENT50Maximum document file size in MB.
FILE_UPLOAD_MAX_FILES10Maximum number of files per upload.

Examples

AWS S3

bash
S3_ENABLED=true
S3_PROVIDER=aws
S3_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE
S3_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
S3_REGION=us-east-1
S3_BUCKET_NAME=lambchat-files

MinIO

bash
S3_ENABLED=true
S3_PROVIDER=minio
S3_ENDPOINT_URL=http://localhost:9000
S3_ACCESS_KEY=minioadmin
S3_SECRET_KEY=minioadmin
S3_BUCKET_NAME=lambchat
S3_PATH_STYLE=true

Aliyun OSS

bash
S3_ENABLED=true
S3_PROVIDER=aliyun
S3_ACCESS_KEY=your_access_key
S3_SECRET_KEY=your_secret_key
S3_REGION=oss-cn-hangzhou
S3_BUCKET_NAME=lambchat-files