sidebar_position: 2
A guide explaining how to set up a RAGFlow service from its source code. By following this guide, you’ll be able to debug using the source code.
Developers who have added new features or modified existing code and wish to debug using the source code, provided that their machine has the target deployment environment set up.
:::tip NOTE If you have not installed Docker on your local machine (Windows, Mac, or Linux), see the Install Docker Engine guide. :::
To launch the RAGFlow service from source code:
git clone https://github.com/infiniflow/ragflow.git
cd ragflow/
   curl -sSL https://install.python-poetry.org | python3 -
   export POETRY_VIRTUALENVS_CREATE=true POETRY_VIRTUALENVS_IN_PROJECT=true
   ~/.local/bin/poetry install --sync --no-root
A virtual environment named .venv is created, and all Python dependencies are installed into the new environment.
The following command launches the ‘base’ services (MinIO, Elasticsearch, Redis, and MySQL) using Docker Compose:
docker compose -f docker/docker-compose-base.yml up -d
host and port Settings for Third-party Services/etc/hosts to resolve all hosts specified in docker/service_conf.yaml to 127.0.0.1:   127.0.0.1       es01 mysql minio redis
5455 and es port to 1200, as specified in docker/.env.nginx line in docker/entrypoint.sh.   # /usr/sbin/nginx
   source .venv/bin/activate
   export PYTHONPATH=$(pwd)
   export HF_ENDPOINT=https://hf-mirror.com
   bash docker/entrypoint.sh
web directory and install the frontend dependencies:   cd web
   npm install --force
proxy.target in .umirc.ts to http://127.0.0.1:9380:   vim .umirc.ts
   npm run dev 
The following message appears, showing the IP address and port number of your frontend service:
In your web browser, enter http://127.0.0.1:<PORT>/, ensuring the port number matches that shown in the screenshot above.