Deploy with Docker
OpenRAG is is currently in public preview. Development is ongoing, and the features and functionality are subject to change.
There are two different Docker Compose files. They deploy the same applications and containers, but to different environments.
-
docker-compose.ymlis an OpenRAG deployment with GPU support for accelerated AI processing. -
docker-compose-cpu.ymlis a CPU-only version of OpenRAG for systems without GPU support. Use this Docker compose file for environments where GPU drivers aren't available.
Prerequisites
- Python Version 3.10 to 3.13
- uv
- Podman (recommended) or Docker installed
- Docker Compose installed. If you're using Podman, use podman-compose or alias Docker compose commands to Podman commands.
- Create an OpenAI API key. This key is required to start OpenRAG, but you can choose a different model provider during Application Onboarding.
- Optional: GPU support requires an NVIDIA GPU with CUDA support and compatible NVIDIA drivers installed on the OpenRAG host machine. If you don't have GPU capabilities, OpenRAG provides an alternate CPU-only deployment.
Deploy OpenRAG with Docker Compose
To install OpenRAG with Docker Compose, do the following:
-
Clone the OpenRAG repository.
git clone https://github.com/langflow-ai/openrag.git
cd openrag -
Copy the example
.envfile included in the repository root. The example file includes all environment variables with comments to guide you in finding and setting their values.cp .env.example .envAlternatively, create a new
.envfile in the repository root.touch .env -
Set environment variables. The Docker Compose files will be populated with values from your
.env. The following values are required to be set:OPENSEARCH_PASSWORD=your_secure_password
OPENAI_API_KEY=your_openai_api_key
LANGFLOW_SUPERUSER=admin
LANGFLOW_SUPERUSER_PASSWORD=your_langflow_password
LANGFLOW_SECRET_KEY=your_secret_keyFor more information on configuring OpenRAG with environment variables, see Environment variables.
-
Deploy OpenRAG with Docker Compose based on your deployment type.
For GPU-enabled systems, run the following command:
docker compose up -dFor CPU-only systems, run the following command:
docker compose -f docker-compose-cpu.yml up -dThe OpenRAG Docker Compose file starts five containers:
Container Name Default Address Purpose OpenRAG Backend http://localhost:8000 FastAPI server and core functionality. OpenRAG Frontend http://localhost:3000 React web interface for users. Langflow http://localhost:7860 AI workflow engine and flow management. OpenSearch http://localhost:9200 Vector database for document storage. OpenSearch Dashboards http://localhost:5601 Database administration interface. -
Verify installation by confirming all services are running.
docker compose psYou can now access the application at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Langflow: http://localhost:7860
-
Continue with Application Onboarding.
Application onboarding
The first time you start OpenRAG, whether using the TUI or a .env file, you must complete application onboarding.
Values input during onboarding can be changed later in the OpenRAG Settings page, except for the language model and embedding model provider. Your provider can only be selected once, and you must use the same provider for your language model and embedding model. The language model can be changed, but the embeddings model cannot be changed. To change your provider selection, you must completely reinstall OpenRAG.
- OpenAI
- IBM watsonx.ai
- Ollama
- Enable Get API key from environment variable to automatically enter your key from the TUI-generated
.envfile. - Under Advanced settings, select your Embedding Model and Language Model.
- To load 2 sample PDFs, enable Sample dataset. This is recommended, but not required.
- Click Complete.
- Continue with the Quickstart.
- Complete the fields for watsonx.ai API Endpoint, IBM API key, and IBM Project ID. These values are found in your IBM watsonx deployment.
- Under Advanced settings, select your Embedding Model and Language Model.
- To load 2 sample PDFs, enable Sample dataset. This is recommended, but not required.
- Click Complete.
- Continue with the Quickstart.
Ollama is not included with OpenRAG. To install Ollama, see the Ollama documentation.
- Enter your Ollama server's base URL address.
The default Ollama server address is
http://localhost:11434. Since OpenRAG is running in a container, you may need to changelocalhostto access services outside of the container. For example, changehttp://localhost:11434tohttp://host.docker.internal:11434to connect to Ollama. OpenRAG automatically sends a test connection to your Ollama server to confirm connectivity. - Select the Embedding Model and Language Model your Ollama server is running. OpenRAG automatically lists the available models from your Ollama server.
- To load 2 sample PDFs, enable Sample dataset. This is recommended, but not required.
- Click Complete.
- Continue with the Quickstart.
Rebuild all Docker containers
If you need to reset state and rebuild all of your containers, run the following command.
Your OpenSearch and Langflow databases will be lost.
Documents stored in the ./documents directory will persist, since the directory is mounted as a volume in the OpenRAG backend container.
docker compose up --build --force-recreate --remove-orphans