Skip to main content

Self-Hosting with ZeroDB Local

Self-Hosting with ZeroDB Local​

ZeroDB Local runs entirely on your machine. SQLite for storage, FAISS for vector search, inline embeddings — no API key or cloud connection needed.

pip install zerodb-local

Quick Start​

from zerodb_local import ZeroDBLocal

## Create a local database
db = ZeroDBLocal("./my-data")

## Store documents (embeddings generated locally)
db.add_texts([
"ZeroDB is a persistent knowledge layer",
"Vector search finds similar documents",
"Agents need memory to be useful",
])

## Search by meaning
results = db.search("database for AI agents", k=3)
for r in results:
print(f"Score: {r['score']:.3f} — {r['text']}")

Run as a Server​

zerodb serve --port 8080 --data ./my-data

This starts a local HTTP server with the same API as the cloud version. Useful for development and testing.

Architecture​

ComponentTechnologyRole
StorageSQLiteDocument and metadata storage
Vector indexFAISSApproximate nearest neighbor search
EmbeddingsSentence Transformers (inline)No external API needed

When to Use Local vs Cloud​

FeatureZeroDB LocalZeroDB Cloud
No API key neededYesNo
Runs offlineYesNo
Free embeddingsYes (inline)Yes (TEI)
Multi-tenantNoYes
GraphRAGNoYes
MCP serverNoYes
File storageNoYes
PostgreSQLNoYes
Best forDev, testing, privacyProduction, multi-user

PyPI​

Next Steps​