# 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. ## Install Save as a script file and run: # SiYuan — Privacy-First Self-Hosted Knowledge Management ## Quick Use ```bash docker run -d --name siyuan -p 6806:6806 -v /data/siyuan:/root/.siyuan b3log/siyuan # Open http://localhost:6806 in your browser ``` ## 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 `~/.siyuan` by 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_CODE` for 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. ## Sources - https://github.com/siyuan-note/siyuan - https://b3log.org/siyuan/en/ --- Source: https://tokrepo.com/en/workflows/3e833b22-39c1-11f1-9bc6-00163e2b0d79 Author: Script Depot