leafen-org/leafen
Acerca de
Notion, rebuilt as open source.
Productividad y automatizaciónCrecimiento de estrellas medido
- in 24h
- Recopilando historial
- in 7 days
- Recopilando historial
- in 15 days
- Recopilando historial
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
Original
Leafen
Notion, rebuilt as open source.
Download · Docs · Install guide · Ambassadors

Leafen is an early release (0.7). My company has run its daily work on it for several weeks, and a few friends use it too. If something breaks or gets in your way, tell the agent you connected to Leafen: "report this as an issue." It writes the report with made-up data and shows it to you; once you say yes, it files the issue, or gives you a link to file it yourself.
Get started
Windows: from the Microsoft Store.
macOS: download the app and move it to Applications.
For Apple silicon. On an Intel Mac, download the Intel build.Docker:
docker compose up -dwith the repository's compose.yaml.Railway: one click, with a volume for your data. Railway puts the service and its volume in your preferred region (Railway's account settings): US West (California), US East (Virginia), EU West (Amsterdam) or Southeast Asia (Singapore), so choose the nearest before you deploy.
Leafen receives a share of Railway's revenue from this template; the price you pay is the same.Let your agent do it: paste this to the agent you use:
Read https://github.com/leafen-org/leafen/blob/main/docs/install.md, install Leafen on this computer and take me through its setup.
More in Install and the install guide.
Why we made it
For years, both my company's work and the small records of my own life piled up in Notion. The more they piled up, the more those records became my work and my life. Records that precious sitting on someone else's server made me worry they could one day just disappear.
I looked at open-source alternatives too, and kept seeing them move features behind a paid plan later, or make self-hosting the harder path so their hosting would sell. That wasn't the open source I had hoped for.
So I rebuilt Notion as open source: the same way of working, with the data kept where I hold it, and every feature in what you download. I hope it can keep your precious records the same way.
Works like Notion
Moving over must not change how you work.
- Pages, databases and every view. Blocks, relations, rollups and formulas, forms, buttons and automations, templates, wikis, comments and mentions, version history, public sites.
- Bring it in, take it out. Notion, Confluence, Evernote, Obsidian, Logseq, SiYuan, Markdown and CSV come in, and everything goes out to Markdown, CSV, HTML or PDF.
- Notion's API, as is. The official SDKs, notion-to-md, the LlamaIndex and LangChain readers and Notion's own MCP server connect by changing one address.
Different from Notion
- It runs where you choose. The desktop app is the server. Phones join by QR code and reach it from outside through the built-in Tailscale, free for personal use. For a team, keep it on a computer that stays on, a NAS or a server with Docker.
- Your data stays in one folder. A standard SQLite database and the attached files, with scheduled backups, exports and moving to another server built in. Leafen sends your workspace data nowhere.
- Every feature, free. No plans, no billing and no block limits, for any number of people. SSO, SCIM, audit logs, legal hold and data loss prevention are included.
- Bring your own AI. No AI is built in. Agents such as Claude, ChatGPT and Codex do anything you do on screen, with your permissions and no connecting page by page, and leave their name on what they change.
- Nothing lost. It keeps working offline, with replication and failover to a standby server.
- 58 languages, with search that finds Korean compounds and words inside Chinese, Japanese and Thai sentences.
- Apps add document viewing, Hangul (HWP) and Office editing, a drive, mail and approvals.
- Not here: Notion AI, Notion Calendar and Mail, and Notion's marketplace and template gallery.
More in Differences from Notion.
Where it is now
This is the 0.7.3 release. My company already runs on it: its Notion workspace came in through Leafen's Notion import, its staff use it, and agents work in it over MCP.
The table says how far each area has been finished, and what comes next:
| Finished | Editing pages and blocks, files and media, getting around (sidebar, search, links), databases (properties, views, filters and sorts, forms, templates, automations, task management) |
| Built, being finished for 1.0 | Setup and accounts, members and teamspaces, Notion import, API and MCP connections and permissions, sharing and publishing |
| Built, being finished after 1.0 | Offline, organization features, apps, document apps, many tabs and dropped connections |
| Next | Phone apps (iOS, Android) and the other app store releases (Mac App Store, Snap Store) |
- It runs as a desktop app (macOS, Windows) and in Docker; on Linux, run it in Docker and use it in a browser. The Mac app is signed and notarized by Apple, and the Windows app is in the Microsoft Store; the Windows zip in the releases isn't signed, so Windows warns the first time you open it.
- Areas not yet finished may have places that look or behave differently from Notion.
- What Leafen promises of itself — the core path, data carried over from the published versions, backup and restore, the MCP and API contracts, permissions and sharing, imports, first setup, and the web screens in a headless browser — is checked by public tests in the public CI (Checks).
- Measured on a Mac Studio (M1 Max, 10 cores) on 2026-10-22, one server answered 295 requests a second at p95 48 ms for 30,000 simulated people reading, searching and writing 200 shared synthetic pages, the load made on the same machine and the request limits off; live co-editing, databases and files weren't in the load. How it was measured, what it leaves out, and how to measure it again are in the benchmark.
What comes next
- Finish the areas for 1.0 one by one, in the order above.
- Check everything in 1.0 again from the start.
- 1.0 — the areas for 1.0 finished. Your data already carries over when you update, from 0.7 on, and the Docker image, the Mac app, signed and notarized by Apple, and the Windows app in the Microsoft Store are already out.
- After that — the other areas finished, and the other app store releases, the phone apps among them. Until then a phone uses Leafen in its browser.
Notion keeps changing, so the aim is not to match it at one moment but to keep catching up, through 1.0 and after it, until the differences are hard to notice in daily use, apart from those made on purpose.
FAQ
What happens to my data if Leafen stops?
Your data is one folder: a standard SQLite database that SQLite tools read without Leafen, and the attached files. You can export everything to Markdown, CSV, HTML or PDF at any time, and the source is AGPL, so anyone can keep running it.
What does the commercial license lock?
Nothing. Every feature is in every Leafen, free. The commercial license is only for a company that wants terms other than the AGPL's.
Could Leafen's license close later?
Every version already released stays AGPL-3.0 for good, and anyone can fork it. Contributions come in under the CLA, which lets Leafen relicense them only under OSI-approved open source licenses, besides a commercial license given in a contract and app store terms for its store editions.
Why does this repository have so few commits?
Leafen is developed in a private repository. Each release lands here with its notes in the CHANGELOG.
Do Korean or Japanese names survive moving in and exporting?
macOS spells file names with decomposed letters, a Hangul syllable as its separate jamo, which look the same but break search. Leafen stores names and imported text composed (Unicode NFC) whichever way they come in: a page's title, an uploaded file's name, text pasted or dropped into a page, a comment's words however it is written (in the app, by the API or an agent), Markdown, HTML, Obsidian or Notion export files imported, and a Notion workspace moved in with a Notion token. Exports write their file names in UTF-8, marked as such in the ZIP.
Why does Windows warn me when I open it?
The Windows zip in the releases isn't signed, so Windows warns the first time you open it: click More info, then Run anyway. Leafen from the Microsoft Store opens without a warning, and the store keeps it up to date.
Install
From 0.7 on, your data carries over when you update Leafen; on 0.1 or 0.2, update to 0.7.0 first, which carries their data over. Before every release we open data folders that the versions it updates from made, in their Docker image and Mac app, with the new one and check that everything reads as it did. My company's own server, with its data in it, is also updated on every new build. Before an update changes how data is stored, Leafen first saves a copy of the whole data folder.
Let your agent do it
Paste this to the agent you use.
Read https://github.com/leafen-org/leafen/blob/main/docs/install.md, install Leafen on this computer and take me through its setup.
Your agent installs Leafen, then asks you what its first screens ask — the language, start new or log in, your name, whether it opens from anywhere — does each step and connects itself, then offers to move your Notion in. You press only where Leafen asks you to, such as confirming your name and allowing the agent in. The install guide is the same document a person can follow by hand; its For agents part says which way your agent installs Leafen and how it looks around Leafen itself. Your agent does not bypass the operating system's checks when the app first opens; it tells you what to click.
Desktop app
Install it with the Windows or macOS button in Get started: on Windows from the Microsoft Store, or the zip below it on a PC without the Store; on macOS from the latest release. A Windows zip of 0.7.2 or earlier doesn't say when a newer version is out: download the new zip from the latest release yourself. Open it and enter your name. For others to use it all the time, run it on a computer that is always on and connect through its built-in Tailscale address (a company: its own domain or a paid Tailscale plan, Outside address). Linux has no desktop app: run Leafen in Docker (below) and open it in a browser.
Docker
One container runs the server (self-hosting).
The image is ghcr.io/leafen-org/leafen, also on Docker Hub as leafenorg/leafen.
From 0.2.1 it is built from this repository by its public release workflow
and signed there, and Docker Hub's is a copy with the same digest
(how to check it).
docker compose up -d
docker compose exec leafen leafen setup link
On a new data folder, the second command waits for the server and prints a setup address with a one-time code. Open it and enter the first administrator's name. Reverse proxies, backups, restores and settings are in the self-hosting guide.
One-click hosting templates are in hosting templates.
From source
To change Leafen or build it yourself, you need Go 1.27, Node.js 22.12 or later, and on macOS the Xcode command line tools the window needs.
npm --prefix web ci --ignore-scripts
npm --prefix web run build
go build -trimpath -buildvcs=false -o dist/leafen ./desktop
./dist/leafen
On Windows, in Command Prompt or PowerShell:
npm.cmd --prefix web ci --ignore-scripts
npm.cmd --prefix web run build
go build -trimpath -buildvcs=false -o dist\leafen.exe .\desktop
.\dist\leafen.exe
npm.cmd, because PowerShell's default execution policy refuses npm's
npm.ps1; leafen.exe, because Go adds .exe only to a name it picks itself.
On Linux, build the server alone and use it in a browser (without Docker).
Architecture
One program (Go) runs the screens, the API, files, real-time collaboration and MCP together, and keeps the data in one folder. The details are in the architecture guide.
Data, backups and upgrades
The data folder is the unit Leafen keeps. Back it up whole, keep backups outside the running folder, and before changing an important installation, try restoring into a new folder first.
You can take it anywhere. Leafen is AGPL software you can run on any
computer or server, and everything a server holds is in that one folder: its
database in SQLite files standard SQLite tools open (data.db, and its logs
in auxiliary.db), with the attached files beside them. Copy the stopped
folder, or back it up and restore it as below, to move from a desktop to a
NAS or a cloud server. Pages export as Markdown or HTML and databases as CSV;
a Leafen archive keeps everything in an open format
(Take it anywhere).
./dist/leafen --dir=/srv/leafen/data backup \
--output=/srv/leafen-backups/leafen-$(date +%Y%m%d-%H%M%S).zip
A restore checks the recorded SHA-256 receipt and refuses a target that already has content.
./dist/leafen --dir=/srv/leafen-restored restore \
--input=/srv/leafen-backups/leafen-20260826-120000.zip \
--sha256=<64-character-receipt>
Documentation
| Guide | What it covers |
|---|---|
| The Leafen guide | Every feature, one chapter each, for people and agents — start here |
| Installing Leafen | Desktop, Docker and source installs, first run — agents follow this document too |
| Architecture | Runtime boundaries, durable sources, permissions, recovery |
| Self-hosting | Running Docker, settings, proxies, backups, restores, upgrades |
| Development | Building, running, generated contracts, checks |
| Leafen MCP | OAuth and manual connection, workspace scope, supported tools |
| Building on Leafen | Keys, registered apps, the API, webhooks, view links |
| Building Leafen apps | Manifests, screens, workers, data, signing, the leafen app command |
| Leafen in a regulated organization | A guide for law firms, hospitals and public bodies |
| Reporting a bug | What a bug report holds: synthetic data, steps, the fix in words — agents follow this document too |
Feedback and contributing
Bug reports go in issues, through the bug form. We strongly encourage writing them with the agent you use: paste this line to it.
Read https://github.com/leafen-org/leafen/blob/main/docs/bug-reports.md and write a bug report.
An agent connected to Leafen already has its bug report tool (leafen_bug_report),
so "report this as an issue" is enough, without the line above.
A report holds only what reproduction needs, as the bug report guide says: made-up data that shows the problem, the steps, and the fix you think of in words. Pull requests are welcome under the same rule — made-up data that shows the problem and what you want to change, one problem each — and bigger changes start in Discussions (Pull requests). Questions and ideas go to GitHub Discussions. We can't answer every post; we fix what reproduces first. Report security problems privately as SECURITY.md describes, not in a public post.
Sharing apps or integrations you build on Leafen in Discussions is welcome too (Building Leafen apps).
Sponsors
Leafen is free. Sponsors pay for its development through GitHub Sponsors. Every sponsor and contributor is named in the people backing Leafen. Inside Leafen, a sponsor list (up to a hundred, largest amount first, company logos) and a row of the top ten companies at the bottom of Home come in an early update after the first release; names link to the sponsors' GitHub profiles. We're also looking for ambassadors, in any country, who introduce Leafen to organizations and bring them to a contract with Leafen: the organization pays 10% less, and the ambassador receives 20% of the list price for every year it pays. Ambassadors
License
Using Leafen as it is, at home or inside a company and for any number of people, is free and asks nothing of you. The AGPL's duties start only when you change Leafen and let others use it (over a network too), or pass Leafen on to others.
Leafen — its server, web client, desktop and phone apps and its own apps, built
in or from its app catalog — is AGPL-3.0-only. What others use to
build on Leafen is Apache-2.0,
each with that license's text beside it: the app SDK (sdk/), the connection
contracts (contracts/), the examples (examples/), the benchmark tools
(bench/), the MCP reference, the guides to
building on Leafen and Leafen apps, and
the bundle file format. A company that wants other terms than
the AGPL can get Leafen's commercial license in a contract directly with
Leafen, for 10% less through an ambassador.
NOTICE lists what Leafen leaves out and why.
Notion is a trademark of Notion Labs, Inc. Leafen is an independent open source project with no affiliation with, sponsorship by or endorsement from Notion Labs; the name is used only to describe the way of working Leafen carries on. Leafen contains none of Notion's code or artwork.
Explorar proyectos relacionados
Cargando…