Skip to main content

Self-Hosting Memwyre

Run Memwyre entirely on your own infrastructure. This guide covers deploying the backend services via Docker Compose and configuring local language models using Ollama for a completely private, offline memory vault.

Architecture Overview

A self-hosted Memwyre deployment consists of four primary components:
  1. Backend API (memwyre-backend): The core FastAPI/Python service handling ingestion, search pipelines, and client requests.
  2. Celery Worker (celery-worker): Resolves background tasks such as parsing web documents, downloading YouTube transcripts, and rebuilding relationship edges.
  3. Database (postgres with pgvector): Stores relational structured data and high-dimensional semantic vector embeddings.
  4. Cache & Queue (redis): Serves as the message broker for Celery and caching layer for rapid API queries.

Docker Compose Quickstart

Create a docker-compose.yml file in your installation directory:

Environment Variables

Configure these variables inside your .env file or docker-compose block:

Local LLM Setup (Ollama)

To run a zero-cloud setup, route all embedding and extraction tasks to Ollama.

Step 1: Install & Launch Ollama

Install Ollama on your host system (macOS, Windows, or Linux). Ensure Ollama runs locally by verifying:

Step 2: Download Required Models

Memwyre requires a dense vector embedding model and an inference model. Pull them using the CLI:

Step 3: Run Docker Containers

Ensure extra_hosts is mapped to host.docker.internal:host-gateway in your docker-compose.yml so that Docker containers can contact your host’s Ollama port (11434). Spin up your cluster:

Step 4: Verify Local Connection

Inspect logs to verify that Memwyre connects to Ollama successfully during startup:
If you see vector dimension initialisation messages pointing to nomic-embed-text, your offline memory vault is up and running! πŸš€