Self-Hosted serviette: Live RAG Over Your Docs (No Re-Upload Dance)

Most RAG tutorials end the same way: you upload a folder to a vector database, build an index, ship a demo, and then someone edits a PDF in SharePoint and your chatbot lies confidently until someone remembers to re-embed everything. serviette is Pathway's answer to that boredom: a YAML-driven RAG server where the indexer watches your sources and keeps the vector store in sync within seconds.

It is MIT licensed Python, installs with pip install serviette, and sits on top of the Pathway live-data engine (the same stack big logistics and postal orgs have put in production). You get a web chat on port 8989, a versioned REST API, source citations, and optional connectors to S3, Google Drive, SharePoint, Kafka, PostgreSQL, and plain folders on disk.

What you are actually running

Two processes, one config file:

  • Indexer watches document sources, parses PDFs/Office/audio (with the parsers Pathway already ships), chunks, embeds, and writes to your vector database through native connectors (real upserts and deletes, not append-only mess).
  • Server embeds the user's question, retrieves passages, calls your chosen LLM to write the answer, and serves the chat UI plus /api/v1 endpoints.

They only talk through the vector DB, so you can scale read replicas behind a load balancer while indexing chugs on its own workers. Default backend is DuckDB in a local file (zero extra services). Production setups often point at pgvector, Qdrant, Milvus, Weaviate, Chroma, Pinecone, or MongoDB Atlas Vector Search.

Quick taste:

pip install serviette
export PATHWAY_LICENSE_KEY=...   # free key from pathway.com
export OPENAI_API_KEY=sk-...
serviette demo --embedder openai   # http://localhost:8989

For your own corpus, serviette wizard builds config.yaml, then serviette up --config config.yaml runs indexer and server together. Drop a file into the watched folder while it runs and ask the same question again. The answer should change without a manual reindex button.

Why self-host instead of another SaaS knowledge bot

Documents stay put. With local embeddings (pip install "serviette[local]" and CPU PyTorch), text and vectors live on your disk or in a database you operate. The only outbound traffic is the retrieved snippets you send to an LLM for the final answer (and only if you configure an API model).

Live sources matter. Internal wikis, ticket exports, and contract folders are not static. serviette's pitch is incremental sync: edits propagate. That is the difference between a demo and something legal or ops teams trust.

Canadian hosting. If counsel asks where embeddings and PDFs reside, "on our VPS in Quebec or Ontario, pgvector in our Postgres, keys in our vault" beats routing every document through a US multi-tenant RAG SaaS.

Honest limits. You need a free Pathway license key (one-click signup). Conversation memory and built-in user accounts are not there yet; it is one-shot Q&A over current docs. Plan auth at the reverse proxy and your own app layer.

What it costs to run on a server

Resource use splits cleanly:

  • Indexer: CPU-heavy when ingesting; Pathway claims constant memory even on huge corpora because documents flow through instead of piling up. Sharding is a config line (indexer.workers).
  • Server: lighter per request; stateless horizontally.
  • Embeddings: local SentenceTransformers need RAM and a decent CPU (or GPU if you install the CUDA PyTorch wheel). API embedders trade compute for privacy and per-token cost.
  • Vector DB: DuckDB is fine for pilots; teams usually graduate to pgvector on existing Postgres or Qdrant in Docker.

Docker-friendly stacks show up in their integration tests (Qdrant, pgvector, Chroma, Weaviate containers). On a Canadian VPS, a sensible production layout is: indexer + server on the app host, Postgres with pgvector or a dedicated Qdrant container, nginx with TLS in front of 8989, secrets in env files outside git.

Use pip 23.1+; older resolvers apparently struggle with the dependency tree and can hang for hours.

Who should look at serviette

Good fit: platform teams tired of hand-rolling ingest cron jobs, internal support bots over Confluence exports and PDFs, and anyone already on Pathway who wants a batteries-included RAG template.

Maybe skip: if you need multi-turn chat memory out of the box, heavy per-user ACLs inside the RAG layer, or a fully managed zero-ops SaaS. Also skip if you cannot accept the Pathway license signup (even though it is free).

Bottom line

serviette is not magic; it is a well-scoped RAG appliance: live indexing, eight vector backends, multimodal parsers, chat plus API, and a config file instead of a thousand-line notebook. Self-hosting it on infrastructure you control is the whole point for regulated Canadian teams.

Want help sizing a VPS for serviette + pgvector and locking it behind HTTPS? Talk with Swift Host. We will map indexer workers, DB disk, and where your LLM API calls should exit the network.

Tags:
  • serviette
  • Pathway
  • RAG
  • Vector Database
  • Self-Hosted

Need Help With Your Hosting?

Tell us about your application — we respond within 1 hour with honest recommendations.