
Deploy Docmost — Self-Hosted Notion & Confluence Alternative
Self-host Docmost — team wiki with real-time collaborative editing
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
docmost
Just deployed
/app/data/storage
Deploy and Host Docmost on Railway
Docmost is an open-source collaborative wiki and documentation platform — a self-hosted alternative to Notion and Confluence for team knowledge bases, internal docs, and technical documentation. It offers real-time collaborative editing, nested pages, spaces, granular permissions, and diagrams, so your whole team writes together in one private workspace. This template deploys Docmost with PostgreSQL and Redis pre-wired and the app secret generated — so your team wiki is live, with the required services connected and the setup traps avoided, in minutes.
What This Template Deploys
| Service | Purpose |
|---|---|
| Docmost | The wiki app, real-time editor, and API on port 3000 |
| PostgreSQL | Pages, spaces, users, permissions, and workspace data |
| Redis | Real-time collaborative editing and background job queues |
All connect over Railway's private network. Docmost serves the workspace, PostgreSQL holds all content and permissions, and Redis powers live collaboration and background jobs — with attachments on a volume or offloaded to S3.
About Hosting
Docmost is a capable multi-service wiki, and a few specifics make it deploy cleanly — all handled here.
APP_SECRET is mandatory — or the app won't start. Docmost requires a secure APP_SECRET of at least 32 characters to run; with a blank or placeholder value, the service fails to start. This template generates a strong secret automatically, so Docmost boots on the first deploy instead of erroring out — one of the most common self-hosted Docmost mistakes, handled for you.
Three services, wired together. Docmost needs PostgreSQL for data and Redis for real-time collaboration and background jobs — Redis isn't optional, because it's what powers the live collaborative editing that makes Docmost feel like Notion. This template wires all three via Railway references (DATABASE_URL, REDIS_URL), so you skip the connection setup and get working real-time editing immediately.
APP_URL must be your domain. Docmost uses APP_URL for links, invitations, and asset URLs, so it must be your Railway (or custom) public domain, or shared links and team invites resolve to the wrong host. This template sets it to your Railway domain, with automatic HTTPS.
Attachments: volume or S3 — plan for persistence. File uploads go to /app/data/storage, which is ephemeral on Railway without a volume — so this template mounts one. For larger workspaces, set STORAGE_DRIVER=s3 with the AWS_S3_* variables to offload attachments to S3-compatible object storage (Cloudflare R2, Backblaze B2, MinIO, or S3), keeping the volume light and backups simple. Your pages and permissions always live in PostgreSQL regardless.
Add SMTP to invite your team. Docmost sends invitations and notifications by email, so configure the SMTP_* (or Postmark) variables to invite team members and enable password resets. The workspace works without it, but email unlocks team onboarding. Pages, spaces, users, and permissions live in PostgreSQL — the single source of truth and primary backup target — while attachments live on the volume or in your S3 bucket, both surviving redeploys.
Typical cost: ~$5–15/month on Railway for the three services, scaling with team size and storage. Docmost is AGPL-3.0 and free — no per-seat pricing, versus Notion's and Confluence's per-user fees.
How It Compares
| Docmost (self-hosted) | Notion | Confluence | Outline | |
|---|---|---|---|---|
| Real-time editing | Yes | Yes | Yes | Yes |
| Nested pages / spaces | Yes | Yes | Yes | Yes |
| Permissions | Granular | Per plan | Granular | Yes |
| Cost model | Flat infra | Per seat | Per seat | Flat infra |
| Data ownership | Full — your infra | Vendor | Vendor | Full |
| Self-hostable | Yes | No | No | Yes |
Notion and Confluence are polished but bill per seat and keep your team's documentation on their servers. Outline is a strong self-hosted alternative but more of a knowledge base than a full collaborative editor. Docmost's edge is Notion-and-Confluence-style collaborative editing — nested pages, spaces, permissions, and diagrams — self-hosted at flat cost with no per-seat fees, and your team's entire knowledge base on infrastructure you own.
Deploy in Under 5 Minutes
- Click Deploy on Railway — Docmost, PostgreSQL, and Redis build and wire together (~4 minutes)
- Confirm
APP_SECRETis generated andAPP_URLis set to your Railway domain - Open your Railway URL and create your admin account and first workspace
- Set the
SMTP_*variables to enable team invitations - Create spaces and pages, and invite your team to start writing together
For larger workspaces, set STORAGE_DRIVER=s3 to keep attachments in object storage.
Common Use Cases
- Team wiki — a private, collaborative knowledge base for your whole team
- Internal documentation — onboarding guides, runbooks, and company policies in one place
- Project and meeting notes — organize plans, notes, and roadmaps in nested pages
- Confluence replacement — team documentation without per-seat licensing
Configuration
| Variable | Required | Description |
|---|---|---|
APP_SECRET | Generated | 32+ char secret — mandatory, or Docmost won't start |
APP_URL | Required | Your Railway public domain — for links and invitations |
DATABASE_URL | Auto-injected | PostgreSQL connection via Railway reference |
REDIS_URL | Auto-injected | Redis connection for real-time editing and jobs |
STORAGE_DRIVER / AWS_S3_* | Optional | Set s3 to offload attachments to object storage |
SMTP_* | Recommended | Email for team invitations and notifications |
APP_SECRETis mandatory andAPP_URLmust be your domain. Docmost won't start without a 32+ char secret (generated here), andAPP_URLmust be your Railway domain or links and invites break. Redis is required for real-time editing.
Attachments on a volume or S3. Uploads go to
/app/data/storage(mounted here), or setSTORAGE_DRIVER=s3withAWS_S3_*for object storage. Pages and permissions always live in Postgres — back it up.
Dependencies for Docmost Hosting
- Railway account — ~$5–15/month for the three services, scaling with team and storage
- PostgreSQL and Redis (both included and wired via Railway references)
- A persistent volume for attachments, or an S3-compatible bucket (included / optional)
- An SMTP provider for team invitations and notifications
Deployment Dependencies
- Docmost GitHub Repository
- Docmost Documentation
- Docmost Self-Hosting Guide
- Railway Private Networking
Implementation Details
The template runs the official docmost/docmost:latest image on port 3000 with a Railway-managed PostgreSQL database and a Redis service, all connected over the private network via DATABASE_URL and REDIS_URL. Redis is required rather than optional: it powers Docmost's real-time collaborative editing and background job queues, so the live multi-user editing that defines the product depends on it. APP_SECRET, a mandatory 32+ character value without which Docmost fails to start, is generated automatically, and APP_URL is set to the Railway domain so links, invitations, and asset URLs resolve correctly.
File attachments are written to /app/data/storage, which is mounted on a persistent volume so uploads survive redeploys; alternatively, setting STORAGE_DRIVER=s3 with AWS_S3_BUCKET, AWS_S3_ENDPOINT, AWS_S3_REGION, and the access credentials redirects uploads to S3-compatible object storage, keeping the volume light and simplifying independent backups. Pages, spaces, users, and permissions persist in PostgreSQL, the single source of truth and primary backup target.
Email for invitations and notifications is configured through the SMTP_* variables (or a Postmark token), and Docmost provides nested pages, spaces, granular permissions, diagrams, and an API. The minimum footprint is modest — roughly 1 vCPU and 512 MB RAM plus the databases — scaling with team size and content.
Frequently Asked Questions
Why does Docmost fail to start? Almost always a missing APP_SECRET — Docmost requires a secure 32+ character secret and won't run with a blank or placeholder value. This template generates one automatically, so it boots on the first deploy.
Why does Docmost need Redis? Redis powers real-time collaborative editing and background jobs — it's what makes multi-user editing work. This template wires it alongside PostgreSQL, so live collaboration functions out of the box.
Where are file attachments stored? On the /app/data/storage volume by default (mounted here so they persist), or in S3-compatible object storage if you set STORAGE_DRIVER=s3 with the AWS_S3_* variables — useful for larger workspaces and independent backups.
How do I invite my team? Configure the SMTP_* variables with your email provider, then invite members from the workspace — Docmost sends them email invitations to join and collaborate.
Why Deploy Docmost 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 Docmost on Railway you get a collaborative team wiki with the hard parts solved — PostgreSQL and Redis wired, the mandatory app secret generated, the app URL set, and attachments persisted. Real-time docs, spaces, and permissions for your whole team with no per-seat fees, self-hosted on infrastructure you own.
Template Content
