---
title: "Deploy Medplum"
description: "Deploy Medplum on Railway. Healthcare backend with FHIR support. One click."
category: "Starters"
url: https://railway.com/deploy/medplum
---

# Deploy Medplum

Deploy Medplum on Railway. Healthcare backend with FHIR support. One click.

**[Deploy Medplum on Railway](https://railway.com/template/medplum)**

- **Creator:** RBR Digital
- **Category:** Starters
- **Total deploys:** 9

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

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

### Medplum Server https://www.medplum.com/favicon.ico

- **Image:** medplum/medplum-server:latest
- **Start command:** `node --require ./packages/server/dist/otel/instrumentation.js packages/server/dist/index.js env`
- **Public domain:** Yes

### Medplum App https://www.medplum.com/favicon.ico

- **Image:** medplum/medplum-app:latest
- **Public domain:** Yes

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **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"`

## Documentation

# Deploy and Host Medplum on Railway

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/deploy/ympAeH?referralCode=9uHSFr&amp;utm_medium=integration&amp;utm_source=template&amp;utm_campaign=generic)

Medplum is an open-source healthcare platform built around HL7 FHIR. It provides APIs, authentication, storage, and a ready-to-use web app for building modern healthcare applications such as EHRs, patient portals, and clinical workflows.

## About Hosting Medplum

Hosting Medplum requires a PostgreSQL database for persistence, Redis for caching and job queues, and optional file storage for binary data. The platform consists of two main services:

- **Medplum Server** → FHIR API, authentication, and backend logic  
- **Medplum App** → Frontend web application served via Nginx  

Railway provisions all required services, handles networking, SSL, and environment configuration.

---

## Common Use Cases

- Electronic Health Records (EHR)
- Patient portals and scheduling systems
- Clinical workflows and automation
- Healthcare integrations using FHIR
- Internal tools for clinics and providers

---

## Dependencies for Medplum Hosting

- PostgreSQL (main database)
- Redis (cache, queues, sessions)
- Optional persistent storage (binary/file storage)

---

### Deployment Dependencies

- [Medplum](chatgpt://generic-entity?number=1) GitHub  
- [HL7](chatgpt://generic-entity?number=2) FHIR Standard  
- [Railway](chatgpt://generic-entity?number=3) Documentation  

---

## Implementation Details

### Environment variables (Medplum Server)

Use Railway reference syntax:

| Variable | Value |
|----------|-------|
| `MEDPLUM_BASE_URL` | `https://${{RAILWAY_PUBLIC_DOMAIN}}` |
| `MEDPLUM_APP_BASE_URL` | `https://${{"Medplum App".RAILWAY_PUBLIC_DOMAIN}}` |
| `MEDPLUM_PORT` | `${{"Medplum Server".PORT}}` |
| `PORT` | `8103` |
| `MEDPLUM_DATABASE_HOST` | `${{Postgres.PGHOST}}` |
| `MEDPLUM_DATABASE_PORT` | `${{Postgres.PGPORT}}` |
| `MEDPLUM_DATABASE_USERNAME` | `${{Postgres.PGUSER}}` |
| `MEDPLUM_DATABASE_PASSWORD` | `${{Postgres.PGPASSWORD}}` |
| `MEDPLUM_DATABASE_DBNAME` | `${{Postgres.PGDATABASE}}` |
| `MEDPLUM_REDIS_HOST` | `${{Redis.REDISHOST}}` |
| `MEDPLUM_REDIS_PORT` | `${{Redis.REDISPORT}}` |
| `MEDPLUM_REDIS_PASSWORD` | `${{Redis.REDISPASSWORD}}` |
| `MEDPLUM_STORAGE_BASE_URL` | `https://${{RAILWAY_PUBLIC_DOMAIN}}/storage/` |
| `MEDPLUM_BINARY_STORAGE` | `file:./binary/` |

---

### Environment variables (Medplum App)

| Variable | Value |
|----------|-------|
| `MEDPLUM_BASE_URL` | `https://${{RAILWAY_PUBLIC_DOMAIN}}` |
| `MEDPLUM_CLIENT_ID` | `` |

---

## Architecture Overview

- **Medplum Server**
  - Handles FHIR resources
  - Authentication (OAuth, email, etc.)
  - Business logic and bots

- **Medplum App**
  - Static frontend served via Nginx
  - Connects to Medplum Server via `MEDPLUM_BASE_URL`

---

## Why Deploy Medplum on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway manages your services, networking, and scaling so you can focus on building healthcare applications.

By deploying Medplum on Railway, you can quickly launch a fully functional FHIR backend and web app, ready for production use with minimal setup.

---

## Template Author

Created and maintained by **Douglas Rubim**.

GitHub: https://github.com/douglasrubims

## Similar templates

- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [caring-vibrancy](https://railway.com/deploy/caring-vibrancy) — Deploy and Host caring-vibrancy with Railway
- [Appsmith](https://railway.com/deploy/appsmith-1) — Low-code platform for internal tools, dashboards, and admin panels.

Open this page in a browser: https://railway.com/deploy/medplum
