R2R Docker Installation

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

Prerequisites

Install the R2R CLI & Python SDK

First, install the R2R CLI and Python SDK:

pip install r2r
We are actively developing a distinct CLI binary for R2R for easier installation. Please reach out if you have any specific needs or feature requests.

Start R2R with Docker

To start R2R with OpenAI as the default LLM inference and embedding provider:

# Set cloud LLM settings
export OPENAI_API_KEY=sk-...

r2r serve --docker --config-name=default

Refer here for more information on how to configure various LLM providers.

Hatchet (RabbitMQ based orchestration), Neo4j, and Postgres come bundled into the R2R Docker by default. If you prefer to use your own deployments of either Neo4j or Postgres, you may optionally include the flags --exclude-neo4j and/or --exclude-postgres.

Excluding postgres requires that a valid configuration be selected, such as core/configs/neo4j_kg_no_vector_postgres.toml.

The above command will automatically pull the necessary Docker images and start all the required containers, including R2R, Hatchet, Neo4j, and Postgres+pgvector.

The end result is a live server at http://localhost:7272 serving the R2R API.

In addition to launching a RESTful API, the R2R Docker also launches a applications at localhost:7273 and localhost:7274, which you can read more about here.

Stopping R2R

Safely stop your system by running r2r docker-down to avoid potential shutdown complications.

Next Steps

After successfully installing R2R:

  1. Verify Installation: Ensure all components are running correctly by accessing the R2R API at http://localhost:7272/v2/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: Configure R2R components with the Configuration Guide.

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