Deployment guide

RAGFlow

Videos

Overview: RAGFlow on Ubuntu 24.04 on Azure: overview (watch on YouTube)

Launch and log in: RAGFlow on Ubuntu 24.04 on Azure: launch and log in (watch on YouTube)

Deep Dive: RAGFlow on Ubuntu 24.04 on Azure: deep dive (watch on YouTube)

Overview

RAGFlow is an open-source, self-hosted retrieval-augmented generation (RAG) engine built on deep document understanding. Its web workspace lets you build knowledge bases from your own documents, parse and chunk them with layout-aware models, and chat with answers that are grounded in, and cited back to, your content. It adds template-based chunking, hybrid retrieval and an agent flow builder for multi-step retrieval.

This SecureAnyCloud image ships RAGFlow as its official multi-service Docker Compose project under /opt/ragflow/docker. Only the web workspace on port 80 is exposed, and every datastore binds to the private container network or the loopback interface.

What you get:

  • RAGFlow, pinned to the stable release infiniflow/ragflow:v0.26.4, with its bundled nginx on port 80
  • Elasticsearch for hybrid retrieval, MySQL for metadata, MinIO object storage for your documents, Redis for task queues, and a CPU text embeddings service, all on the private Docker network
  • No default login. The image ships with no administrator and no user rows. Registration is open, so your first visit lands on the sign-up screen, and the first account you create becomes the administrator. ragflow-firstboot.service creates none
  • Per-instance secrets. The MySQL, MinIO, Redis and Elasticsearch passwords are generated uniquely on first boot into /opt/ragflow/docker/.env (readable only by root), so no two instances share a datastore secret and nothing secret ships inside the image
  • ragflow-firstboot.service, a oneshot unit that on first boot generates the datastore secrets, pulls the pinned images, brings the stack up, resolves the instance URL and writes a root-only instance info note, then disables itself
  • Always current. On first boot the stack runs docker compose pull to refresh the pinned RAGFlow release and its datastore images, so every launch runs verified, current software
  • Embedding included. A local CPU embedding service (BAAI/bge-small-en-v1.5) lets document embedding run on the VM with no external key. Add it in Model providers as an OpenAI-compatible endpoint, or connect your own
  • Bring your own LLM. For chat and answer generation, add your own large language model provider (OpenAI, Anthropic, or a local Ollama or vLLM endpoint) from the interface after you sign up. No third-party AI key ships in the image
  • Docker Engine with the Compose plugin from the official Docker repository
  • ragflow.service managing the Compose stack
  • The Elasticsearch kernel requirement (vm.max_map_count=262144) applied persistently
  • Ubuntu 24.04 LTS base, patched at build time
  • 24/7 SecureAnyCloud support, with a 24-hour response SLA

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet.

RAGFlow is a multi-service stack that runs Elasticsearch, so size the VM accordingly. The recommended VM size is Standard_D4s_v5 (4 vCPU, 16 GB RAM), which is RAGFlow's documented minimum.

Document embedding runs on CPU, so the VM does not need a GPU. The language model you connect for chat runs at your chosen provider or on a separate endpoint.

1

Deploy from the Azure Portal

In the Azure Portal, search the Marketplace for RAGFlow on Ubuntu 24.04. Choose a VM size with at least 4 vCPU and 16 GB RAM.

Attach a network security group (NSG) that allows TCP 22 (SSH) from your management network and TCP 80 and 443 (the workspace) from the networks that need access. For production, put TLS in front of port 80, as described in the HTTPS step below.

2

Deploy from the Azure CLI

RG="ragflow-prod"; LOCATION="eastus"; VM_NAME="ragflow-01" IMAGE_URN="sac1647283583153:ragflow-ubuntu-24-04:default:latest" SSH_KEY="$(cat ~/.ssh/id_rsa.pub)" az group create --name "$RG" --location "$LOCATION" az network vnet create -g "$RG" --name rf-vnet --address-prefix 10.90.0.0/16 --subnet-name rf-subnet --subnet-prefix 10.90.1.0/24 az network nsg create -g "$RG" --name rf-nsg az network nsg rule create -g "$RG" --nsg-name rf-nsg --name allow-ssh --priority 100 \
  --source-address-prefixes "<your-mgmt-cidr>" --destination-port-ranges 22 --access Allow --protocol Tcp az network nsg rule create -g "$RG" --nsg-name rf-nsg --name allow-web --priority 110 \
  --source-address-prefixes "<your-mgmt-cidr>" --destination-port-ranges 80 443 --access Allow --protocol Tcp
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:ragflow-ubuntu-24-04:default:latest
az vm create -g "$RG" --name "$VM_NAME" --image "$IMAGE_URN" \
  --size Standard_D4s_v5 --storage-sku StandardSSD_LRS --os-disk-size-gb 64 \
  --admin-username azureuser --ssh-key-values "$SSH_KEY" \
  --vnet-name rf-vnet --subnet rf-subnet --nsg rf-nsg --public-ip-sku Standard

First boot takes a few minutes. In the background, the VM generates its own credentials and starts the services. If you connect as soon as the VM shows as running, wait for that setup to finish before you continue:

bash sudo cloud-init status --wait

The command prints status: done when the VM is ready. The credentials and services described below exist only after that point.

3

Connect via SSH

Connect to the VM as the administrator user you created:

ssh azureuser@<vm-ip>
4

Verify the services are running

Docker runs the Compose stack, and RAGFlow serves its own nginx on port 80. Check both services and the port:

