Railway

Deploy Outline

Collaborative team wiki for documents your whole company reads

Deploy Outline

/var/lib/postgresql/data

Just deployed

/data

Just deployed

/data

/var/dex

Just deployed

Just deployed

outline-storage

Bucket

Just deployed

Outline logo

Deploy and Host Outline on Railway

Outline is a team knowledge base: a fast, collaborative wiki where engineering, support and operations teams keep the documents everyone else has to read. It gives you nested collections, a block editor with slash commands and Markdown shortcuts, real-time co-editing, comments, search, public share links and an HTTP API. Teams reach for it as a self-hosted Notion or Confluence alternative when documentation is too central — or too sensitive — to keep in someone else's database.

This template lets you self-host Outline on Railway with the production topology already wired together. The web service runs Outline's HTTP, WebSocket and collaboration processes; a separate worker service runs the job queue and scheduled tasks, so exports and email never compete with page loads. Postgres stores documents and revisions, Redis carries the queues, collaboration state and migration lock, and a Railway bucket holds every upload. A bundled Dex identity provider supplies the sign-in Outline does not ship, and Mailpit captures invitations so the app is complete the moment it comes up.

Diagram of the Outline services and datastores on Railway

Getting Started with Outline on Railway

Deploy the template, then set ADMIN_EMAIL and ADMIN_PASSWORD on the dex service — that pair is the account you sign in with, and it is the only input the template needs. When the services go green, open the public URL of the outline service. Outline has no login screen of its own, so it forwards you straight to Dex; enter the email and password you chose and you land back in Outline with a workspace created and your account set as its admin.

The first screen is a starter collection called Welcome. Press New doc, type a title, hit Enter and start writing — ## makes a heading, / opens the block menu, and dragging an image into the page confirms object storage is wired correctly. Invite the rest of the team from Invite people… in the sidebar; every message Outline sends is captured by the Mailpit service, whose public URL shows the inbox behind the credentials in MP_UI_AUTH.

Outline document holding a release runbook and an uploaded image

Outline collection listing the workspace's five documents

Mailpit inbox showing Outline's workspace invitation email

About Hosting Outline

Outline is a Node.js application backed by Postgres and Redis. Self-hosting makes sense when your documentation holds customer data, incident history or runbooks you would rather keep inside your own infrastructure, or when per-seat pricing stops matching how many people need read access.

Key features:

  • Block editor with Markdown shortcuts, slash commands, tables, code blocks and diagrams
  • Real-time collaborative editing with comments, mentions and revision history
  • Nested collections with per-group and per-user permissions
  • Full-text search, public share links and document exports
  • Import from Notion, Confluence and Markdown archives
  • REST API, webhooks and integrations with Slack, GitHub, Linear and Figma

The template splits Outline the way its own documentation describes. The outline service runs SERVICES=web,websockets,collaboration, serving the app, the API and editing sessions. The outline-worker service runs SERVICES=worker,cron, processing the queue that sends email, builds exports and runs scheduled cleanup. Both start from the same image, so they never drift apart, and migrations run at boot behind a Redis lock so the two can start together safely.

Why Deploy Outline on Railway

Railway removes the parts of an Outline install that usually take an afternoon:

  • Postgres, Redis and object storage are provisioned and connected for you
  • Private networking keeps the database, worker and mail service off the internet
  • HTTPS and a public domain are issued automatically
  • Health checks watch the database and cache, not just the process

Common Use Cases

  • An internal engineering wiki holding runbooks, architecture decisions and on-call procedures
  • A customer-facing help centre built from public share links off a private collection
  • A company handbook where HR, finance and legal own separate collections
  • A documentation store fed by the API, so changelogs are published from CI

Dependencies for Outline

  • outlinewiki/outline:latest — the application image, run twice: web tier and worker tier
  • Postgres — documents, revisions, users, permissions and search indexes
  • Redis — job queue, cache, collaboration state and the migration lock
  • Railway object storage bucket — images, attachments and generated exports
  • ghcr.io/dexidp/dex:v2.45.1 — the OpenID Connect provider that issues the first account
  • axllent/mailpit:latest — captures mail until you connect a real SMTP server

Environment Variables Reference

