SiYuan — Privacy-First Self-Hosted Knowledge Management
SiYuan is a local-first, self-hosted personal knowledge management system with block-level references, end-to-end encryption, and Markdown support.
What it is
SiYuan is an open-source, local-first personal knowledge management system. It stores all data on your own machine or server, giving you full control over your notes, documents, and knowledge graph. Unlike cloud-only note apps, SiYuan keeps your data private by default.
SiYuan is built for developers, researchers, and knowledge workers who want block-level references (similar to Roam Research or Logseq), end-to-end encryption for sync, and native Markdown support without handing their data to a third party.
How it saves time or tokens
SiYuan eliminates context-switching between multiple note tools. Its block-level reference system lets you link any paragraph, heading, or list item across your entire knowledge base. Instead of duplicating content, you reference it once and see it everywhere. The built-in search indexes your entire vault instantly, so finding past notes takes seconds rather than minutes of manual browsing.
For AI workflows, SiYuan's local-first architecture means you can feed your knowledge base to local LLMs without uploading sensitive data to external APIs.
How to use
- Download SiYuan from the official website or GitHub releases. It runs on Windows, macOS, Linux, and Docker.
- Create a new notebook and start writing in Markdown. Use
((to create block references to any existing block in your workspace. - Enable end-to-end encrypted sync if you want to access notes across devices. SiYuan offers its own sync service or you can self-host the sync server.
Example
# Project Notes
Architecture Decision
We chose PostgreSQL over MySQL for time-series data.
See ((20240115-benchmark-results)) for the benchmark.
Meeting Notes
- Discussed migration plan ((20240110-migration-checklist))
- Action items linked to ((20240112-sprint-board))
Block references like `((block-id))` create bidirectional links. Clicking any reference jumps to the source block, and the source block shows all its backlinks.
Related on TokRepo
- Self-hosted AI tools — Other privacy-first tools you can run on your own infrastructure
- AI tools for documentation — Tools that help manage and generate documentation
Common pitfalls
- SiYuan's sync service requires a paid subscription for the official cloud relay. Self-hosting the sync server avoids this cost but requires your own infrastructure.
- Block references use internal IDs, not human-readable slugs. Renaming a heading does not break links, but exporting to plain Markdown loses the reference connections.
- The mobile app exists but has fewer features than the desktop version. Heavy editing is best done on desktop.
Frequently Asked Questions
SiYuan uses block-level references while Obsidian uses file-level links. SiYuan stores data in a custom format with a built-in database, while Obsidian uses plain Markdown files. SiYuan offers end-to-end encrypted sync natively. Both are local-first, but SiYuan gives finer-grained linking at the block level.
Yes. SiYuan's core is open source under the AGPL license. The desktop and self-hosted versions are free. The optional cloud sync service is a paid feature, but you can self-host the sync server to avoid this cost entirely.
SiYuan's local data storage makes it straightforward to feed your knowledge base into local LLMs or AI tools that read from your filesystem. Some community plugins add direct LLM integration for summarization and Q&A over your notes.
SiYuan is primarily a single-user tool. It does not have real-time collaborative editing like Notion or Google Docs. You can share read-only published pages, but simultaneous multi-user editing is not supported.
SiYuan exports to Markdown, PDF, HTML, and Word (docx). Block references are resolved to plain text during export. You can also use the API to extract data programmatically for integration with other tools.
Citations (3)
- SiYuan GitHub— SiYuan is a local-first personal knowledge management system with block-level re…
- SiYuan Documentation— End-to-end encrypted sync between devices
- SiYuan License— AGPL open-source license
Related on TokRepo
Discussion
Related Assets
NAPI-RS — Build Node.js Native Addons in Rust
Write high-performance Node.js native modules in Rust with automatic TypeScript type generation and cross-platform prebuilt binaries.
Mamba — Fast Cross-Platform Package Manager
A drop-in conda replacement written in C++ that resolves environments in seconds instead of minutes.
Plasmo — The Browser Extension Framework
Build, test, and publish browser extensions for Chrome, Firefox, and Edge using React or Vue with hot-reload and automatic manifest generation.