2024-11-18 19:07:05 +08:00
---
2024-11-25 14:31:01 +08:00
sidebar_position: 11
2024-11-18 19:07:05 +08:00
slug: /upgrade_ragflow
---
2025-04-01 19:05:30 +08:00
# Upgrading
2024-11-18 19:07:05 +08:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2025-10-23 23:02:27 +08:00
Upgrade RAGFlow to `nightly` or the latest, published release.
2024-11-25 17:29:56 +08:00
2025-04-01 19:05:30 +08:00
:::info NOTE
Upgrading RAGFlow in itself will *not* remove your uploaded/historical data. However, be aware that `docker compose -f docker/docker-compose.yml down -v` will remove Docker container volumes, resulting in data loss.
:::
2025-10-23 23:02:27 +08:00
## Upgrade RAGFlow to `nightly`, the most recent, tested Docker image
2024-11-25 17:29:56 +08:00
2025-10-23 23:02:27 +08:00
`nightly` refers to the RAGFlow Docker image without embedding models.
2024-11-28 14:57:50 +08:00
To upgrade RAGFlow, you must upgrade **both** your code **and** your Docker image:
2024-11-18 19:07:05 +08:00
2024-11-19 14:59:21 +08:00
1. Clone the repo
2024-11-18 19:07:05 +08:00
2024-11-19 14:59:21 +08:00
```bash
git clone https://github.com/infiniflow/ragflow.git
```
2024-11-18 19:07:05 +08:00
2024-11-25 17:29:56 +08:00
2. Update **ragflow/docker/.env**:
2024-11-18 19:07:05 +08:00
2025-10-23 23:02:27 +08:00
```bash
RAGFLOW_IMAGE=infiniflow/ragflow:nightly
```
2024-11-18 19:07:05 +08:00
2024-11-19 14:59:21 +08:00
3. Update RAGFlow image and restart RAGFlow:
2024-11-18 19:07:05 +08:00
2024-11-19 14:59:21 +08:00
```bash
docker compose -f docker/docker-compose.yml pull
docker compose -f docker/docker-compose.yml up -d
```
2024-11-18 19:07:05 +08:00
2024-11-25 17:29:56 +08:00
## Upgrade RAGFlow to the most recent, officially published release
2024-11-18 19:07:05 +08:00
2024-11-28 14:57:50 +08:00
To upgrade RAGFlow, you must upgrade **both** your code **and** your Docker image:
2024-11-19 14:59:21 +08:00
1. Clone the repo
2024-11-18 19:07:05 +08:00
2024-11-19 14:59:21 +08:00
```bash
git clone https://github.com/infiniflow/ragflow.git
```
2024-11-18 19:07:05 +08:00
2025-10-23 18:55:41 +08:00
2. Switch to the latest, officially published release, e.g., `v0.21.1`:
2024-11-18 19:07:05 +08:00
2024-11-19 14:59:21 +08:00
```bash
2025-10-23 18:55:41 +08:00
git checkout -f v0.21.1
2024-11-19 14:59:21 +08:00
```
2024-11-18 19:07:05 +08:00
2025-07-09 17:13:04 +08:00
3. Update **ragflow/docker/.env**:
2024-11-18 19:07:05 +08:00
2025-10-23 23:02:27 +08:00
```bash
RAGFLOW_IMAGE=infiniflow/ragflow:v0.21.1
```
2024-11-18 19:07:05 +08:00
2024-11-19 14:59:21 +08:00
4. Update the RAGFlow image and restart RAGFlow:
2024-11-18 19:07:05 +08:00
2024-11-19 14:59:21 +08:00
```bash
docker compose -f docker/docker-compose.yml pull
docker compose -f docker/docker-compose.yml up -d
2025-04-01 19:05:30 +08:00
```
## Frequently asked questions
2025-09-25 09:45:27 +08:00
### Do I need to back up my datasets before upgrading RAGFlow?
2025-06-23 17:45:20 +08:00
2025-09-25 09:45:27 +08:00
No, you do not need to. Upgrading RAGFlow in itself will *not* remove your uploaded data or dataset settings. However, be aware that `docker compose -f docker/docker-compose.yml down -v` will remove Docker container volumes, resulting in data loss.
2025-06-23 17:45:20 +08:00
2025-04-01 19:05:30 +08:00
### Upgrade RAGFlow in an offline environment (without Internet access)
1. From an environment with Internet access, pull the required Docker image.
2. Save the Docker image to a **.tar** file.
```bash
2025-10-23 18:55:41 +08:00
docker save -o ragflow.v0.21.1.tar infiniflow/ragflow:v0.21.1
2025-04-01 19:05:30 +08:00
```
3. Copy the **.tar** file to the target server.
4. Load the **.tar** file into Docker:
```bash
2025-10-23 18:55:41 +08:00
docker load -i ragflow.v0.21.1.tar
2025-04-01 19:05:30 +08:00
```