Mac computers can also deploy ragflow, see the tutorial!

Written by
Audrey Miles
Updated on:July-08th-2025
Recommendation

Good news for Mac users! RAGflow deployment is no longer difficult, and detailed tutorials will help you get started easily.

Core content:
1. Introduction to official deployment methods and pain points for Mac users
2. Installation of tools and environment configuration required before deployment
3. Detailed steps, a full-process guide from downloading to running

Yang Fangxian
Founder of 53AI/Most Valuable Expert of Tencent Cloud (TVP)

 

As a popular RAG knowledge base, RAGflow has been very popular since its inception. The official also proposed two deployment methods: docker deployment and source code deployment.

However, there are various problems for Mac users. And the official does not maintain ARM Docker images.

Blogger, I will share my deployment method with you. The entire deployment is based on the official operation manual.

https://ragflow.io/docs/dev/launch_ragflow_from_source

Pre-installation preparation

We must install three tools before source code deployment.

1. Docker environment, used to install the resource packages that ragflow depends on: mysql, es, and minio resources.

2. Nodejs environment, used to deploy the web front-end environment.

3. UV package manager. For Mac, you can directly enter brew  install uv in the command box.

Specific steps for installation

Most of the commands are consistent with the official ones. Remember, the red commands must be executed!

Step 1: Download package resources

git clone https://github.com/infiniflow/ragflow.git
cd ragflow/

Open the file pyproject.toml and change the xgboot version to 1.6.0

Otherwise, when you perform the next step, you will get this error:

Step 2: Install dependency files

uv sync --python 3.10

Step 3: Install dependent third-party libraries: mysql, es, minio, etc. Run the docker command directly for one-click installation.

docker compose -f docker/docker-compose-base.yml up -d

At this time, we can use the "docker ps" command to observe whether the third-party dependency library is installed normally.

Step 4: Modify the /etc/hosts file and add a line to configure the access path of es and mysql.

127.0.0.1 es01 infinity mysql minio redis

Tips: If the hosts file cannot be modified, you can directly copy it to another folder, modify it and then overwrite the original file.

Step 5: Modify the Python running environment variables and configure the access mirror address.

source .venv/bin/activate
export PYTHONPATH=$(pwd)
export HF_ENDPOINT=https://hf-mirror.com

Step 6: Execute the following command:

First, you need to install pkg-config. If your computer has it, you can ignore this command.

brew install pkg-config

Step 7: Run the program and start the backend code. Note that there are two programs: ragflow_server and task_executor.

nohup python api/ragflow_server.py > logs/ragflow_server.log 2>&1 &

JEMALLOC_PATH=$(pkg-config --variable=libdir jemalloc)/libjemalloc.so;
LD_PRELOAD=$JEMALLOC_PATH python rag/svr/task_executor.py 1;

If there are no errors in the console and logs/ragflow_server.log, it means the program started successfully.

This is the log of ragflow.

This is the log of task_executor.

The next step is to execute the front end. Open a ragflow window and execute the following command. It is very simple:

cd web
npm i
npm run dev

If this command is found, it means it has been successfully started.

Written at the end

Today, I finally deployed the code on the Mac. Next, with the help of ragflow, there will be more ways to play waiting for everyone.