Railway

Deploy Trilium Notes

Personal knowledge base for structured notes, links, and automation.

Deploy Trilium Notes

Just deployed

/home/node/trilium-data

Deploy and Host Trilium Notes on Railway

Deploy on Railway

Published on the Railway marketplace: https://railway.com/deploy/trilium-notes

Trilium Notes is a personal knowledge base for building deeply structured note trees. It combines rich text, code notes, links, attributes, full-text search, versioning, protected notes, diagrams, scripting, and an automation API in a self-hosted application designed for large collections of interconnected notes.

About Hosting Trilium Notes

Trilium Notes runs as one Docker service with an embedded SQLite database, so it needs no external database or cache. The service listens on port 8080, exposes the supported /api/health-check endpoint, and stores its database, configuration, backups, logs, and attachments in /home/node/trilium-data. A Railway volume mounted there keeps the complete knowledge base across restarts and redeployments. On first launch, choose whether to create an empty or demo document and immediately set a strong password. Trilium is a single-user application; deploy a separate instance for each independent user. Keep backups before upgrades because database migrations are not backward compatible.

Common Use Cases

  • Building a personal wiki with arbitrarily deep note trees, links, relations, and attributes
  • Organizing research, technical documentation, journals, and project knowledge with full-text search
  • Automating a private knowledge base through scripts, the REST API, and the Web Clipper

Dependencies for Trilium Notes Hosting

  • triliumnext/trilium:v0.104.1 — the immutable application image
  • A persistent Railway volume mounted at /home/node/trilium-data for the complete Trilium data directory

Deployment Dependencies

Implementation Details

  • Service: one service named Trilium Notes, using triliumnext/trilium:v0.104.1.
  • Networking: the Railway public domain targets the documented container port 8080. Trilium's supported health endpoint is /api/health-check.
  • Persistence: TRILIUM_DATA_DIR=/home/node/trilium-data matches the documented standard-image path and the volume mount. The rootful image starts as root, fixes ownership below /home/node, then runs Trilium as UID/GID 1000. This avoids the root-owned Railway volume error produced by Umbrel's otherwise valid /data bind mount. The directory contains document.db, config.ini, backups, logs, and other instance data.
  • First-run security: the setup flow is initially reachable at the public URL. Complete setup and set a strong password immediately; do not leave an initialized instance without a password.
  • Upgrades: the image is version-pinned to prevent unintended minor upgrades. Back up the data directory before changing the image tag because startup migrations can prevent older versions from reading the upgraded database.

This is a community-maintained deployment template and does not imply affiliation with or endorsement by TriliumNext.

Why Deploy Trilium Notes on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Trilium Notes on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
31
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51