---
title: "Deploy Outline"
description: "Collaborative team wiki for documents your whole company reads"
category: "CMS"
url: https://railway.com/deploy/outline-knowledge-base
---

# Deploy Outline

Collaborative team wiki for documents your whole company reads

**[Deploy Outline on Railway](https://railway.com/template/outline-knowledge-base)**

- **Creator:** A3A
- **Category:** CMS
- **Total deploys:** 1

## Template content

### Postgres https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### Redis https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/redis.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### mailpit https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mailpit.svg

- **Image:** axllent/mailpit:latest
- **Health check:** /livez
- **Public domain:** Yes

### dex https://raw.githubusercontent.com/dexidp/dex/master/docs/logos/dex-glyph-white.svg

- **Source:** https://github.com/gridalpha/outline-railway
- **Health check:** /healthz
- **Public domain:** Yes

### outline https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/outline.svg

- **Source:** https://github.com/gridalpha/outline-railway
- **Health check:** /_health
- **Public domain:** Yes

### outline-worker https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/outline.svg

- **Source:** https://github.com/gridalpha/outline-railway
- **Health check:** /_health

## Buckets

- **outline-storage**

## Documentation

![Outline logo](https://www.getoutline.com/images/screenshot.png)

# 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](https://res.cloudinary.com/rroe4rtk/image/upload/v1787216370/outline-architecture.png)

## 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](https://res.cloudinary.com/rroe4rtk/image/upload/v1787216373/outline-runbook-document.png)

![Outline collection listing the workspace's five documents](https://res.cloudinary.com/rroe4rtk/image/upload/v1787216374/outline-collection-documents.png)

![Mailpit inbox showing Outline's workspace invitation email](https://res.cloudinary.com/rroe4rtk/image/upload/v1787216375/outline-invite-email.png)

## 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

| Variable | Purpose |
|---|---|
| `SECRET_KEY_SEED` | Seeds the at-rest encryption key; keep it stable |
| `URL` | Public URL of the Outline service |
| `SERVICES` | Which Outline processes this container runs |
| `WEB_CONCURRENCY` | Node processes per container |
| `FILE_STORAGE` | `s3` sends attachments to the bucket |
| `AWS_S3_FORCE_PATH_STYLE` | Must stay `true` for browser uploads |
| `ADMIN_EMAIL` / `ADMIN_PASSWORD` | The first Outline account, set on `dex` |
| `SMTP_HOST` / `SMTP_PORT` | Mail server used for invitations |

### Deployment Dependencies

- Source: [github.com/outline/outline](https://github.com/outline/outline)
- Self-hosting docs: [docs.getoutline.com](https://docs.getoutline.com/s/hosting)
- Identity provider: [github.com/dexidp/dex](https://github.com/dexidp/dex)
- Runtime: Node.js 26, Postgres 14+, Redis 6+

## Hardware Requirements for Self-Hosting Outline

| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU | 2 vCPU across web and worker |
| RAM | 1 GB | 2–4 GB with two web processes |
| Storage | 1 GB Postgres | 10 GB Postgres plus object storage |
| Runtime | Node.js 26, Postgres, Redis | Same, 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=&lt;64 hex characters from the command above&gt; \
  -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.

## Similar templates

- [Libredesk - Complete Setup](https://railway.com/deploy/libredesk-complete-setup) — Complete self-hosted omnichannel customer support desk.
- [Paperless-ngx](https://railway.com/deploy/paperless-ngx-3) — Paperless-ngx — document management with OCR and full-text search
- [Instatic CMS - Postgres](https://railway.com/deploy/instatic-cms-postgres) — Design, build and manage powerful static sites from state-of-the-art CMS

Open this page in a browser: https://railway.com/deploy/outline-knowledge-base
