GraphCanon updated today · GitHub synced today · 26 views this month
Decision brief
Siyuan is a privacy-focused, self-hosted knowledge management tool written in TypeScript and Golang, specialized for personal digital gardens and integrating with various local storage solutions.
Good fit when
- Siyuan should be used when you require a fully open-source tool that prioritizes privacy and keeps all data locally.
- This tool is ideal for developers or users interested in self-hosting who also want to leverage advanced Markdown capabilities for note-taking, PDF integration, and personal knowledge management.
Avoid when
- Siyuan may not be suitable if you require cloud synchronization features provided by proprietary software as it focuses on local-first operations.
- If your preference is for a more visually customizable interface, Siyuan's design might have limitations compared to its competitors that offer extensive theming and UI customization.
Observed Jul 12, 2026 · Source: enrich:decision_facts
Verify the decision
Adoption
Package downloads where a registry match exists. GitHub stars (45,974) are secondary evidence.
- npm downloads (30d)
- 4,406·npm downloads API·today
Maintenance and security
Full trust report- Maintenance
- Very active (0d since push)
- As of today
- Provenance
- Not a fork · Organization account
- As of today
- Security (OSV)
- No lockfile
- As of 1mo
Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.
Install
npm install siyuan npmSimilar tools
Same-category neighbours. No typed graph edges are catalogued for this tool yet.
Evidence and technical details
Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.
Overview
SiYuan is a fully open-source tool written in TypeScript and Golang designed for managing knowledge with features like support for markdown, PDFs, and integration with WebDAV.
Capability facts
- Deploy
- Self-host
Source: dockerfile:Dockerfile · Aug 25, 2026
- Docker
- Dockerfile present
Source: dockerfile:Dockerfile · Aug 25, 2026
- Languages
- typescript
Source: github.language · Aug 25, 2026
Categories
Tags
README
Installation Package
Docker Hosting
Docker Deployment
Overview
The easiest way to serve SiYuan on a server is to deploy it through Docker.
- Image name
b3log/siyuan - Image URL
File structure
The overall program is located under /opt/siyuan/, which is basically the structure under the resources folder of the Electron installation package:
- appearance: icon, theme, languages
- guide: user guide document
- stage: interface and static resources
- kernel: kernel program
Entrypoint
The entry point is set when building the Docker image: ENTRYPOINT ["/opt/siyuan/entrypoint.sh"]. This script allows changing the PUID and PGID of the user that will run inside the container. This is especially relevant to solve permission issues when mounting directories from the host. The PUID (User ID) and PGID (Group ID) can be passed as environment variables, making it easier to ensure correct permissions when accessing host-mounted directories.
Use the following parameters when running the container with docker run b3log/siyuan:
Note: Since v3.7.0, the
servesubcommand must be passed explicitly (e.g.docker run b3log/siyuan serve --workspace=...). Rundocker run --rm b3log/siyuan serve --helpto see all serving options.
--workspace: Specifies the workspace folder path, mounted to the container via-von the host--accessAuthCode: Specifies the lock screen password
More parameters can be found using --help. Here’s an example of a startup command with the new environment variables:
docker run -d \
-v workspace_dir_host:workspace_dir_container \
-p 6806:6806 \
-e PUID=1001 -e PGID=1002 \
b3log/siyuan \
serve \
--workspace=workspace_dir_container \
--accessAuthCode=xxx
PUID: Custom user ID (optional, defaults to1000if not provided)PGID: Custom group ID (optional, defaults to1000if not provided)workspace_dir_host: The workspace folder path on the hostworkspace_dir_container: The path of the workspace folder in the container, as specified in--workspace- Alternatively, it's possible to set the path via the
SIYUAN_WORKSPACE_PATHenv variable. The commandline will always have the priority, if both are set
- Alternatively, it's possible to set the path via the
accessAuthCode: Lock screen password (please be sure to modify, otherwise anyone can access your data)- Alternatively, it's possible to set the lock screen password via the
SIYUAN_ACCESS_AUTH_CODEenv variable. The commandline will always have the priority, if both are set - To disable the lock screen password set the env variable
SIYUAN_ACCESS_AUTH_CODE_BYPASS=true
- Alternatively, it's possible to set the lock screen password via the
- OIDC can replace the lock screen password as the required Docker access authentication. Set
SIYUAN_OIDC_ENABLED=true,SIYUAN_OIDC_PROVIDER(custom,google,microsoft, orgithub),SIYUAN_OIDC_CLIENT_ID, and the provider-specific values below. GitHub uses its OAuth 2.0 user API adapter; the other providers use OpenID Connect discovery and ID Token validation. An invalid enabled configuration stops Docker startup when no lock screen password is availableSIYUAN_OIDC_ISSUER_URL: Issuer URL required by thecustomandmicrosoftproviders; Microsoft must use a tenant-specific issuer such ashttps://login.microsoftonline.com/<tenant-id>/v2.0SIYUAN_OIDC_CLIENT_SECRET: Optional client secret for OpenID Connect providers; required by the GitHub OAuth adapter. Every authorization-code flow also uses PKCESIYUAN_OIDC_SCOPES: Comma- or space-separated scopes;openidis always includedSIYUAN_OIDC_REDIRECT_URL: Public HTTPS callback URL ending in/api/system/oidc/callback, required for remote browser accessSIYUAN_OIDC_ALLOW_ALL: Explicitly grant SiYuan administrator access to every identity authenticated by the pr
For agents
This page has a .md twin and JSON over the API.