VariablePurpose
SECRET_KEY_SEEDSeeds the at-rest encryption key; keep it stable
URLPublic URL of the Outline service
SERVICESWhich Outline processes this container runs
WEB_CONCURRENCYNode processes per container
FILE_STORAGEs3 sends attachments to the bucket
AWS_S3_FORCE_PATH_STYLEMust stay true for browser uploads
ADMIN_EMAIL / ADMIN_PASSWORDThe first Outline account, set on dex
SMTP_HOST / SMTP_PORTMail server used for invitations

Deployment Dependencies

Hardware Requirements for Self-Hosting Outline

ResourceMinimumRecommended
CPU1 vCPU2 vCPU across web and worker
RAM1 GB2–4 GB with two web processes
Storage1 GB Postgres10 GB Postgres plus object storage
RuntimeNode.js 26, Postgres, RedisSame, split into web and worker services

Attachments dominate storage growth, and because they live in object storage the database itself stays small.

Self-Hosting Outline with Docker

Outline needs Postgres, Redis and a 64-character hex SECRET_KEY. Generate the key first:

openssl rand -hex 32

Then run the published image against your own datastores, on port 3000:

docker run -d --name outline -p 3000:3000 \
  -e URL=https://wiki.example.com \
  -e SECRET_KEY=<64 hex characters from the command above> \
  -e UTILS_SECRET=$(openssl rand -hex 32) \
  -e DATABASE_URL=postgres://user:pass@postgres:5432/outline \
  -e REDIS_URL=redis://redis:6379 \
  -e OIDC_CLIENT_ID=outline \
  -e OIDC_CLIENT_SECRET=your-client-secret \
  -e OIDC_AUTH_URI=https://idp.example.com/auth \
  -e OIDC_TOKEN_URI=https://idp.example.com/token \
  outlinewiki/outline:latest

At least one sign-in provider is required — Slack, Google, Microsoft Entra, Discord or any OpenID Connect server. On Railway one is included, so there is nothing to register with a third party before you can log in.

How Much Does Outline Cost to Self-Host?

Outline's source is published under the Business Source License 1.1, which lets you run it for your own team at no charge; the one restriction is that you may not resell it as a competing hosted document service. There is no per-seat fee when you host it yourself, so a fifty-person workspace costs the same as a five-person one. Outline's own cloud starts at $10 per month for up to ten members. Self-hosting on Railway costs infrastructure only.

FAQ

What is Outline?

Outline is a collaborative team knowledge base and wiki with a block editor, nested collections, real-time editing, search and an HTTP API. It is commonly used as a self-hosted Notion or Confluence alternative.

What does this Railway template deploy?

Six services — the Outline web tier, an Outline worker tier, Postgres, Redis, a Dex identity provider and a Mailpit mail catcher — plus an object storage bucket.

Why does the template include an identity provider?

Outline has no built-in username and password login — every account arrives through an SSO provider, and its email sign-in only works for users who already exist. Dex supplies that provider so the first account can be created. Connect Google, Slack, Microsoft Entra or your own OpenID Connect server to the outline service and you can remove Dex.

Why does Outline need Redis and object storage?

Redis runs the job queue, the collaboration state and the lock that keeps migrations safe when the two services start at the same time. Object storage holds uploads, so both read the same files without sharing a disk.

How do I send real email instead of using the built-in inbox?

Set SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD and SMTP_SECURE=true on both Outline services and remove SMTP_DISABLE_STARTTLS. Mailpit can then be deleted.

Can I scale Outline horizontally on Railway?

Yes. Raise WEB_CONCURRENCY or the replica count on the web service — REDIS_COLLABORATION_URL is already set, which is what lets the collaboration server run in more than one process. Keep the worker at one process: its scheduler has no leader election and would otherwise queue every job twice.


Template Content

More templates in this category

View Template
Libredesk - Complete Setup
[Jul'26] Complete self-hosted omnichannel customer support desk.

codestorm
1
View Template
Paperless-ngx
Document management with OCR on Railway with PostgreSQL and Redis

INAPP
1
View Template
Instatic CMS - Postgres
Design, build and manage powerful static sites from state-of-the-art CMS

Instatic
140