SiYuan
A privacy-first, self-hostable personal knowledge management system with block-level references, Markdown WYSIWYG editing, flashcards and optional AI chat.
- GitHub stars
- 47k
- Last commit
- yesterday
- Latest release
- v3.8.6
- Licence
- AGPL-3.0
- Self-hosted
- Yes

SiYuan is an open-source, privacy-first personal knowledge management system. Its distinctive feature is fine-grained, block-level referencing: any block can be linked to or embedded elsewhere, with two-way links, custom attributes and SQL query embeds. Editing is Markdown WYSIWYG, and the project describes itself as a workspace where humans and AI agents work together. It is local-first and self-hostable.
The editor supports block-style writing, list outlines, block zoom-in, very large documents, math formulas, charts, flowcharts and Gantt charts. Web clipping, PDF annotation links, flashcards with spaced repetition, a database table view, Tesseract OCR and multi-tab split-screen layouts are included. You can export blocks and embeds, standard Markdown with assets, or PDF, Word and HTML. AI writing and Q and A chat can use the OpenAI API, and template and JavaScript or CSS snippets allow customization.
SiYuan is AGPL-3.0 licensed and available as desktop apps, mobile apps for Android, iOS and HarmonyOS, an installation package, a package manager, and Docker, Kubernetes, Unraid and TrueNAS hosting. A command line interface and an app market for extensions exist. Most features are free, even for commercial use.
Key features
- Block-level references and two-way links
- Markdown WYSIWYG editor
- Flashcards with spaced repetition
- SQL query embeds and database table views
- Export to Markdown, PDF, Word and HTML
- AI writing and Q and A chat
- Docker, Kubernetes and mobile apps
Pricing: Most features are free, even for commercial use; check the project FAQ for any paid options.





