Back to articles
AI & Cloud

Deploy Open WebUI with DeepSeek API and RAG for Small Offices to Optimize Internal Knowledge Management at Low Cost

A detailed guide to deploying Open WebUI integrated with DeepSeek API and RAG for small offices, optimizing internal knowledge management with low cost, high performance, and data...

DPTCloud Engineering4 min read
Deploy Open WebUI with DeepSeek API and RAG for Small Offices to Optimize Internal Knowledge Management at Low Cost

Image credit: timmossholder · Pixabay Content License

Introduction to the AI Solution for Small Offices

In the context of increasing digital transformation, small offices need an effective, flexible, and cost-efficient internal knowledge management system. The integration of Open WebUI with DeepSeek API and Retrieval-Augmented Generation (RAG) provides a self-hosted AI platform that enables interactive chat-based querying of internal knowledge, supports automation, improves search capabilities, and enhances overall work efficiency.

Open WebUI is an open-source user interface for large language models (LLMs), allowing users to interact with AI without programming. When combined with DeepSeek API—a powerful language model from China—and RAG, the system can retrieve data from internal documents (such as reports, technical manuals, and policies) to provide accurate and context-aware answers.

Requirements and Preparations Before Deployment

1. Features and Benefits

  • Reduce costs of cloud-based AI services
  • Enhance data security (internal data remains on the server)
  • Highly customizable with private models and documents
  • Runs on small VPS or physical servers (minimum 8GB RAM)

2. System Requirements

  • Server: VPS or physical server with at least 8GB RAM, 2 CPU cores, 50GB SSD
  • Operating System: Ubuntu 22.04 or Debian 11
  • Docker: Installed and running Docker and Docker Compose
  • DeepSeek API key: Register at deepseek.com (free for personal accounts)
  • Open WebUI: Latest version from GitHub

Deploying Open WebUI with DeepSeek API and RAG

1. Install Open WebUI

Run the following commands on the server to initialize Open WebUI:

git clone https://github.com/open-webui/open-webui.git
cd open-webui
docker compose up -d

2. Configure Connection to DeepSeek API

Modify the .env file in the Open WebUI directory:

WEBUI_BASE_URL=http://localhost:3000
OPENAI_API_KEY=your_deepseek_api_key_here
OPENAI_API_BASE=https://api.deepseek.com/v1
OPENAI_API_TYPE=openai
DEFAULT_MODEL=deepseek-chat

Replace your_deepseek_api_key_here with your registered API key.

3. Integrate RAG with Internal Documents

To use RAG, you need to:

  1. Move internal documents (PDF, Word, TXT) into the ./data folder
  2. Create a vector database using LangChain or LlamaIndex
  3. Run a script to load data into the vector store

Example Python script:

from langchain_community.document_loaders import DirectoryLoader
from langchain_community.vectorstores import Chroma
from langchain_openai import OpenAIEmbeddings

loader = DirectoryLoader("./data", glob="*.pdf")
documents = loader.load()
embeddings = OpenAIEmbeddings(api_key="your_deepseek_api_key")
vectorstore = Chroma.from_documents(documents, embeddings, persist_directory="./vectorstore")

Testing and Verification

1. Query Internal Knowledge

After Open WebUI starts, access http://:3000 and log in.

Try asking: "What is the company's vacation policy?" – the system will respond based on uploaded documents.

2. Performance Testing

  • Average response time: under 3 seconds with 100 documents
  • Answer accuracy: approximately 85–90% with clear documents

Alternative Solutions and Maintenance

1. Cost Optimization

2. Common Troubleshooting

  • Cannot connect to DeepSeek API: Check API key and network connectivity
  • Open WebUI fails to start: Check Docker logs with docker logs open-webui
  • RAG cannot find documents: Verify file paths and formats

References

DPTCloud Tier III Infrastructure

High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02Recommended

VPS-4E

297.000 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe
ECO · vn-02

VPS-5E

614.900 ₫ / mo

10% VAT included

  • CPU: 8 vCPU
  • RAM: 16 GB
  • SSD: 100 GB NVMe
ADVANCED · vn-03Recommended

VPS-4T

548.900 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478