Deploy outline
An open source workspace for docs, wikis, whiteboards, and knowledge
redis
Just deployed
/data
outline
Just deployed
/var/lib/outline/data
Just deployed
/var/lib/postgresql/data
Deploy and Host Outline on Railway
Outline is a fast, collaborative knowledge base for teams. Built with React and Node.js, it offers real-time editing, Markdown support, full-text search, and a clean interface for building and sharing team documentation.
About Hosting Outline
Hosting Outline on Railway provisions the full stack with minimal configuration. This template includes a managed PostgreSQL database for documents, collections, and user data; a managed Redis instance for caching, sessions, and real-time collaboration; and a persistent volume for local file storage. Outline runs as a single container from the official outlinewiki/outline image, with DATABASE_URL, REDIS_URL, SECRET_KEY, UTILS_SECRET, and URL wired automatically. Database migrations run on startup, and a /_health healthcheck (with a 600-second timeout) waits for Postgres and Redis before marking the deployment live. Generate a Railway domain, set Google OAuth credentials for sign-in, and optionally configure SMTP for invitations and notifications.
Common Use Cases
- Team Knowledge Base — Centralize internal docs, onboarding guides, runbooks, and processes with real-time collaborative editing and full-text search.
- Project Documentation — Organize docs by collection, nest pages in a hierarchy, and keep project context and decisions in one place.
- Company Wiki — Run a living wiki with inline comments, subscriptions, and notifications when content is updated or you are mentioned.
Dependencies for Outline Hosting
- PostgreSQL Database — Included in this template, connected over Railway's private network
- Redis — Included in this template, connected over Railway's private network
- Persistent Volume — Included for local file uploads and attachments at
/var/lib/outline/data - Authentication Provider — At least one required (Google OAuth included by default; OIDC and Slack optional)
- SMTP Server — Optional but recommended for invitations, notifications, and magic-link sign-in (bring your own, e.g. Resend, Mailgun, Postmark)
Deployment Dependencies
- Outline Documentation
- Outline Environment Variable Reference
- Google OAuth Setup
- SMTP Configuration
- OpenID Connect (OIDC) Setup
- Slack Authentication
- Outline File Storage
Implementation Details
Private network: PostgreSQL and Redis communicate with Outline over Railway's private network. Neither database is exposed publicly by default.
Secret keys: SECRET_KEY and UTILS_SECRET are auto-generated on deploy. They must be unique 32-byte values and should not be changed after the first successful deployment.
Public URL: Set URL to https://${{RAILWAY_PUBLIC_DOMAIN}} (or your custom domain). Generate a Railway domain on the Outline service before first use.
File storage: This template uses local storage on a Railway volume (FILE_STORAGE=local). Uploads persist at /var/lib/outline/data. For S3-compatible storage instead, swap FILE_STORAGE and the related AWS_* variables per the Outline file storage docs.
Healthcheck: Use /_health (not /). Outline's FORCE_HTTPS setting redirects HTTP requests on /, which causes Railway healthchecks to fail.
Why Deploy Outline 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 Outline 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
redis
redis:8.2.1REDISPORT
Redis server hostname on the private network.
REDISUSER
Redis username for authentication.
outline
outlinewiki/outline:latestPORT
HTTP port for the Outline web server. Set automatically by Railway.
NODE_ENV
Node.js runtime environment. Use production for deployed instances.
SECRET_KEY
Secret key for encrypting sessions and cookies. Auto-generated; do not change after first deploy.
FORCE_HTTPS
Redirect HTTP requests to HTTPS. Should remain enabled in production.
FILE_STORAGE
File storage backend. Use local storage with the attached volume.
NODE_OPTIONS
Node.js runtime flags. Suppresses localStorage warnings on newer Node versions.
UTILS_SECRET
Secret used for utility operations and background tasks. Auto-generated; do not change after first deploy.
DEFAULT_LANGUAGE
Default language for the Outline user interface.
FILE_STORAGE_LOCAL_ROOT_DIR
Directory path for locally stored uploads and attachments.
PGDATA
Filesystem path where PostgreSQL stores its data files.
PGPORT
PostgreSQL server port.
POSTGRES_DB
Default database name created on initialization.
POSTGRES_USER
PostgreSQL superuser username.
SSL_CERT_DAYS
Number of days until the auto-generated SSL certificate expires.
RAILWAY_DEPLOYMENT_DRAINING_SECONDS
Seconds to wait before stopping the previous deployment during a rollout.