A free, open-source notebook app laid out like OneNote, that you host yourself.
- Notebooks, sections, pages and a freeform canvas where you click anywhere and type.
- Your server. Run one container on your homelab; every device syncs to it. No cloud account.
- Works offline. Every device keeps a full copy of your notes. Two devices can edit the same page while both are offline and nothing is overwritten when they reconnect.
- Bring your notes. Imports OneNote
.onesection files and whole notebook folders. - Take your notes. Export a page, a section, a notebook or everything to HTML, Markdown, plain text, JSON or PDF.
- Readable without Looseleaf. The server keeps every page as a Markdown
file in
data/mirror, updated a few seconds after each edit. - Ask an assistant. The server answers AI assistants such as Claude Code at an MCP endpoint, so they can search and read your notes, add pages and text, and keep a notebook's board: make cards, move them, tick their To Do lines and comment on them. They never delete anything, and the one change they make to text already on a page is a To Do line turned into a card, which becomes a link to it.
- Web, desktop, phone. One web client that also runs as a desktop app and fits a phone screen. Native mobile apps are planned.
Looseleaf is an early release. docs/onenote-parity.md lists every OneNote feature and whether it is built yet. Keep your own backups of anything that matters.
| Dark mode | Phone |
|---|---|
![]() |
![]() |
On a phone the layout is for reading and typing: drawing is desktop-only, and a text container wider than the screen scrolls sideways.
git clone https://github.com/trapp01/Looseleaf.git && cd Looseleaf
docker compose up -d
docker compose logs looseleaf # prints the access token on first startThat pulls ghcr.io/trapp01/looseleaf:latest, published from main for amd64 and
arm64. To update, run docker compose pull && docker compose up -d. To build
from the checkout instead, run docker compose up -d --build.
Open http://<your-server>:8421 and enter the access token. Notes live in the
data volume. data/docs and data/blobs are the notes as the server stores
them; back that folder up however you back up anything else. data/mirror is
a read-only copy of every page as Markdown that any editor can open. The
server also keeps dated snapshots of docs and blobs (14 by default). Settings
and the restore steps are in
packages/server/README.md.
Over plain http the browser keeps your edits while the server is unreachable,
but it cannot reopen the page with no network. For that, serve it over HTTPS
(tailscale serve does it in one command) or use the desktop app.
pnpm install
pnpm --filter @looseleaf/web build
pnpm --filter @looseleaf/desktop packageThe app is in packages/desktop/out. For a Mac with Apple silicon, the
latest build is a
download, and it updates itself from then on. On first run, give it your
server's address and access token, or keep notes on that computer only and
connect later. Builds are unsigned; see
packages/desktop/README.md.
Settings → Mirror folder keeps a copy of every page as a Markdown file in a
folder you choose, rewritten about 5 seconds after a page changes, so editors,
grep and other programs can read the notes. Edits made to those files are not
read back.
Notebook menu → Import from OneNote. The desktop app finds the backups
OneNote keeps on the same computer; in a browser, choose the folder that holds
your .one files. Importing only reads those files. What is and is not carried
over is in packages/onenote/README.md.
Needs Node 22 and pnpm.
pnpm install
pnpm dev # server on :8421 and the web client with hot reload
pnpm test
pnpm typecheckStart with docs/architecture.md and docs/glossary.md; boards and To Do lines are in docs/boards.md.
CONTRIBUTING.md has the setup and the rules. docs/onenote-parity.md is the list of what is left to build. Security problems go through SECURITY.md.
Looseleaf is an independent project. It is not affiliated with or endorsed by
Microsoft. It contains no OneNote code, artwork or fonts. The .one reader is
written from the file-format specifications Microsoft publishes
(MS-ONESTORE, MS-ONE). The interface icons are Microsoft's Fluent UI System
Icons, which are MIT-licensed. OneNote is a trademark of Microsoft Corporation.
Third-party fonts and icons are credited in THIRD-PARTY-NOTICES.txt, which ships inside every build.


