Deploy SiYuan Notes
Private SiYuan knowledge base with a durable workspace and login gateway
SiYuan
SiYuan
Just deployed
/siyuan
SiYuan Gateway
Just deployed
Deploy and Host SiYuan Notes on Railway
Deploy SiYuan, the privacy-first, block-based note-taking app and personal knowledge base, with its workspace on a persistent volume and a password-protected gateway in front of it. Write in a Markdown WYSIWYG editor, link and embed blocks, build databases, query your notes with SQL and review flashcards, all from your browser.
About Hosting SiYuan Notes
SiYuan is an open-source (AGPL-3.0) alternative to Notion and Obsidian with block references, two-way links, tags, full-text search, databases, PDF annotation and an AI assistant that works with your own OpenAI-compatible key. This template runs the official SiYuan v3.8.11 image, pinned to an exact digest, as a private service with its workspace on a 5 GB Railway volume, and puts a Caddy gateway with a generated password in front of it. SiYuan's own lock-screen password is generated too and is required on every new session.
Why Deploy SiYuan Notes on Railway
A SiYuan server on the open internet is only as safe as its lock screen, and several of SiYuan's routes answer before the lock screen is checked. This template makes an authenticated gateway the only public entry point, keeps SiYuan on Railway's private network, and refuses to start SiYuan without a strong access auth code or with the lock screen disabled. Your notes survive restarts and redeploys on the attached volume, the images are pinned, and both credentials are generated for you.
Common Use Cases
- A personal knowledge base and journal you can open from any browser, with daily notes, block references and backlinks.
- Research notes and reading highlights with PDF annotation, tags and SQL-powered queries.
- Study with spaced-repetition flashcards built from your own notes.
Dependencies for SiYuan Notes Hosting
Nothing outside Railway. Both credentials are generated at deploy time.
Deployment Dependencies
- SiYuan
v3.8.11(officialb3log/siyuanimage): https://github.com/siyuan-note/siyuan - Caddy
2.11.9for HTTP Basic Auth and the public reverse proxy: https://caddyserver.com - A Railway volume for the SiYuan workspace.
After deployment, open the SiYuan Gateway domain and sign in with SIYUAN_GATEWAY_USERNAME and SIYUAN_GATEWAY_PASSWORD from that service's variables, then enter SIYUAN_ACCESS_AUTH_CODE from the SiYuan service's variables on SiYuan's lock screen.
SiYuan publishes security advisories often, and some are fixed only in prereleases: this template pins the latest stable release (3.8.11) and moves to the next stable one when it ships. The gateway blocks unauthenticated attacks but not content you import or AI output you view after signing in, so until then avoid importing untrusted packages, treat AI output as untrusted, and leave the Publish service off. See the advisories at https://github.com/siyuan-note/siyuan/security/advisories
This is a single-user deployment for use in a browser. SiYuan's desktop and mobile apps cannot connect to a SiYuan server, and the Docker build has no PDF, HTML or Word export. External API clients that send their own Authorization header (API tokens, clipper extensions, WebDAV) cannot pass the gateway; plugins inside the SiYuan UI work normally.
Template Content
SiYuan
b3log/siyuan:v3.8.11SiYuan Gateway
caddy:2.11.9-alpine