From Notes to a Knowledge Base You Can Chat With: Obsidian + AnythingLLM + Nextcloud

If you’re anything like most home lab tinkerers, your Obsidian vault is where your thinking lives — project notes, runbooks, half‑finished ideas, the lot. It’s a lovely thing. But it’s also a passive thing. You write into it, you search it, and that’s roughly where the relationship ends.

This guide changes that. We’re going to turn your vault into a living, queryable knowledge base by piping it into a self‑hosted AnythingLLM instance, then syncing the same vault to Nextcloud for safe keeping, and finally connecting the AnythingLLM Mobile app on Android so you can ask questions of your own notes from the sofa.

By the end, your notes aren’t just files any more — they’re the fuel for a private AI that knows your second brain better than you do.

What you’ll end up with

Here’s the architecture we’re building:

┌──────────────────────┐
│  Obsidian (macOS)    │
│  Obsidian (Android)  │
└──────────┬───────────┘
           │  AnythingLLM Sync plugin (Developer API)
           ▼
┌──────────────────────┐        ┌──────────────────────┐
│  AnythingLLM Docker  │◄──────►│  LLM + Embeddings    │
│  (your Mac / server) │        │  (Ollama, OpenAI…)   │
└──────────┬───────────┘        └──────────────────────┘
           │  AnythingLLM Mobile (QR / URL)
           ▼
┌──────────────────────┐
│  Android phone       │
└──────────────────────┘

Obsidian ──► Nextcloud (WebDAV) ──► your Nextcloud server

Three independent moving parts, each doing one job well. Let’s take them in order.

Prerequisites

Before we start, make sure you have:

  • Docker running on your Mac (Docker Desktop is fine) or on a dedicated home server.
  • Obsidian installed on macOS and Android, with your vault in place.
  • Nextcloud reachable from your devices — a Tailscale connection to a self‑hosted instance is perfect here.
  • An LLM provider. You can use a cloud API key (OpenAI, Anthropic, etc.) or run everything locally with Ollama. We’ll show both.
  • About 2 GB of RAM and 10 GB of disk for the AnythingLLM container — more if you’re storing a lot of documents.

Part 1 — Stand up AnythingLLM in Docker

AnythingLLM is a genuinely pleasant piece of software to self‑host. It bundles the whole RAG pipeline — document ingestion, chunking, embedding, vector storage and chat — behind one container.

The quick docker run

Fire this off on your Mac (or wherever you want the instance to live):

bash

export STORAGE_LOCATION=$HOME/anythingllm && \
mkdir -p $STORAGE_LOCATION && \
touch "$STORAGE_LOCATION/.env" && \
docker run -d \
  --name anythingllm \
  --restart unless-stopped \
  -p 3001:3001 \
  --cap-add SYS_ADMIN \
  -v ${STORAGE_LOCATION}:/app/server/storage \
  -v ${STORAGE_LOCATION}/.env:/app/server/.env \
  -e STORAGE_DIR="/app/server/storage" \
  mintplexlabs/anythingllm

A few notes on what’s happening here:

  • -p 3001:3001 publishes the web UI. Docker binds this to every interface, which is exactly what we want later for the phone to reach it.
  • The two -v mounts are what make your data survive container rebuilds. Your documents, vector database and settings all live in $STORAGE_LOCATION on the host.
  • --cap-add SYS_ADMIN is needed for the sandboxed agent features. Harmless if you don’t use them.
  • The container runs as UID/GID 1000 by default. If your host user has a different ID, you’ll hit permission issues on the mounted volume — set UID and GID in your .env to match.

Then open http://localhost:3001 and you’re in.

Want local LLMs inside the container?

Add -e ENABLE_BUILT_IN_LLM=true to the run command. That turns on a built‑in model with GPU support for NVIDIA, AMD and Intel — ideal if you’d rather not send a single token off your network.

Prefer Compose?

For a more declarative setup, this compose file mirrors the same configuration and lets you pin your environment properly:

yaml

