CloudLinux.ro
AI & self-hosting

How to set up a vector database for AI

Updated 7/20/2026

A vector database stores text as numbers (embeddings) that represent meaning, not just words. This lets you search by meaning, not just exact matches.

What it is for

  • Semantic search (you find what you want, even with different words).
  • Chatbots that answer based on your documents (RAG).
  • Similarity-based recommendations.

Option 1: pgvector

If you already use PostgreSQL, the pgvector extension adds vector support:

CREATE EXTENSION vector;
CREATE TABLE documents (id serial, content text, embedding vector(1536));

See installing PostgreSQL.

Option 2: Qdrant

A dedicated, fast vector database, easy to start with Docker:

docker run -d -p 6333:6333 -v qdrant:/qdrant/storage qdrant/qdrant

Next step

With a vector database and a local model, you build a chatbot over your documents, see RAG chatbot on your docs.

Put this guide into practice on your own VPS

EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.

See pricing

Related tutorials