Open WebUI with OpenAI API and RAG
Complete Docker setup for Open WebUI using OpenAI API for chat completions and Retrieval-Augmented Generation (RAG) with PDF document support.
- OpenAI Integration: Use GPT-4o, GPT-4 Turbo, or any OpenAI chat model.
- RAG/Document Q&A: Upload PDFs, create knowledge bases, and chat with your documents.
- Persistent Storage: All data survives container restarts (chats, uploads, embeddings).
- No Local LLMs: Uses only OpenAI API (no Ollama, no local model runtime).
- Built-in Vector Database: Open WebUI includes ChromaDB for embeddings.
Before you download and run the application, ensure you meet the following requirements:
-
Docker & Docker Compose
- Install Docker Desktop for macOS or Windows, or Docker Engine for Linux.
- You will need Docker Compose version 3.8 or higher.
- To confirm your installation, run these commands in your terminal:
docker --version docker compose version
-
OpenAI API Key
- Sign up for an account at OpenAI Platform.
- Create your API key by visiting API Keys.
- Make sure you have funding set up to use the API.
-
System Requirements
- Minimum of 2 GB RAM.
To get started, you need to download the application.
Visit the Releases page to download the latest version. Choose the relevant file for your operating system, and follow the prompts to install.
Once you have Docker set up and the application downloaded, follow these steps to run it:
-
Open your Terminal or Command Prompt.
-
Navigate to the directory where you downloaded the application files. Use the
cdcommand. For example:cd path/to/downloaded/files -
Run the application using Docker Compose with this command:
docker-compose up
-
Wait for the services to start. This may take a few moments.
-
Once everything is up and running, you can access the Open WebUI in your web browser. Open this link:
http://localhost:3000
Now that the application is running, you can begin chatting with your documents:
- Upload PDFs: Click on the upload area on the webpage to add your PDF documents.
- Ask Questions: Type your questions in the chat box. The OpenAI API will process your inquiries using the uploaded documents.
- Manage Your Data: All chats and uploads are saved, even if you restart the application.
If you encounter issues, consider checking:
- Docker Installation: Ensure Docker is running and accessible.
- API Key: Verify that your OpenAI API key is active and correctly configured.
- Firewall Settings: Your firewall should allow Docker to communicate over the required ports.
We encourage user feedback and contributions. If you have questions or issues, feel free to open an issue on our GitHub page.
Enjoy using openweb_rag!