ScriptsApr 16, 2026·3 min read

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.

TL;DR
SiYuan stores your notes locally with block references, encryption, and Markdown.
§01

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.

§02

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.

§03

How to use

  1. Download SiYuan from the official website or GitHub releases. It runs on Windows, macOS, Linux, and Docker.
  2. Create a new notebook and start writing in Markdown. Use (( to create block references to any existing block in your workspace.
  3. 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.
§04

Example

# Project Notes
§05

Architecture Decision

We chose PostgreSQL over MySQL for time-series data.

See ((20240115-benchmark-results)) for the benchmark.

§06

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.
§07

Related on TokRepo

§08

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

How does SiYuan compare to Obsidian?+

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.

Is SiYuan truly free and open source?+

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.

Can I use SiYuan with AI assistants?+

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.

Does SiYuan support collaboration?+

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.

What export formats does SiYuan support?+

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)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets