SiYuan logo

SiYuan

Privacy-first, self-hosted personal knowledge management software with block-level references and bidirectional links

Alternative to: notion, obsidian, roam research, evernote


SiYuan is a privacy-first, self-hosted, fully open source personal knowledge management system written in TypeScript and Go. It fuses blocks, outlines, and bidirectional links at the block level so notes stay connected as they grow, with a Markdown WYSIWYG editor, database views, and spaced-repetition flashcards. All data is stored locally under the user's control, with optional end-to-end encrypted sync and full offline use.

SiYuan Docker Compose example

Self-host SiYuan on your own server, homelab, or VPS starting from this Docker Compose example. It runs SiYuan in Docker containers using the official b3log/siyuan:latest image, with persistent volumes and automatic restarts preconfigured. Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.

services:
  siyuan:
    image: b3log/siyuan:latest
    # `serve` starts the web server against the mounted workspace. The access auth
    # code gates the web UI; templated to a user variable via x-winterflow overrides.
    command: ["serve", "--workspace=/siyuan/workspace/", "--accessAuthCode=changeme"]
    restart: unless-stopped
    environment:
      # Timezone used by the container.
      TZ: "UTC"
      # User ID the SiYuan process runs as (owns files in the workspace volume).
      PUID: "1000"
      # Group ID the SiYuan process runs as.
      PGID: "1000"
    volumes:
      - workspace:/siyuan/workspace

volumes:
  workspace:

Values set to changeme are required — replace them with your own values before starting SiYuan.

Prefer a managed setup? WinterFlow installs, configures, and updates SiYuan for you using this same Docker Compose configuration.