SabaKore

Run AI on a VPS / Ask your documents (RAG)

Ask a local LLM on your VPS about your own documents (RAG)

RAG lets a model answer from your documents without reading them in full every time. Documents are split into small pieces and made searchable in advance, and only the parts relevant to a question are passed to the model. It is useful for internal rules, manuals or your own notes. Documents and model both stay on your VPS. This assumes you have already set up the Open WebUI chat screen.

1Understand how it works

  1. Split: documents are divided into small pieces (chunks).
  2. Embed: each chunk becomes a list of numbers (a vector) whose meaning can be compared.
  3. Store: those vectors go into a search database (vector DB).
  4. Retrieve and pass: for each question, only the relevant chunks are pulled out and given to the model.

Open WebUI has this built in. Its default embedding runs on the server's CPU and, per the official docs, uses about 500 MB of memory per worker, on top of the model.

2Add documents

  • For one chat only: drag and drop the file into the chat input.
  • Documents you use repeatedly: create a knowledge base in Workspace > Knowledge and add documents. Type # in the chat input to pick a knowledge base. Attach it to a model in Workspace > Models and that model can always use it.

Start with a few documents. The default settings work.

3Settings for local models

Small models you run yourself have a short context length. For local models with 8,000 tokens or fewer, the official docs recommend the following, in Settings > Admin > Documents.

SettingDefaultFor local models
Text Splittercharactertoken
Markdown Header SplittingOnOn
Chunk Size10001000
Chunk Overlap100100
Top K (chunks passed)33–5
Full Context Mode—Off

A higher Top K passes more text to the model and leaves less room to remember the conversation. If answers get cut off in follow-up questions, lower Top K.

4(Optional) Switch embeddings to Ollama

The default embedding runs on the CPU and weighs on small-memory VPSs. Switching to an Ollama embedding model reduces Open WebUI's memory use (the official docs say external embeddings save a lot of RAM). Their example is nomic-embed-text.

sudo docker exec -it open-webui ollama pull nomic-embed-text

Then select that Ollama model as Embedding Model in Settings > Admin > Documents (or set RAG_EMBEDDING_ENGINE=ollama). After changing the embedding model, re-index all your documents. Documents embedded the old way cannot be found with the new one.

5Troubleshooting

  • Only part of a document is used: Ollama's default context length is short (4,096 tokens on a VPS without a GPU, per the official docs), so retrieved content is heavily truncated. Enable Bypass Embedding and Retrieval or Full Context Mode (leave them off by default; use them only in this case), or raise the model's context length (Settings > Admin > Models → edit → Advanced Params). Longer context uses more memory.
  • The model doesn't see the content: text extraction may have failed. The official docs suggest an extraction engine such as Apache Tika or Docling and checking the extracted text after upload. Text inside images (such as scanned PDFs) can only be read with Tika or Docling and OCR enabled.
  • Search accuracy is low: change the embedding model and re-index all documents.
  • Follow-up answers are slow: by default the document content is re-read for each question. Setting RAG_SYSTEM_CONTEXT=True reduces this (per the official docs).
  • Many documents and several users: the default vector DB (ChromaDB) can hang with multiple workers. The official docs suggest switching to PGVector as you scale.

6Back up your documents

Documents, settings and chats are stored in Open WebUI's data volume (open-webui). The official docs recommend backing up before updates and regularly. The steps are the same as step 6 of the chat UI page.

Keep the original files too. Re-indexing after an embedding change covers documents in a knowledge base; files passed in a chat without a knowledge base must be uploaded again (per the official troubleshooting guide).

FAQ

How many documents can it handle?

The official docs say a few documents for one person usually work with default settings. Around 100 documents or 10 users is where settings start to matter. We have not measured an upper limit.

Does search work well for non-English documents?

Search accuracy may vary by embedding model and language. We do not measure accuracy, so we cannot guarantee it. Try it with your own documents and check that the answers are correct.

Do my documents leave the server?

In these steps, both document processing and the model run inside your VPS. Unless you configure an external embedding service (such as OpenAI), documents are not sent outside.

Can I delete the original files?

We recommend keeping them. When you change the embedding model, documents in a knowledge base can be re-indexed, but files you passed in a chat without adding them to a knowledge base must be uploaded again (per the official docs).

Plans that suit this use

When reading documents, an embedding model runs alongside the chat model.

Passing long documents at once also adds memory for holding the conversation, so choose with more headroom than the estimates below.

Llama 3.2 3B

~3.5 GB memory · ollama run llama3.2:3b

  1. KAGOYA CLOUD VPS4 GB · ¥1,760/mo
  2. ABLENET VPS4 GB · ¥2,167/mo
  3. ConoHa VPS4 GB · ¥2,189/mo

Llama 3.1 8B

~6.4 GB memory · ollama run llama3.1:8b

  1. ABLENET VPS8 GB · ¥2,936/mo
  2. KAGOYA CLOUD VPS8 GB · ¥3,410/mo
  3. ConoHa VPS12 GB · ¥4,389/mo

Cheapest first. This compares fit and monthly price only, not speed. Affiliate programs have no effect on the order.

Based on Open WebUI's official Essentials and RAG troubleshooting (checked October 27, 2026). Setting names and defaults may change between versions.