services:
  anythingllm:
    image: mintplexlabs/anythingllm
    container_name: anythingllm
    ports:
      - "3001:3001"
    cap_add:
      - SYS_ADMIN
    environment:
      - STORAGE_DIR=/app/server/storage
      - JWT_SECRET="make-this-a-long-random-string-20-chars-plus"
      - LLM_PROVIDER=ollama
      - OLLAMA_BASE_PATH=http://host.docker.internal:11434
      - OLLAMA_MODEL_PREF=llama3.1
      - EMBEDDING_ENGINE=ollama
      - EMBEDDING_BASE_PATH=http://host.docker.internal:11434
      - EMBEDDING_MODEL_PREF=nomic-embed-text:latest
      - VECTOR_DB=lancedb
    volumes:
      - anythingllm_storage:/app/server/storage
    restart: unless-stopped

volumes:
  anythingllm_storage:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: /path/on/your/mac/anythingllm

On Linux, host.docker.internal doesn’t resolve by default — add --add-host=host.docker.internal:host-gateway to the run command, or use the host’s LAN IP.

Lock it down before you expose it

This is the step people skip and then regret. By default, a local AnythingLLM instance has no authentication at all — anything that can reach port 3001 can use it and change its settings. Before you open it up to the network, go to Settings → Security and enable:

  • Password Protect Instance for a single‑user setup, or
  • Multi‑User Mode if other people will have their own logins.

Do this first. Everything else in this guide assumes you have.


Part 2 — Give it a brain

AnythingLLM needs two things to be useful: a chat model (to write answers) and an embedding model (to understand your notes). Configure both under Settings → LLM Preference and Settings → Embedding Preference.

The easiest fully‑local combination is Ollama:

bash

# Install Ollama, then pull a chat model and an embedding model
ollama pull llama3.1
ollama pull nomic-embed-text

Then point AnythingLLM’s LLM provider at Ollama with llama3.1, and the embedding engine at Ollama with nomic-embed-text. If you’d rather use a cloud provider, paste the relevant API key instead — AnythingLLM speaks OpenAI, Anthropic, Gemini and most OpenAI‑compatible endpoints.

For the vector database, the default LanceDB is perfectly good for a personal vault and requires zero extra infrastructure. Leave it alone.


Part 3 — Sync your Obsidian vault into AnythingLLM

Now the fun bit. The community plugin AnythingLLM Sync keeps a chosen folder of Markdown notes mirrored into an AnythingLLM workspace — automatically, on create and edit. It works on both desktop and mobile, and requires Obsidian 1.11.4 or newer.

Step 1 — Create an API key in AnythingLLM

In AnythingLLM, go to Settings → Developer API and create a new API key. Copy it somewhere safe.

Step 2 — Install the plugin in Obsidian

On macOS: Settings → Community plugins → Browse, search for AnythingLLM Sync, install and enable it.

On Android: same route — Settings → Community plugins → Browse, search, install, enable.

Step 3 — Configure it

Open Obsidian → Settings → AnythingLLM Sync and work through these:

  1. Set the AnythingLLM URL — for a local instance, http://localhost:3001.
  2. Paste the API key — it’s stored securely in Obsidian’s SecretStorage.
  3. Hit Test connection.
  4. Refresh workspaces and pick your target workspace.
  5. Set a vault‑relative watch folder — for example 00-Inbox, or your vault root if you want the whole lot in there.
  6. Enable automatic sync.

Step 4 — Backfill your existing notes

Automatic sync only catches notes as they change. To pull your entire back catalogue in, run the plugin’s bulk sync command once — it uploads every Markdown file in the watch folder. Then run Sync now any time you want to force a pass.

What the plugin actually does

Obsidian actionAnythingLLM behaviour
Create MarkdownUpload + embed
Edit MarkdownReplace the workspace embedding with the latest content
Rename MarkdownRe‑upload under the new filename, replace the old embedding
Delete MarkdownRemove the old embedding from the workspace
Existing notesPick up via the bulk sync command

It uses content hashing to skip unchanged notes and debounced writes, so it plays nicely with the Web Clipper and live editing.

One honest caveat: AnythingLLM’s public Developer API supports adding and removing workspace embeddings, but has no documented per‑document source‑delete endpoint. That means superseded source objects can linger in AnythingLLM’s global document storage after an update. It’s cosmetic — your workspace retrieval stays correct — but worth knowing.


Part 4 — Sync your vault to Nextcloud

AnythingLLM is your thinking layer. Nextcloud is your safety net — a proper, versioned copy of the vault on your own server, reachable from every device. These two do different jobs, so we want both.

The tool for this is the Nextcloud Sync community plugin for Obsidian.

The one detail that trips everybody up

Obsidian doesn’t open your Nextcloud folder as a vault. Instead, the plugin syncs into a vault. On every device you must create a new vault with exactly the same name as the one on your Mac — matched character‑for‑character, including case. That name is the remote folder.

On macOS

  1. Open your existing vault, or create it if you haven’t already.
  2. Settings → Community plugins → Browse → install Nextcloud Sync → enable.
  3. Set the server URL to the full WebDAV endpoint, not just the host:https://<your-nextcloud-host>/remote.php/dav/files/<your-user>/ Leaving off the path is the number one cause of mysterious HTTP 405 errors.
  4. Authenticate using Login with browser, or an app password generated in Nextcloud under Settings → Security → Devices & sessions.
  5. Hit Sync now. The first run pulls or pushes the whole vault; every run after that is incremental.

On Android

  1. Create new vault in Obsidian — not “Open folder as vault”, and not “Set up Obsidian Sync”. Name it identically to your Mac vault.
  2. Install and enable the Nextcloud Sync plugin in that vault.
  3. Enter the same WebDAV URL and authenticate the same way.
  4. Run Sync now.

Android gotchas worth knowing

  • Automatic sync is off by default on mobile, because Android aggressively suspends background timers. You get sync on startup, sync when you return to the app (at most once every five minutes), and manual sync. “Sync on file change” is opt‑in and only runs while Obsidian is open.
  • Large files are skipped in both directions on mobile above a size threshold, to avoid out‑of‑memory crashes. If you keep PDFs in your vault, expect them to stay put.
  • There’s no ribbon bar on mobile, so you won’t see the plugin icon. Find Sync with Nextcloud under the Open menu, or pin Sync now to the mobile toolbar via Settings → Mobile → Manage toolbar options.
  • Never run two sync mechanisms over the same vault. Pick the Nextcloud plugin or a filesystem tool like FolderSync — not both — or you’ll spend your evenings deleting conflicted copy files.

One housekeeping note: the Nextcloud Sync plugin now requires Obsidian 1.13.0 or newer, so make sure the app is up to date before you start.


Part 5 — Connect AnythingLLM Mobile on Android

Here’s where it all comes together. AnythingLLM Mobile is a free, open‑source Android app that can act as a companion to your self‑hosted instance — pulling in your workspaces, threads, documents and even agent tools, so you can chat with your notes from anywhere.

Step 1 — Make the instance reachable

The mobile app needs a reachable address. There are two sensible options:

On your home network: use your Mac’s local IP.

bash

# macOS
ipconfig getifaddr en0

Then on the phone, use http://192.168.1.42:3001 (substituting your actual address). If it won’t load, the Mac’s firewall is almost always the culprit — allow incoming connections on port 3001.

Away from home: this is where Tailscale shines. It connects your own devices to each other without publishing anything to the internet, and the address behaves just like the local one. Point the app at your Mac’s Tailscale address or MagicDNS name and you’re done — no port forwarding, no public exposure.

Two things to keep in mind either way:

  • The machine has to stay awake. A Mac that sleeps takes AnythingLLM down with it. If you want genuine always‑on access, run the container on a home server or a always‑on mini PC instead.
  • You must have authentication enabled. See Part 1 — password protect the instance or use multi‑user mode before you let anything else reach it.

