---
title: "Deploy hedgedoc"
description: "HedgeDoc 1.12: real-time collaborative Markdown notes, with Postgres."
category: "CMS"
url: https://railway.com/deploy/hedgedoc-1
---

# Deploy hedgedoc

HedgeDoc 1.12: real-time collaborative Markdown notes, with Postgres.

**[Deploy hedgedoc on Railway](https://railway.com/template/hedgedoc-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/hedgedoc-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** CMS

## Template content

### hedgedoc https://raw.githubusercontent.com/hedgedoc/hedgedoc/1.12.0/public/icons/apple-touch-icon.png

- **Image:** quay.io/hedgedoc/hedgedoc:1.12.0
- **Start command:** `sh -c 'printf "%s\n" "$HEDGEDOC_SEED" > /tmp/seed.sh; /usr/local/bin/docker-entrypoint.sh node app.js & pid=$!; trap "kill -TERM $pid; wait $pid; exit 0" TERM INT; sh /tmp/seed.sh & wait $pid'`
- **Health check:** /_health
- **Public domain:** Yes

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

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

## Documentation

# Deploy and Host HedgeDoc on Railway

HedgeDoc is a collaborative Markdown editor that runs in the browser. Several people can edit the same note at once and see changes live, with a side-by-side preview that supports diagrams, math, code highlighting and slide mode. Notes can be shared by link, published read-only or kept private.

## About Hosting HedgeDoc

This template runs the official `quay.io/hedgedoc/hedgedoc:1.12.0` image with a Railway PostgreSQL database. On first boot a seed step creates your account from the variables once the database is ready. Email sign-up and anonymous notes are turned off, so only accounts you create can write notes. Notes live in Postgres and uploaded images on a Railway volume, so both survive redeploys. The session secret is generated and stable, which keeps people signed in across restarts. HedgeDoc is light on resources and fits the Hobby plan. Add teammates with `bin/manage_users` from a Railway shell.

## Common Use Cases

- Live meeting notes that the whole team edits together
- Drafting documentation or blog posts in Markdown before publishing
- Presenting slides written in Markdown from the browser

## Dependencies for HedgeDoc Hosting

- `quay.io/hedgedoc/hedgedoc:1.12.0` (official image)
- Railway PostgreSQL
- A Railway volume at `/hedgedoc/public/uploads`

### Deployment Dependencies

- [HedgeDoc website](https://hedgedoc.org)
- [HedgeDoc 1.x configuration](https://docs.hedgedoc.org/configuration/)
- [HedgeDoc on GitHub](https://github.com/hedgedoc/hedgedoc)

### Implementation Details

| Service | Source | Networking | Storage |
| --- | --- | --- | --- |
| hedgedoc | `quay.io/hedgedoc/hedgedoc:1.12.0` | public domain on 3000 | volume at `/hedgedoc/public/uploads` |
| Postgres | Railway PostgreSQL | private | Railway volume |

| Variable | Default | Purpose |
| --- | --- | --- |
| `HEDGEDOC_ADMIN_EMAIL` | `admin@example.com` | First account, created on first boot |
| `HEDGEDOC_ADMIN_PASSWORD` | generated | Its password |
| `CMD_ALLOW_EMAIL_REGISTER` | `false` | Closes self sign-up |
| `CMD_ALLOW_ANONYMOUS` | `false` | Requires login to create notes |
| `CMD_SESSION_SECRET` | generated | Signs session cookies |
| `CMD_DOMAIN` | `${{RAILWAY_PUBLIC_DOMAIN}}` | Public hostname |

Notes:

- Add users from the Railway shell: `node bin/manage_users --add user@example.com --pass `.
- To allow self sign-up instead, set `CMD_ALLOW_EMAIL_REGISTER=true`.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by the HedgeDoc project.

## Why Deploy HedgeDoc 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 HedgeDoc 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.


## 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/hedgedoc-1