sudo systemctl is-active docker ragflow
sudo ss -tln | grep ':80 ' curl -s -o /dev/null -w 'GET / -> HTTP %{http_code}\n' http://127.0.0.1/

Both services report active, RAGFlow is bound to :80, and the web workspace returns HTTP 200.

5

Confirm there is no default login

Nothing sensitive ships in the image. MySQL has zero users, so every instance starts at the sign-up screen. The instance info note in /root is root-only and holds no credential, only the resolved URL. The datastore secrets file is also readable only by root.

Run these commands to confirm:

MP=$(sudo grep '^MYSQL_PASSWORD=' /opt/ragflow/docker/.env | cut -d= -f2-)
echo "MySQL user count: $(sudo docker compose -f /opt/ragflow/docker/docker-compose.yml exec -T mysql mysql -uroot -p"$MP" rag_flow -N -B -e 'select count(*) from user')"
sudo grep -E '^RAGFLOW_URL|^NOTE' /root/ragflow-info.txt
sudo stat -c '%n perms=%a owner=%U:%G' /opt/ragflow/docker/.env

The user count is 0, so no administrator exists. The note tells you to create your own account at the sign-up screen. The .env file that holds the per-instance datastore secrets is 600 root:root.

6

Create your account

Open http://<vm-ip>/ in your browser. Because no administrator ships and registration is open, RAGFlow shows its sign-up screen.

Enter your Email, a display Nickname and a strong Password, then submit. The first account you create becomes the administrator, so choose a strong password and register right after launch.

Then disable open sign-up so no one else can register on your instance. Set REGISTER_ENABLED=0 in /opt/ragflow/docker/.env and run sudo systemctl restart ragflow.

After you sign in, you land on your knowledge bases. This is where you create the datasets that RAGFlow parses, chunks and retrieves from.

7

Configure your AI models

Before you build a knowledge base, tell RAGFlow which models to use. You need an embedding model, which turns document chunks into vectors, and a language model for chat and answers.

Open Model providers from your account settings. The image includes a local CPU embedding service (BAAI/bge-small-en-v1.5). Add it as an OpenAI-compatible provider that points at http://tei/v1, and document embedding runs on the VM with no external key. You can also add your own provider, such as OpenAI, Anthropic, Gemini or DeepSeek.

Add at least an embedding model and a chat model, then set them as your defaults.

Next, open Dataset, create a knowledge base and upload your documents. RAGFlow parses each file with its layout-aware models and splits it into chunks using the chunking template you pick. It then embeds each chunk so it can be retrieved.

8

Chat with your documents

Open Chat and create an assistant over one or more knowledge bases. Select one of the chat models you configured.

Ask a question. RAGFlow retrieves the relevant chunks and answers with citations back to the source documents.

9

Inspect the runtime stack

List the Docker version, the Compose services and the images in use:

docker --version sudo docker compose -f /opt/ragflow/docker/docker-compose.yml ps
sudo docker image ls --format '{{.Repository}}:{{.Tag}} {{.Size}}' | grep -E 'ragflow|elasticsearch|mysql|minio|valkey'

Docker runs the multi-container Compose stack. The RAGFlow server, Elasticsearch, MySQL, MinIO, Redis and embedding containers all report Up or healthy.

10

Data, persistence and staying current

RAGFlow data (metadata, documents and the retrieval index) lives in Docker named volumes captured into the image. The first-boot service keeps every instance current.

sudo docker volume ls --format '{{.Name}}' | grep ragflow systemctl is-enabled ragflow-firstboot.service apt-mark showhold

The ragflow_mysql_data, ragflow_minio_data, ragflow_esdata01, ragflow_redis_data and ragflow_tei_data volumes hold the metadata, documents, retrieval index and embedding model cache.

The first-boot service has already run once and disabled itself on this instance. No packages are held, so the OS security baseline is intact.

11

Enable HTTPS

RAGFlow serves the workspace on port 80 inside its container. To add TLS, terminate HTTPS on a reverse proxy on the host.

Install nginx on the host and point a DNS record at your VM. Then obtain a certificate with certbot and proxy to 127.0.0.1:80:

sudo apt-get install -y nginx certbot python3-certbot-nginx
# add an nginx server block that proxy_passes to http://127.0.0.1:80, then:
sudo certbot --nginx -d <your-domain> --agree-tos -m <your-email> --redirect

certbot installs the certificate, rewrites the nginx server block for TLS and sets up automatic renewal. Your workspace is then served over HTTPS.

Managing the service

sudo systemctl is-active ragflow docker

Both services report active. ragflow.service manages the Compose stack.

Run sudo systemctl restart ragflow to restart it. Run sudo docker compose -f /opt/ragflow/docker/docker-compose.yml logs -f to follow the container logs live.

To refresh to the pinned release at any time, run sudo docker compose -f /opt/ragflow/docker/docker-compose.yml pull, then sudo systemctl restart ragflow.

To back up the instance, snapshot the OS disk, or export the datastore volumes while the service is stopped.

Support

SecureAnyCloud provides 24/7 support for this image by email and live chat. Support covers deployment, TLS termination, language model provider configuration, knowledge base tuning, upgrades and performance tuning. Email sales@secureanycloud.com.

This is a repackaged open-source software product, with additional charges for SecureAnyCloud support services. RAGFlow is a trademark of its respective owner. All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Deploy on Azure

Launch RAGFlow on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure