# memEx

> Self-hosted open-source knowledge base in the Zettelkasten and org-mode tradition: linked notes, contexts, pipelines, backlinks, multi-user sharing and per-item privacy.

- **Category:** [Knowledge Management](https://selfhost.directory/knowledge-management)
- **Licence:** agpl-3.0
- **Source model:** Open source
- **Author:** shibaobun
- **Platforms:** Docker Compose
- **Ports:** 4000 (Internal port the app binds to; must be reverse proxied)
- **Requires:** PostgreSQL
- **Tags:** PostgreSQL, Phoenix, Wikis, Knowledge Base, Notes, Elixir, Docker Compose, Backlinks, Second brain, Pkm, Zettelkasten

## Docker images

- [`shibaobun/memex`](https://hub.docker.com/r/shibaobun/memex)

## What is memEx?

memEx is a personal knowledge-base web app whose structure follows Zettelkasten thinking and org-mode habits. Users capture three kinds of things: Notes for individual concepts or items, Contexts that frame one topic and hotlink into those notes, and Pipelines that spell out a process step by step, each step tied to a context. Other capabilities include multi-user accounts designed around sharing, privacy settings that apply per note, context or pipeline, backlinks listing which items point at the one you are reading, and access from any browser-connected device. Operators run it by copying the project's example compose file, filling in environment variables, generating a cookie-signing secret and a cloak key with helper scripts inside the published container image, then bringing the stack up; a reverse proxy in front of the app is required, and PostgreSQL stores the data. Mail delivery is configured through SMTP variables, or switched off entirely. Whoever registers first becomes administrator, and sign-ups are invite-only unless public registration is enabled. The code is AGPLv3-or-later and hosted on GitLab, where it is still an early-stage project.

## Should you self-host memEx?

memEx scores **48/100** on selfhost.directory ([how scoring works](https://selfhost.directory/scoring)) and ranks **#22 of 42** in [Knowledge Management](https://selfhost.directory/knowledge-management).

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is agpl-3.0-licensed.

Its closest alternative on selfhost.directory is [Project N.O.M.A.D.](https://selfhost.directory/project/project-n-o-m-a-d) (86/100, 43 694 stars). It scores higher overall, so compare the two before you pick. [See memEx vs Project N.O.M.A.D. side by side.](https://selfhost.directory/compare/memex-2-vs-project-n-o-m-a-d)

## Features

- Backlinks
- Contexts with hotlinks
- Email notifications via SMTP
- Invite-only registration
- Multi-user collaboration
- Notes
- Per-item privacy controls
- Process pipelines

## How to install memEx

### Install memEx with Docker Compose

Environment variables:

```
HOST, PORT, DATABASE_URL, SECRET_KEY_BASE, CLOAK_KEY, REGISTRATION, LOCALE, DISABLE_EMAIL, SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD, SMTP_SSL, EMAIL_FROM, EMAIL_NAME, POOL_SIZE, ECTO_IPV6
```

1. Install [Docker Compose](https://docs.docker.com/compose/install/) or alternatively [Docker Desktop](https://docs.docker.com/desktop/) on your machine.
1. Copy the example [docker-compose.yml](https://gitlab.com/shibaobun/memex/-/blob/stable/docker-compose.yml). into your local machine where you want.
   Bind mounts are created in the same directory by default.
1. Set the configuration variables in `docker-compose.yml`. You'll need to run
   `docker run -it shibaobun/memex /app/priv/random.sh` to generate a new
   secret key base. Generate a `CLOAK_KEY` with
   `docker run --rm shibaobun/memex /app/priv/cloak_key.sh`.
1. Use `docker-compose up` or `docker-compose up -d` to start the container!

Note: The app must be placed behind a reverse proxy; PostgreSQL is required.

## memEx alternatives

- [Memos](https://selfhost.directory/project/memos): Self-hosted, open-source note app for Markdown memos with search, tags, calendar, and visibility controls. Runs as a single binary with SQLite/MySQL/PostgreSQL. (compare: https://selfhost.directory/compare/memex-2-vs-memos)
- [Personal External Brain Knowledge Graph](https://selfhost.directory/project/personal-external-brain): Self-hosted, open-source personal knowledge graph for notes, web pages, PDFs, audio/video with topic-isolated recall and source citations — refuses ungrounded answers. (compare: https://selfhost.directory/compare/memex-2-vs-personal-external-brain)
- [ocean-brain](https://selfhost.directory/project/ocean-brain): Self-hosted knowledge base with backlinks, properties, views, reminders, calendar, graph, and MCP integration. Run via Docker or npx. (compare: https://selfhost.directory/compare/memex-2-vs-ocean-brain)
- [Nexidion](https://selfhost.directory/project/nexidion): Nexidion is an open-source, self-hosted knowledge base for sensitive data with multi-user vaults, hierarchical notes, version history, PDF ingestion, and an AI agent. (compare: https://selfhost.directory/compare/memex-2-vs-nexidion)
- [zbook](https://selfhost.directory/project/zbook): ZBook is a self-hosted, open-source team knowledge base with multi-level permissions, comments, and notifications as a GitBook alternative. (compare: https://selfhost.directory/compare/memex-2-vs-zbook)
- [Poznote](https://selfhost.directory/project/poznote): A free, open-source, self-hosted notes app offering rich text, Markdown, tasks, boards, graphs, an AI chat, and an MCP server — replacing Notion on your own server. (compare: https://selfhost.directory/compare/memex-2-vs-poznote)
- [Metronix Memory](https://selfhost.directory/project/metronix-memory): Self-hosted memory layer for AI agents providing persistent memory, hybrid dense+sparse+graph retrieval, MCP server, and agent-scoped facts across sessions. (compare: https://selfhost.directory/compare/memex-2-vs-metronix-memory)
- [botmem](https://selfhost.directory/project/botmem): Botmem is a self-hosted, open-source personal memory layer that ingests emails, messages, photos, and locations into a unified schema with semantic search for AI agents. (compare: https://selfhost.directory/compare/botmem-vs-memex-2)

## More in Knowledge Management

- [Memorwise](https://selfhost.directory/project/memorwise): Self-hosted NotebookLM alternative for document chat with any LLM. Drop in files/links — local RAG Q&A, knowledge graphs, flashcards, quizzes, audio. One command.
- [memory-os](https://selfhost.directory/project/memory-os): Self-hosted, open-source memory stack for Hermes Agent: seven layers adding Qdrant vector search, SQLite fact storage with trust scores, and automatic context injection.
- [Memos Worker](https://selfhost.directory/project/memos-worker): Self-hosted notes and knowledge base on Cloudflare Workers with D1, KV, R2, featuring Markdown editing, full-text search, Telegram integration, and themes.
- [minne](https://selfhost.directory/project/minne): Self-hosted, open-source personal knowledge management app using a graph database to auto-connect notes, with AI-assisted extraction and chat interface.
- [mnemo](https://selfhost.directory/project/mnemo): Self-hosted AI memory sidecar with persistent knowledge graph, entity extraction, and semantic retrieval for LLM apps — works with Ollama, OpenAI, Anthropic.
- [moonstone](https://selfhost.directory/project/moonstone): Self-hosted headless PKM server turning Obsidian, Logseq, Zim vaults into a REST API with PWA editor, applets, and background services.
- [MulmoClaude](https://selfhost.directory/project/mulmoclaude): Self-hosted AI assistant platform with personal wiki, collections, and messaging bridges — powered by Claude Code, data stays local.
- [muse-brain](https://selfhost.directory/project/muse-brain): MUSE Brain is a self-hosted relational memory system for AI agents with emotional texture and 33 MCP tools. Runs on Cloudflare Workers with Postgres or SQLite.
- [Nexidion](https://selfhost.directory/project/nexidion): Nexidion is an open-source, self-hosted knowledge base for sensitive data with multi-user vaults, hierarchical notes, version history, PDF ingestion, and an AI agent.
- [Nextcloud Notes](https://selfhost.directory/project/nextcloud-notes): ✎ Distraction-free notes and writing
- [NornicDB](https://selfhost.directory/project/nornicdb): Self-hosted, open-source graph database speaking Neo4j Bolt/Cypher and Qdrant-style gRPC, uniting HNSW vector search, hybrid retrieval, and MVCC historical reads.
- [NoteDiscovery](https://selfhost.directory/project/notediscovery): Self-hosted, open-source Markdown knowledge base: wikilinks, backlinks, graph view, tags, templates, LaTeX, Mermaid, drawing editor, MCP AI access. One Docker container.

## Links

- [Homepage](https://gitlab.com/shibaobun/memex)
- [memEx on GitLab](https://gitlab.com/shibaobun/memex)

---
Source: https://selfhost.directory/project/memex-2