Private Memory, Global Intelligence

Private Memory, Global Intelligence

The current AI landscape is a land grab of monthly subscriptions. While ChatGPT Plus, Claude Pro, and Gemini Pro are undeniably powerful, they are "black boxes"—you don't own the history, you don't control the privacy, and you’re paying $30+ AUD/month regardless of whether you use the service once or a hundred times.

For my personal setup, I wanted to break that cycle. I wanted an architecture built on three pillars:

  1. Sovereignty: My "memories" and project files must stay on my hardware.
  2. Granular Logic: The ability to swap between "fast" models for emails and "reasoning" models for complex science and math problems.
  3. Efficiency: A "pay-as-you-go" model that leverages the incredibly high performance-to-cost ratio of the DeepSeek API.

The Architecture: Hybrid Intelligence

Instead of trying to cram a massive 671B parameter model onto a home server—which would require thousands of dollars in GPU hardware—I’ve opted for a Hybrid Stack. This approach provides the best of both worlds: local privacy and cloud-scale compute.

  • The Brain (DeepSeek API): DeepSeek R1 and V3 provide world-class reasoning and chat capabilities for a fraction of the cost of Western alternatives. At current rates, a $10 USD credit can last for millions of tokens.
  • The Memory (Open WebUI): Hosted locally on my Debian "blackbox" (a Lenovo ThinkCentre M710q). This is the interface that stores my personal context, "remembers" my style, and indexes my local documents.
  • The Gateway (Cloudflare Zero Trust): A secure tunnel that allows me to access my private AI from anywhere without opening a single port on my home router.

Why This Works

1. Persistent Context (The "Teacher" Profile)

Unlike a standard API chat, Open WebUI allows for persistent "Memories." My instance knows I am a secondary science teacher. It understands the context of the Australian Curriculum. I never have to repeat my background; it is built into the "Bio" of the local system.

2. Project-Based RAG

The raw files and the search index never leave my hardware. Unlike cloud-native AI, my entire curriculum library isn't uploaded to a third party. Instead, Open WebUI performs local 'Retrieval-Augmented Generation' (RAG). It only sends the specific, relevant snippets of text to the API that are required to answer a specific query. This ensures that 99% of my data remains dark to the provider, while still leveraging their 'reasoning' power for the final output.

3. Cost Effectiveness

By skipping the $20 USD/month subscription and using the DeepSeek API, my daily cost is measured in cents. I am only paying for the exact amount of "thinking" I consume. For a teacher or a writer, this is a far more sustainable model for long-term use.

The Technical Setup

The setup relies on Docker Compose for a streamlined deployment. By running the interface and a private search engine (SearXNG) in parallel, the AI gains the ability to browse the web privately.

The Stack:

  1. Open WebUI: The frontend and local vector database.
  2. SearXNG: A private metasearch engine that allows the AI to browse the web without trackers or ads.
services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: open-webui
    restart: always
    ports:
      - "8282:8080"
    environment:
      - 'ENABLE_WEB_SEARCH=True'
      - 'WEB_SEARCH_ENGINE=searxng'
      - 'SEARXNG_QUERY_URL=http://searxng:8080/search?q=<query>'
    volumes:
      - open-webui-data:/app/backend/data

  searxng:
    image: searxng/searxng:latest
    container_name: searxng
    restart: always
    environment:
      - SEARXNG_SETTINGS_URL=/etc/searxng/settings.yml
    volumes:
      - ./searxng-settings.yml:/etc/searxng/settings.yml

networks:
  ai-network:
    driver: bridge

volumes:
  open-webui-data:

Final Thoughts

This setup represents a shift back to the "Old Web" philosophy: running your own services, owning your own data, but leveraging the massive compute of the modern cloud when necessary.

It is minimalist, it is defensible, and most importantly, it is mine.