Introduction
SiYuan is an open-source, privacy-first personal knowledge management system built with TypeScript and Go. It stores all data locally with optional end-to-end encrypted cloud sync, giving you full ownership of your notes and knowledge graph.
What SiYuan Does
- Provides block-level content editing with bi-directional references and backlinks
- Supports Markdown, math equations, diagrams, and embedded content blocks
- Offers a graph view to visualize relationships between notes and blocks
- Includes built-in spaced repetition flashcards for learning
- Delivers real-time full-text search across all notebooks and blocks
Architecture Overview
SiYuan uses a Go backend serving a local HTTP API, with a TypeScript/Electron frontend. Data is stored as JSON files in a flat directory structure on disk. The kernel handles indexing, search, and sync. Cloud sync uses AES-256 encryption before upload, ensuring only you can read your data.
Self-Hosting & Configuration
- Run via Docker or download desktop apps for Windows, macOS, and Linux
- Data stored in
~/.siyuanby default; mount a volume for Docker persistence - Configure access auth code in Settings > About for remote access security
- Enable S3 or WebDAV sync for encrypted backup to your own cloud storage
- Set environment variable
SIYUAN_ACCESS_AUTH_CODEfor headless deployments
Key Features
- Block-level granularity lets you reference and embed any paragraph, heading, or list item
- Local-first architecture ensures zero-latency editing with no internet dependency
- End-to-end encrypted sync keeps data private even on third-party storage
- PDF annotation and asset management built into the editor
- Plugin system and marketplace for community extensions
Comparison with Similar Tools
- Obsidian — also local-first but closed-source; SiYuan is fully open
- Logseq — outliner-focused; SiYuan offers both document and outline modes
- Notion — cloud-dependent SaaS; SiYuan is self-hosted and private
- Trilium — similar self-hosted approach but less active development
- Joplin — simpler note-taking; SiYuan has richer block references
FAQ
Q: Is SiYuan really free? A: The core app is free and open-source. Cloud sync via the official service is a paid feature, but you can self-host sync with S3 or WebDAV for free.
Q: Can I import from Notion or Obsidian? A: Yes. SiYuan supports importing Markdown files and has community tools for migrating from Notion and other platforms.
Q: Does it work offline? A: Absolutely. SiYuan is local-first — all editing works offline. Sync happens when connectivity is available.
Q: How secure is the sync? A: All synced data is encrypted with AES-256 on your device before upload. The server never sees plaintext content.