R2R Full Installation

This installation guide is for Full R2R. For solo developers or teams prototyping, we recommend starting with R2R Light.

This guide will walk you through installing and running R2R using Docker, which is the quickest and easiest way to get started.

Prerequisites

Installation

1

Clone the R2R repository

Clone the R2R repository for access to the Docker compose files:

1git clone https://github.com/SciPhi-AI/R2R.git
2cd R2R/docker
2

Set environment variables

The full R2R installation uses a pre-built custom configuration full.toml rather than the default r2r.toml.

Navigate to the env directory and set up your environment variables:

1cd env
2# Edit r2r-full.env with your preferred text editor
3sudo nano r2r-full.env

Required Environment Variables

Configuration Selection (choose one)

VariableDescriptionDefault
R2R_CONFIG_NAMEUses a predefined configurationfull (OpenAI)
R2R_CONFIG_PATHPath to your custom TOML configNone

Set R2R_CONFIG_NAME=full_ollama to use local models instead of cloud providers.

LLM API Keys (at least one required)

ProviderEnvironment VariableUsed With
OpenAIOPENAI_API_KEYR2R_CONFIG_NAME=full
AnthropicANTHROPIC_API_KEYCustom config or runtime overrides
OllamaOLLAMA_API_BASER2R_CONFIG_NAME=full_ollama

For Ollama, the default value is http://host.docker.internal:11434

External Agent Tools (optional)

ToolEnvironment VariablePurposeProvider Link
web_searchSERPER_API_KEYEnable web search toolSerper
web_scrapeFIRECRAWL_API_KEYEnable web scrape toolFirecrawl

These environment variables are only required if you plan to use the web_search or web_scrape tools with the Agentic RAG functionality. R2R will function without these for local document operations.

When starting R2R with agent tools, include these variables with your launch command:

$# Example with Cloud LLMs and Agent Tools
>export OPENAI_API_KEY=sk-...
>export ANTHROPIC_API_KEY=sk-...
>export SERPER_API_KEY=your_serper_api_key_here
>export FIRECRAWL_API_KEY=your_firecrawl_api_key_here
>
>COMPOSE_PROFILES=postgres docker compose -f compose.full.yaml up -d

See the full configuration guide for additional options.

3

Custom Configuration (Optional)

If you’re using a custom configuration file instead of the built-in options, follow these steps:

  1. Create a TOML configuration file in the user_configs directory:
1# Navigate to the user_configs directory
2cd user_configs
3
4# Create a new configuration file (e.g., my_config.toml)
5touch my_config.toml
6
7# Edit the file with your configuration settings
8nano my_config.toml
  1. Update your r2r-full.env file to point to this configuration:
R2R_CONFIG_PATH=/app/user_configs/my_config.toml

The path in R2R_CONFIG_PATH must use the container path (/app/user_configs/), not your local system path.

Make sure the specified configuration file actually exists in the user_configs directory. The application will fail to start if it cannot find the file at the specified path.

For examples and configuration templates, see the Configuration Guide.

4

Start the R2R services

Return to the docker directory and start the services:

1cd ..
2docker compose -f compose.full.yaml --profile postgres up -d
3# `--profile postgres` can be omitted when using external Postgres
5

Interact with R2R

Ether install the Python or JS SDK, or navigate to http://localhost:7273 to interact with R2R via the dashboard.

To install the Python SDK:

1pip install r2r

Next Steps

After successfully installing R2R:

  1. Verify Installation: Ensure all components are running correctly by accessing the R2R API at http://localhost:7272/v3/health.

  2. Quick Start: Follow our R2R Quickstart Guide to set up your first RAG application.

  3. In-Depth Tutorial: For a more comprehensive understanding, work through our R2R Walkthrough.

  4. Customize Your Setup: Configuration your R2R system.

If you encounter any issues during installation or setup, please use our Discord community or GitHub repository to seek assistance.