.env Breakdown
Defines all runtime environment variables used across the local RAG pipeline powered by Ollama and Open WebUI.
1. Ollama Local LLM Configuration
OLLAMA_URL=http://ollama:11434
OLLAMA_EMBEDDING_URL=http://ollama:11434/api/embed
| Variable | Description |
| OLLAMA_URL | Base API URL of the Ollama LLM container |
| OLLAMA_EMBEDDING_URL | Embedding endpoint used by OllamaEmbeddings |
2. Open WebUI Configuration
OPEN_WEBUI_URL=http://open-webui:8080
OPEN_WEBUI_TOKEN=Bearer your_openwebui_token_here
| Variable | Description |
| OPEN_WEBUI_URL | WebUI base endpoint (used for chat, upload, etc.) |
| OPEN_WEBUI_TOKEN | Authorization bearer token for secured WebUI endpoints |
3. Embedding Backend Configuration
EMBED_BACKEND=sentence-transformer
EMBED_MODEL=all-MiniLM-L6-v2
| Variable | Description |
| EMBED_BACKEND | Choose embedding engine: "sentence-transformer" or "ollama" |
| EMBED_MODEL | Default model for vectorizer.py if backend is sentence-transformer |
4. Uploader Defaults
DEFAULT_KB_NAME=AutoKB
DEFAULT_KB_DESC=Uploaded by uploader.py
UPLOAD_FOLDER_PATH=./docs
| Variable | Description |
| DEFAULT_KB_NAME | Default knowledge base name for uploaded files |
| DEFAULT_KB_DESC | Description to attach to the knowledge base |
| UPLOAD_FOLDER_PATH | Path to scanned documents for automatic upload and processing |
Summary Table
| Variable | Purpose | Example |
| OLLAMA_URL | Ollama base API | http://ollama:11434 |
| OLLAMA_EMBEDDING_URL | Embedding endpoint | http://ollama:11434/api/embed |
| OPEN_WEBUI_URL | Open WebUI base URL | http://open-webui:8080 |
| OPEN_WEBUI_TOKEN | Authorization token | Bearer your_openwebui_token_here |
| EMBED_BACKEND | Embedding engine selector | sentence-transformer or ollama |
| EMBED_MODEL | Model for vectorizer | all-MiniLM-L6-v2 |
| DEFAULT_KB_NAME | Auto-generated knowledge base name | AutoKB |
| DEFAULT_KB_DESC | Auto-generated knowledge base description | Uploaded by uploader.py |
| UPLOAD_FOLDER_PATH | Watch folder for new documents | ./docs |