Step 2 — Pair the app

In the Android app, open the sidebar, go to Settings → Tools, and find the AnythingLLM Mobile entry. From there you can scan the QR code to connect the two apps.

If you’re pairing with AnythingLLM Desktop rather than a Docker instance, first enable Settings → Admin → General → Enable Network Discovery on the desktop app, so it’s available on the LAN via 0.0.0.0 bindings.

For a self‑hosted Docker instance, enter the server URL and your credentials directly in the app’s connection screen — the same reachable address from Step 1.

Once paired, your workspaces, threads and documents stay in sync across devices. There’s no account and nothing routed through a third party: the traffic goes straight from your phone to your own server.


So what is RAG, really?

You’ll see the acronym RAG plastered over every AI tool right now, usually without explanation. Let’s fix that, because it’s the whole reason this setup is more than a novelty.

RAG stands for Retrieval‑Augmented Generation.

Here’s the problem it solves. A language model only knows what it was trained on. It has never seen your runbook for the home server, your notes from last Tuesday’s client call, or that brilliant idea you jotted down at 2 a.m. If you ask it about those things, it will either say it doesn’t know, or — worse — confidently invent something.

RAG fixes this by changing what the model gets to look at before it answers:

  1. Ingestion. When the plugin syncs a note, AnythingLLM splits it into chunks and runs each chunk through an embedding model. That turns text into a list of numbers — a vector — that captures its meaning.
  2. Storage. Those vectors go into a vector database (LanceDB, in our case). Notes with similar meanings end up close together in that mathematical space.
  3. Retrieval. When you ask a question, your question is embedded too. AnythingLLM finds the note chunks whose vectors are closest to it — in other words, the passages most relevant to what you asked.
  4. Generation. Those passages are handed to the chat model alongside your question, with an instruction along the lines of “answer using this context.” The model writes a response grounded in your actual notes.

That last step is the magic. The model isn’t recalling your notes from memory — it’s reading them at the moment you ask. Which means:

  • Answers cite your real content, not a hallucination.
  • Nothing leaves your network if you’re running Ollama locally.
  • Add a note tomorrow and it’s answerable tomorrow.
  • You can ask things like “what did I decide about the backup strategy?” or “summarise everything I’ve written about the kitchen renovation” and get a genuine answer.

RAG is what turns a folder of files into a conversation.


Troubleshooting

A few things that catch people out, and the fixes:

SymptomLikely causeFix
Plugin test connection fails on mobilePhone can’t resolve/reach the AnythingLLM hostUse the raw Tailscale IP or LAN IP rather than a hostname; check the Mac firewall on port 3001
HTTP 405 from the Nextcloud pluginServer URL missing the WebDAV pathUse the full …/remote.php/dav/files/<user>/ URL
Nextcloud sync works on Mac, not AndroidWrong vault name, or auto‑sync expectationsVault name must match exactly; remember mobile sync is manual/on‑return by design
Notes appear in AnythingLLM but edits don’tAutomatic sync not enabled, or watch folder excludes the fileEnable automatic sync; confirm the note sits inside the watch folder
Mobile app won’t connect at allInstance unreachable or unauthenticatedConfirm the instance is awake, reachable, and has a password set
“Untrusted domain” from NextcloudHostname not in trusted_domainsAdd your hostname or IP to config.php

Where this leaves you

Take a step back and look at what you’ve built. Your notes now live in three places, each doing a job the others can’t:

  • Obsidian is where you think and write, on Mac and Android alike.
  • Nextcloud is your durable, versioned, self‑hosted archive.
  • AnythingLLM is the layer that reads all of it and lets you talk back.

That last one is the shift worth pausing on. Your notes have stopped being a filing cabinet and become a colleague — one with perfect recall of everything you’ve ever written down, and infinite patience for your questions. No subscription, no third‑party cloud, no data leaving the house.

Happy building. Go and ask your notes something.


Sources & further reading


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *