2025-12-28 13:02:17 +07:00
# -----------------------------------------------------------------------------
# SECURITY WARNING: DO NOT DEPLOY WITH DEFAULT PASSWORDS
# For non-local deployments, please change all passwords (ELASTIC_PASSWORD,
# MYSQL_PASSWORD, MINIO_PASSWORD, etc.) to strong, unique values.
# You can generate a random string using: openssl rand -hex 32
# -----------------------------------------------------------------------------
2025-10-23 23:02:27 +08:00
# ------------------------------
# docker env var for specifying vector db type at startup
# (based on the vector db type, the corresponding docker
# compose profile will be used)
# ------------------------------
2024-11-14 00:08:55 +08:00
# The type of doc engine to use.
2024-11-22 12:03:46 +08:00
# Available options:
2025-05-16 11:14:57 +08:00
# - `elasticsearch` (default)
2024-11-22 12:03:46 +08:00
# - `infinity` (https://github.com/infiniflow/infinity)
2025-11-20 10:00:14 +08:00
# - `oceanbase` (https://github.com/oceanbase/oceanbase)
2025-04-24 16:03:31 +08:00
# - `opensearch` (https://github.com/opensearch-project/OpenSearch)
2026-01-19 16:07:43 +08:00
# - `seekdb` (https://github.com/oceanbase/seekdb)
2024-11-14 00:08:55 +08:00
DOC_ENGINE = ${ DOC_ENGINE :- elasticsearch }
2025-10-23 23:02:27 +08:00
# Device on which deepdoc inference run.
# Available levels:
# - `cpu` (default)
# - `gpu`
DEVICE = ${ DEVICE :- cpu }
COMPOSE_PROFILES = ${ DOC_ENGINE } ,${ DEVICE }
2024-11-14 00:08:55 +08:00
2024-11-08 16:31:52 +08:00
# The version of Elasticsearch.
2026-04-09 17:44:13 +08:00
STACK_VERSION = ${ STACK_VERSION :- 8 .11.3 }
2024-02-28 15:02:04 +08:00
2024-11-12 15:56:53 +01:00
# The hostname where the Elasticsearch service is exposed
ES_HOST = es01
2025-05-16 11:14:57 +08:00
# The port used to expose the Elasticsearch service to the host machine,
2024-11-08 16:31:52 +08:00
# allowing EXTERNAL access to the service running inside the Docker container.
2024-02-28 15:02:04 +08:00
ES_PORT = 1200
2025-05-16 11:14:57 +08:00
# The password for Elasticsearch.
2025-12-28 13:02:17 +07:00
# WARNING: Change this for production!
2024-06-06 13:19:26 +08:00
ELASTIC_PASSWORD = infini_rag_flow
2025-04-24 16:03:31 +08:00
# the hostname where OpenSearch service is exposed, set it not the same as elasticsearch
OS_PORT = 1201
# The hostname where the OpenSearch service is exposed
OS_HOST = opensearch01
# The password for OpenSearch.
# At least one uppercase letter, one lowercase letter, one digit, and one special character
OPENSEARCH_PASSWORD = infini_rag_flow_OS_01
2025-05-16 11:14:57 +08:00
# The port used to expose the Kibana service to the host machine,
2024-11-08 16:31:52 +08:00
# allowing EXTERNAL access to the service running inside the Docker container.
2025-10-14 09:38:47 +08:00
# To enable kibana, you need to:
2025-10-23 23:02:27 +08:00
# 1. Ensure that COMPOSE_PROFILES includes kibana, for example: COMPOSE_PROFILES=${COMPOSE_PROFILES},kibana
2025-10-14 09:38:47 +08:00
# 2. Comment out or delete the following configurations of the es service in docker-compose-base.yml: xpack.security.enabled、xpack.security.http.ssl.enabled、xpack.security.transport.ssl.enabled (for details: https://www.elastic.co/docs/deploy-manage/security/self-auto-setup#stack-existing-settings-detected)
# 3. Adjust the es.hosts in conf/service_config.yaml or docker/service_conf.yaml.template to 'https://localhost:1200'
# 4. After the startup is successful, in the es container, execute the command to generate the kibana token: `bin/elasticsearch-create-enrollment-token -s kibana`, then you can use kibana normally
2024-02-28 15:02:04 +08:00
KIBANA_PORT = 6601
2024-11-08 16:31:52 +08:00
# The maximum amount of the memory, in bytes, that a specific Docker container can use while running.
# Update it according to the available memory in the host machine.
2024-04-23 14:41:10 +08:00
MEM_LIMIT = 8073741824
2024-11-25 11:53:58 +08:00
# The hostname where the Infinity service is exposed
INFINITY_HOST = infinity
2024-11-12 14:59:41 +08:00
# Port to expose Infinity API to the host
INFINITY_THRIFT_PORT = 23817
INFINITY_HTTP_PORT = 23820
INFINITY_PSQL_PORT = 5432
2025-11-20 10:00:14 +08:00
# The hostname where the OceanBase service is exposed
OCEANBASE_HOST = oceanbase
# The port used to expose the OceanBase service
OCEANBASE_PORT = 2881
# The username for OceanBase
OCEANBASE_USER = root@ragflow
# The password for OceanBase
OCEANBASE_PASSWORD = infini_rag_flow
# The doc database of the OceanBase service to use
OCEANBASE_DOC_DBNAME = ragflow_doc
# OceanBase container configuration
OB_CLUSTER_NAME = ${ OB_CLUSTER_NAME :- ragflow }
OB_TENANT_NAME = ${ OB_TENANT_NAME :- ragflow }
OB_SYS_PASSWORD = ${ OCEANBASE_PASSWORD :- infini_rag_flow }
OB_TENANT_PASSWORD = ${ OCEANBASE_PASSWORD :- infini_rag_flow }
OB_MEMORY_LIMIT = ${ OB_MEMORY_LIMIT :- 10G }
OB_SYSTEM_MEMORY = ${ OB_SYSTEM_MEMORY :- 2G }
OB_DATAFILE_SIZE = ${ OB_DATAFILE_SIZE :- 20G }
OB_LOG_DISK_SIZE = ${ OB_LOG_DISK_SIZE :- 20G }
2026-01-19 16:07:43 +08:00
# The hostname where the SeekDB service is exposed
SEEKDB_HOST = seekdb
# The port used to expose the SeekDB service
SEEKDB_PORT = 2881
# The username for SeekDB
SEEKDB_USER = root
# The password for SeekDB
SEEKDB_PASSWORD = infini_rag_flow
# The doc database of the SeekDB service to use
SEEKDB_DOC_DBNAME = ragflow_doc
# SeekDB memory limit
SEEKDB_MEMORY_LIMIT = 2G
2025-05-16 11:14:57 +08:00
# The password for MySQL.
2025-12-28 13:02:17 +07:00
# WARNING: Change this for production!
2024-02-28 15:02:04 +08:00
MYSQL_PASSWORD = infini_rag_flow
2024-11-12 15:56:53 +01:00
# The hostname where the MySQL service is exposed
MYSQL_HOST = mysql
# The database of the MySQL service to use
MYSQL_DBNAME = rag_flow
2026-01-20 13:42:22 +08:00
# The port used to connect to MySQL from RAGFlow container.
# Change this if you use external MySQL.
MYSQL_PORT = 3306
2025-05-16 11:14:57 +08:00
# The port used to expose the MySQL service to the host machine,
# allowing EXTERNAL access to the MySQL database running inside the Docker container.
2026-04-03 19:26:45 +08:00
EXPOSE_MYSQL_PORT = 3306
2025-08-07 10:41:05 +08:00
# The maximum size of communication packets sent to the MySQL server
MYSQL_MAX_PACKET = 1073741824
2024-02-28 15:02:04 +08:00
2024-12-20 11:30:33 +08:00
# The hostname where the MinIO service is exposed
2024-11-12 15:56:53 +01:00
MINIO_HOST = minio
2025-05-16 11:14:57 +08:00
# The port used to expose the MinIO console interface to the host machine,
# allowing EXTERNAL access to the web-based console running inside the Docker container.
2024-04-18 15:45:09 +08:00
MINIO_CONSOLE_PORT = 9001
2025-05-16 11:14:57 +08:00
# The port used to expose the MinIO API service to the host machine,
# allowing EXTERNAL access to the MinIO object storage service running inside the Docker container.
2024-04-18 15:45:09 +08:00
MINIO_PORT = 9000
2025-05-16 11:14:57 +08:00
# The username for MinIO.
2024-11-08 16:31:52 +08:00
# When updated, you must revise the `minio.user` entry in service_conf.yaml accordingly.
2024-03-05 16:33:47 +08:00
MINIO_USER = rag_flow
2025-05-16 11:14:57 +08:00
# The password for MinIO.
2024-11-08 16:31:52 +08:00
# When updated, you must revise the `minio.password` entry in service_conf.yaml accordingly.
2024-02-28 15:02:04 +08:00
MINIO_PASSWORD = infini_rag_flow
2024-11-12 15:56:53 +01:00
# The hostname where the Redis service is exposed
REDIS_HOST = redis
2025-05-16 11:14:57 +08:00
# The port used to expose the Redis service to the host machine,
2024-11-08 16:31:52 +08:00
# allowing EXTERNAL access to the Redis service running inside the Docker container.
2024-06-08 23:24:29 +08:00
REDIS_PORT = 6379
2024-11-08 16:31:52 +08:00
# The password for Redis.
2024-05-07 11:43:33 +08:00
REDIS_PASSWORD = infini_rag_flow
2025-05-16 11:14:57 +08:00
# The port used to expose RAGFlow's HTTP API service to the host machine,
2024-11-08 16:31:52 +08:00
# allowing EXTERNAL access to the service running inside the Docker container.
2025-10-30 09:32:08 +08:00
SVR_WEB_HTTP_PORT = 80
SVR_WEB_HTTPS_PORT = 443
2024-02-28 15:02:04 +08:00
SVR_HTTP_PORT = 9380
2025-10-13 19:05:54 +08:00
ADMIN_SVR_HTTP_PORT = 9381
2025-10-30 09:32:08 +08:00
SVR_MCP_PORT = 9382
2026-03-12 20:39:57 +08:00
GO_HTTP_PORT = 9384
2026-03-18 11:51:03 +08:00
GO_ADMIN_PORT = 9383
2024-02-28 15:02:04 +08:00
2026-03-13 19:05:30 +08:00
# API_PROXY_SCHEME=hybrid # go and python hybrid deploy mode
API_PROXY_SCHEME = python # use pure python server deployment
2025-10-23 23:02:27 +08:00
# The RAGFlow Docker image to download. v0.22+ doesn't include embedding models.
2026-06-11 18:34:26 +08:00
RAGFLOW_IMAGE = infiniflow/ragflow:v0.26.0
2024-11-08 16:31:52 +08:00
# If you cannot download the RAGFlow Docker image:
2026-06-11 18:34:26 +08:00
# RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:v0.26.0
# RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:v0.26.0
2024-11-08 16:31:52 +08:00
#
2024-12-09 12:44:57 +08:00
# - For the `nightly` edition, uncomment either of the following:
# RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly
2026-03-06 18:03:35 +08:00
# RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly
2024-10-10 15:30:32 +08:00
2025-10-23 23:02:27 +08:00
# The embedding service image, model and port.
# Important: To enable the embedding service, you need to uncomment one of the following two lines:
# COMPOSE_PROFILES=${COMPOSE_PROFILES},tei-cpu
# COMPOSE_PROFILES=${COMPOSE_PROFILES},tei-gpu
# The embedding service image:
TEI_IMAGE_CPU = infiniflow/text-embeddings-inference:cpu-1.8
TEI_IMAGE_GPU = infiniflow/text-embeddings-inference:1.8
# The embedding service model:
# Available options:
# - `Qwen/Qwen3-Embedding-0.6B` (default, requires 25GB RAM/vRAM to load)
# - `BAAI/bge-m3` (requires 21GB RAM/vRAM to load)
# - `BAAI/bge-small-en-v1.5` (requires 1.2GB RAM/vRAM to load)
TEI_MODEL = ${ TEI_MODEL :- Qwen /Qwen3-Embedding-0.6B }
# The embedding service port:
TEI_HOST = tei
# The port used to expose the TEI service to the host machine,
# allowing EXTERNAL access to the service running inside the Docker container.
TEI_PORT = 6380
2024-11-08 16:31:52 +08:00
# The local time zone.
2025-10-23 23:02:27 +08:00
TZ = Asia/Shanghai
2024-03-05 12:08:41 +08:00
2024-11-08 16:31:52 +08:00
# Uncomment the following line if you have limited access to huggingface.co:
2024-09-29 18:24:24 +08:00
# HF_ENDPOINT=https://hf-mirror.com
2024-09-23 10:00:44 +08:00
2024-11-08 19:46:18 +08:00
# Optimizations for MacOS
2025-03-12 16:07:22 +08:00
# Uncomment the following line if your operating system is MacOS:
2024-11-08 16:50:35 +08:00
# MACOS=1
2024-11-22 12:03:46 +08:00
2025-12-03 18:32:15 +08:00
# The maximum file size limit (in bytes) for each upload to your dataset or RAGFlow's File system.
2025-03-26 09:03:18 +08:00
# To change the 1GB file size limit, uncomment the line below and update as needed.
2025-03-14 16:47:39 +08:00
# MAX_CONTENT_LENGTH=1073741824
2025-03-26 09:03:18 +08:00
# After updating, ensure `client_max_body_size` in nginx/nginx.conf is updated accordingly.
# Note that neither `MAX_CONTENT_LENGTH` nor `client_max_body_size` sets the maximum size for files uploaded to an agent.
# See https://ragflow.io/docs/dev/begin_component for details.
2024-11-22 12:03:46 +08:00
Feat: make document parsing and embedding batch sizes configurable via environment variables (#8266)
### Description
This PR introduces two new environment variables, `DOC_BULK_SIZE` and
`EMBEDDING_BATCH_SIZE`, to allow flexible tuning of batch sizes for
document parsing and embedding vectorization in RAGFlow. By making these
parameters configurable, users can optimize performance and resource
usage according to their hardware capabilities and workload
requirements.
### What problem does this PR solve?
Previously, the batch sizes for document parsing and embedding were
hardcoded, limiting the ability to adjust throughput and memory
consumption. This PR enables users to set these values via environment
variables (in `.env`, Helm chart, or directly in the deployment
environment), improving flexibility and scalability for both small and
large deployments.
- `DOC_BULK_SIZE`: Controls how many document chunks are processed in a
single batch during document parsing (default: 4).
- `EMBEDDING_BATCH_SIZE`: Controls how many text chunks are processed
in a single batch during embedding vectorization (default: 16).
This change updates the codebase, documentation, and configuration files
to reflect the new options.
### Type of change
- [ ] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
- [x] Documentation Update
- [ ] Refactoring
- [x] Performance Improvement
- [ ] Other (please describe):
### Additional context
- Updated `.env`, `helm/values.yaml`, and documentation to describe
the new variables.
- Modified relevant code paths to use the environment variables instead
of hardcoded values.
- Users can now tune these parameters to achieve better throughput or
reduce memory usage as needed.
Before:
Default value:
<img width="643" alt="image"
src="https://github.com/user-attachments/assets/086e1173-18f3-419d-a0f5-68394f63866a"
/>
After:
10x:
<img width="777" alt="image"
src="https://github.com/user-attachments/assets/5722bbc0-0bcb-4536-b928-077031e550f1"
/>
2025-06-16 13:40:47 +08:00
# Controls how many documents are processed in a single batch.
# Defaults to 4 if DOC_BULK_SIZE is not explicitly set.
DOC_BULK_SIZE = ${ DOC_BULK_SIZE :- 4 }
# Defines the number of items to process per batch when generating embeddings.
# Defaults to 16 if EMBEDDING_BATCH_SIZE is not set in the environment.
EMBEDDING_BATCH_SIZE = ${ EMBEDDING_BATCH_SIZE :- 16 }
2025-04-24 18:02:32 +08:00
# Log level for the RAGFlow's own and imported packages.
# Available levels:
2024-12-02 17:24:39 +08:00
# - `DEBUG`
# - `INFO` (default)
# - `WARNING`
# - `ERROR`
2025-04-24 18:02:32 +08:00
# For example, the following line changes the log level of `ragflow.es_conn` to `DEBUG`:
2024-12-02 17:24:39 +08:00
# LOG_LEVELS=ragflow.es_conn=DEBUG
2025-02-27 17:02:42 +08:00
# aliyun OSS configuration
# STORAGE_IMPL=OSS
# ACCESS_KEY=xxx
# SECRET_KEY=eee
# ENDPOINT=http://oss-cn-hangzhou.aliyuncs.com
# REGION=cn-hangzhou
2025-03-02 18:47:06 +08:00
# BUCKET=ragflow65536
2026-01-22 11:43:55 +08:00
#
2025-03-21 09:38:15 +08:00
2025-04-24 18:02:32 +08:00
# A user registration switch:
# - Enable registration: 1
# - Disable registration: 0
2025-03-21 09:38:15 +08:00
REGISTER_ENABLED = 1
2025-05-16 11:14:57 +08:00
2026-05-07 21:23:13 +08:00
# -----------------------------------------------------------------------------
# Sandbox
# -----------------------------------------------------------------------------
2026-05-20 16:56:20 +08:00
# Sandbox provider type and runtime settings are configured in Admin > Sandbox
# Settings.
2026-05-07 21:23:13 +08:00
# Enable sandbox support.
2025-10-23 23:02:27 +08:00
# SANDBOX_ENABLED=1
# COMPOSE_PROFILES=${COMPOSE_PROFILES},sandbox
2026-05-07 21:23:13 +08:00
# Shared sandbox settings
# The MinIO bucket name for storing sandbox-generated artifacts.
# SANDBOX_ARTIFACT_BUCKET=sandbox-artifacts
2026-05-20 16:56:20 +08:00
2026-05-07 21:23:13 +08:00
# Number of days before sandbox artifacts are automatically deleted.
# SANDBOX_ARTIFACT_EXPIRE_DAYS=7
2026-05-20 16:56:20 +08:00
# Self-managed deployment defaults
# These values are used by the `sandbox` compose profile and shown in Admin as
# deployment defaults for the self-managed provider.
2025-05-16 11:14:57 +08:00
# Pull the required base images before running:
# docker pull infiniflow/sandbox-base-nodejs:latest
# docker pull infiniflow/sandbox-base-python:latest
2026-05-07 21:23:13 +08:00
# Default runtime images include:
# - Node.js base image: axios
# - Python base image: requests, numpy, pandas
# SANDBOX_EXECUTOR_MANAGER_IMAGE=${SANDBOX_EXECUTOR_MANAGER_IMAGE:-infiniflow/sandbox-executor-manager:latest}
# SANDBOX_EXECUTOR_MANAGER_POOL_SIZE=${SANDBOX_EXECUTOR_MANAGER_POOL_SIZE:-3}
# SANDBOX_BASE_PYTHON_IMAGE=${SANDBOX_BASE_PYTHON_IMAGE:-infiniflow/sandbox-base-python:latest}
# SANDBOX_BASE_NODEJS_IMAGE=${SANDBOX_BASE_NODEJS_IMAGE:-infiniflow/sandbox-base-nodejs:latest}
# SANDBOX_EXECUTOR_MANAGER_PORT=${SANDBOX_EXECUTOR_MANAGER_PORT:-9385}
2025-05-16 11:14:57 +08:00
# SANDBOX_ENABLE_SECCOMP=false
2025-05-20 17:21:28 +08:00
# SANDBOX_MAX_MEMORY=256m # b, k, m, g
# SANDBOX_TIMEOUT=10s # s, m, 1m30s
2026-05-07 21:23:13 +08:00
2026-05-20 16:56:20 +08:00
# -----------------------------------------------------------------------------
# Sandbox End
# -----------------------------------------------------------------------------
2025-05-16 11:14:57 +08:00
2025-11-20 19:07:17 +08:00
# Enable DocLing
2025-10-23 19:44:25 +08:00
USE_DOCLING = false
2025-11-20 19:07:17 +08:00
# Enable Mineru
2025-12-11 17:33:12 +08:00
# Uncommenting these lines will automatically add MinerU to the model provider whenever possible.
2025-12-25 15:04:08 +08:00
# More details see https://ragflow.io/docs/faq#how-to-use-mineru-to-parse-pdf-documents.
2025-12-11 17:33:12 +08:00
# MINERU_DELETE_OUTPUT=0 # keep output directory
# MINERU_BACKEND=pipeline # or another backend you prefer
2025-11-20 19:07:17 +08:00
2025-11-11 19:56:54 +08:00
# pptx support
2025-12-11 17:33:12 +08:00
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = 1
2025-12-15 09:45:18 +08:00
# crypto utils
# RAGFLOW_CRYPTO_ENABLED=true
# RAGFLOW_CRYPTO_ALGORITHM=aes-256-cbc # one of aes-256-cbc, aes-128-cbc, sm4-cbc
# RAGFLOW_CRYPTO_KEY=ragflow-crypto-key
2026-01-20 13:29:37 +08:00
# Used for ThreadPoolExecutor
feat: Add `disable_password_login` configuration to support SSO-only authentication (#13151)
### What problem does this PR solve?
Enterprise deployments that use an external Identity Provider (e.g.,
Microsoft Entra ID, Okta, Keycloak) need the ability to enforce SSO-only
authentication by hiding the email/password login form. Currently, the
login page always shows the password form alongside OAuth buttons, with
no way to disable it.
This PR adds a `disable_password_login` configuration option under the
existing `authentication` section in `service_conf.yaml`. When set to
`true`, the login page only displays configured OAuth/SSO buttons and
hides the email/password form, "Remember me" checkbox, and "Sign up"
link.
The flag can be set via:
- `service_conf.yaml` (`authentication.disable_password_login: true`)
- Environment variable (`DISABLE_PASSWORD_LOGIN=true`)
Default behavior is unchanged (`false`).
### Behavior
| `disable_password_login` | OAuth configured | Result |
|---|---|---|
| `false` (default) | No | Standard email/password form |
| `false` | Yes | Email/password form + SSO buttons below |
| `true` | Yes | **SSO buttons only** (no form, no sign up link) |
| `true` | No | Empty card (admin should configure OAuth first) |
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
### Files changed (5)
1. `docker/service_conf.yaml.template` — added `disable_password_login:
false` under authentication
2. `common/settings.py` — added `DISABLE_PASSWORD_LOGIN` global variable
and loader in `init_settings()`
3. `common/config_utils.py` — fixed `TypeError` in `show_configs()` when
authentication section contains non-dict values (e.g., booleans)
4. `api/apps/system_app.py` — exposed `disablePasswordLogin` flag in
`/config` endpoint
5. `web/src/pages/login/index.tsx` — conditionally render password form
based on config flag; OAuth buttons always render when channels exist
---------
Co-authored-by: Ahmad Intisar <ahmadintisar@Ahmads-MacBook-M4-Pro.local>
2026-03-02 11:06:03 +05:00
THREAD_POOL_MAX_WORKERS = 128
#Option to disable login form for SSO
2026-03-25 18:17:52 +08:00
DISABLE_PASSWORD_LOGIN = false