You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configurations.md 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. ---
  2. sidebar_position: 1
  3. slug: /configurations
  4. ---
  5. # Configurations
  6. Configurations for deploying RAGFlow via Docker.
  7. ## Guidelines
  8. When it comes to system configurations, you will need to manage the following files:
  9. - [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env): Contains important environment variables for Docker.
  10. - [service_conf.yaml.template](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml.template): Configures the back-end services. It specifies the system-level configuration for RAGFlow and is used by its API server and task executor. Upon container startup, the `service_conf.yaml` file will be generated based on this template file. This process replaces any environment variables within the template, allowing for dynamic configuration tailored to the container's environment.
  11. - [docker-compose.yml](https://github.com/infiniflow/ragflow/blob/main/docker/docker-compose.yml): The Docker Compose file for starting up the RAGFlow service.
  12. To update the default HTTP serving port (80), go to [docker-compose.yml](./docker/docker-compose.yml) and change `80:80`
  13. to `<YOUR_SERVING_PORT>:80`.
  14. :::tip NOTE
  15. Updates to the above configurations require a reboot of all containers to take effect:
  16. ```bash
  17. docker compose -f docker/docker-compose.yml up -d
  18. ```
  19. :::
  20. ## Docker Compose
  21. - **docker-compose.yml**
  22. Sets up environment for RAGFlow and its dependencies.
  23. - **docker-compose-base.yml**
  24. Sets up environment for RAGFlow's dependencies: Elasticsearch/[Infinity](https://github.com/infiniflow/infinity), MySQL, MinIO, and Redis.
  25. :::danger IMPORTANT
  26. We do not actively maintain **docker-compose-CN-oc9.yml**, **docker-compose-gpu-CN-oc9.yml**, or **docker-compose-gpu.yml**, so use them at your own risk. However, you are welcome to file a pull request to improve any of them.
  27. :::
  28. ## Docker environment variables
  29. The [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env) file contains important environment variables for Docker.
  30. ### Elasticsearch
  31. - `STACK_VERSION`
  32. The version of Elasticsearch. Defaults to `8.11.3`
  33. - `ES_PORT`
  34. The port used to expose the Elasticsearch service to the host machine, allowing **external** access to the service running inside the Docker container. Defaults to `1200`.
  35. - `ELASTIC_PASSWORD`
  36. The password for Elasticsearch.
  37. ### Kibana
  38. - `KIBANA_PORT`
  39. The port used to expose the Kibana service to the host machine, allowing **external** access to the service running inside the Docker container. Defaults to `6601`.
  40. - `KIBANA_USER`
  41. The username for Kibana. Defaults to `rag_flow`.
  42. - `KIBANA_PASSWORD`
  43. The password for Kibana. Defaults to `infini_rag_flow`.
  44. ### Resource management
  45. - `MEM_LIMIT`
  46. The maximum amount of the memory, in bytes, that *a specific* Docker container can use while running. Defaults to `8073741824`.
  47. ### MySQL
  48. - `MYSQL_PASSWORD`
  49. The password for MySQL.
  50. - `MYSQL_PORT`
  51. The port used to expose the MySQL service to the host machine, allowing **external** access to the MySQL database running inside the Docker container. Defaults to `5455`.
  52. ### MinIO
  53. - `MINIO_CONSOLE_PORT`
  54. 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. Defaults to `9001`
  55. - `MINIO_PORT`
  56. 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. Defaults to `9000`.
  57. - `MINIO_USER`
  58. The username for MinIO.
  59. - `MINIO_PASSWORD`
  60. The password for MinIO.
  61. ### Redis
  62. - `REDIS_PORT`
  63. The port used to expose the Redis service to the host machine, allowing **external** access to the Redis service running inside the Docker container. Defaults to `6379`.
  64. - `REDIS_PASSWORD`
  65. The password for Redis.
  66. ### RAGFlow
  67. - `SVR_HTTP_PORT`
  68. The port used to expose RAGFlow's HTTP API service to the host machine, allowing **external** access to the service running inside the Docker container. Defaults to `9380`.
  69. - `RAGFLOW-IMAGE`
  70. The Docker image edition. Available editions:
  71. - `infiniflow/ragflow:v0.15.0-slim` (default): The RAGFlow Docker image without embedding models.
  72. - `infiniflow/ragflow:v0.15.0`: The RAGFlow Docker image with embedding models including:
  73. - Built-in embedding models:
  74. - `BAAI/bge-large-zh-v1.5`
  75. - `BAAI/bge-reranker-v2-m3`
  76. - `maidalun1020/bce-embedding-base_v1`
  77. - `maidalun1020/bce-reranker-base_v1`
  78. - Embedding models that will be downloaded once you select them in the RAGFlow UI:
  79. - `BAAI/bge-base-en-v1.5`
  80. - `BAAI/bge-large-en-v1.5`
  81. - `BAAI/bge-small-en-v1.5`
  82. - `BAAI/bge-small-zh-v1.5`
  83. - `jinaai/jina-embeddings-v2-base-en`
  84. - `jinaai/jina-embeddings-v2-small-en`
  85. - `nomic-ai/nomic-embed-text-v1.5`
  86. - `sentence-transformers/all-MiniLM-L6-v2`
  87. :::tip NOTE
  88. If you cannot download the RAGFlow Docker image, try the following mirrors.
  89. - For the `nightly-slim` edition:
  90. - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly-slim` or,
  91. - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly-slim`.
  92. - For the `nightly` edition:
  93. - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly` or,
  94. - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly`.
  95. :::
  96. ### Timezone
  97. - `TIMEZONE`
  98. The local time zone. Defaults to `'Asia/Shanghai'`.
  99. ### Hugging Face mirror site
  100. - `HF_ENDPOINT`
  101. The mirror site for huggingface.co. It is disabled by default. You can uncomment this line if you have limited access to the primary Hugging Face domain.
  102. ### MacOS
  103. - `MACOS`
  104. Optimizations for MacOS. It is disabled by default. You can uncomment this line if your OS is MacOS.
  105. ## Service configuration
  106. [service_conf.yaml.template](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml.template) specifies the system-level configuration for RAGFlow and is used by its API server and task executor.
  107. ### `ragflow`
  108. - `host`: The API server's IP address inside the Docker container. Defaults to `0.0.0.0`.
  109. - `port`: The API server's serving port inside the Docker container. Defaults to `9380`.
  110. ### `mysql`
  111. - `name`: The MySQL database name. Defaults to `rag_flow`.
  112. - `user`: The username for MySQL.
  113. - `password`: The password for MySQL.
  114. - `port`: The MySQL serving port inside the Docker container. Defaults to `3306`.
  115. - `max_connections`: The maximum number of concurrent connections to the MySQL database. Defaults to `100`.
  116. - `stale_timeout`: Timeout in seconds.
  117. ### `minio`
  118. - `user`: The username for MinIO.
  119. - `password`: The password for MinIO.
  120. - `host`: The MinIO serving IP *and* port inside the Docker container. Defaults to `minio:9000`.
  121. ### `oauth`
  122. The OAuth configuration for signing up or signing in to RAGFlow using a third-party account. It is disabled by default. To enable this feature, uncomment the corresponding lines in **service_conf.yaml.template**.
  123. - `github`: The GitHub authentication settings for your application. Visit the [Github Developer Settings](https://github.com/settings/developers) page to obtain your client_id and secret_key.
  124. ### `user_default_llm`
  125. The default LLM to use for a new RAGFlow user. It is disabled by default. To enable this feature, uncomment the corresponding lines in **service_conf.yaml.template**.
  126. - `factory`: The LLM supplier. Available options:
  127. - `"OpenAI"`
  128. - `"DeepSeek"`
  129. - `"Moonshot"`
  130. - `"Tongyi-Qianwen"`
  131. - `"VolcEngine"`
  132. - `"ZHIPU-AI"`
  133. - `api_key`: The API key for the specified LLM. You will need to apply for your model API key online.
  134. :::tip NOTE
  135. If you do not set the default LLM here, configure the default LLM on the **Settings** page in the RAGFlow UI.
  136. :::