Skip to main content

Uploading Documents

RAG-DocBot can index documents from two sources: the built-in docs/ directory and external directories mounted as connectors.


The docs/ Directory

The simplest way to add documents is to drop files into the ./docs/ directory created by the installer. RAG-DocBot monitors this directory and can index any files placed there.


Mounting an External Directory (Connectors)

You can mount any host directory as a read-only document source. This is useful for indexing existing document libraries without moving files.

Two steps are required — both are mandatory:

Step 1 — Add the volume mount in docker-compose.yml

In the backend service definition, add a volume entry for your directory:

services:
backend:
volumes:
- ./docs:/app/docs
- /path/to/your/documents:/app/custom-docs:ro

Use :ro (read-only) so RAG-DocBot cannot modify your original files.

Step 2 — Add the container-side path to CONNECTOR_ALLOWED_PATHS

In your .env file, add the container-side path to CONNECTOR_ALLOWED_PATHS. Multiple paths are separated by colons. Always include /app/docs:

CONNECTOR_ALLOWED_PATHS=/app/docs:/app/custom-docs
warning

If a path is not listed in CONNECTOR_ALLOWED_PATHS, the connector will be rejected even if the volume is mounted correctly. Both steps must be completed.

Step 3 — Restart the backend

After editing docker-compose.yml and .env, restart the backend service:

docker compose up -d backend

Step 4 — Add the connector in the UI

  1. In the DocBot UI, go to the Connectors section.
  2. Add a new connector pointing to the container-side path (e.g. /app/custom-docs).
  3. Trigger a scan to index the documents.