Deploy HedgeDoc
Real-time collaborative Markdown notes, slides and uploads
hedgedoc
Just deployed
/hedgedoc/public/uploads
postgres
Just deployed
/var/lib/postgresql/data
Deploy and Host

HedgeDoc is a real-time, collaborative Markdown editor — the self-hosted HackMD successor. Write notes together with live cursors, preview Markdown as you type, present any note as slides, and upload images. This template ships HedgeDoc 1.12.3 pinned by digest with a PostgreSQL companion, so the deploy form has one field: the session secret.
About Hosting
One click deploys HedgeDoc with a PostgreSQL 16 companion. The first boot wires the database, derives the public URL from the live domain, and lands on the HedgeDoc landing page — register the first account in the UI and start writing. Notes default to private; per-note permissions are changeable in the UI. Railway's injected PORT is honored on every boot, and the public URL is derived from the live domain.
What gets deployed:
- hedgedoc — HedgeDoc 1.12.3 (Node 24) with an uploads volume at
/hedgedoc/public/uploads - postgres — PostgreSQL 16 companion with a persistent volume at
/var/lib/postgresql/data - First account — register in the UI (local auth, no email verification); the first account is the instance admin
Why Deploy
- Real collaboration: multiple cursors on the same note, live preview, and slide mode for presenting.
- Zero-fuss start: no wizard — the database URL, public domain, and session secret are wired at boot.
- Always-on by design: notes, history, and uploads persist on Railway volumes.
Common Use Cases
- Run a shared team notebook with live collaborative editing.
- Replace a shared docs folder with Markdown notes anyone on the team can edit and link.
- Keep meeting minutes as collaborative notes with slide mode for presenting.
- Host a public Markdown pad with per-note permissions.
Dependencies for HedgeDoc Hosting
- The hedgedoc service with a volume at
/hedgedoc/public/uploadsand the postgres companion with a volume at/var/lib/postgresql/data, both created by the template. A custom domain is optional.
Deployment Dependencies
| Setting | Value |
|---|---|
| Runtime | HedgeDoc 1.12.3 (Node 24) + PostgreSQL 16 |
| Plan | Hobby; two services |
| Port | Railway's injected PORT, honored on every boot via CMD_PORT (default 8080) |
| Persistence | Two Railway volumes: /hedgedoc/public/uploads (app) and /var/lib/postgresql/data (Postgres) |
| Healthcheck | / (unauthenticated landing page, 200 when the app is up) |
| Variable | Value | Notes |
|---|---|---|
HD_SESSION_SECRET | (generated) | Deploy-form field; session secret for logins |
POSTGRES_HOST | (auto-wired) | ${{postgres.RAILWAY_PRIVATE_DOMAIN}} — private-network host of the companion |
POSTGRES_PASSWORD | (auto-wired) | ${{postgres.POSTGRES_PASSWORD}} — generated password of the companion |
CMD_DEFAULT_PERMISSION | private | Baked in the image; new notes are private by default (upstream default is editable) |
CMD_ALLOW_EMAIL_REGISTER | true | Baked in the image; local registration open, no email verification step |
CMD_IMAGE_UPLOAD_TYPE | filesystem | Baked in the image; uploads stored on the volume |
CMD_PORT | (injected by Railway) | Derived from PORT on every boot |
CMD_DOMAIN | (derived at boot) | Re-derived from RAILWAY_PUBLIC_DOMAIN on every boot |
Baked internals: CMD_DB_URL is composed at boot from POSTGRES_HOST + POSTGRES_PASSWORD (user hedgedoc, database hedgedoc, port 5432); uploads at /hedgedoc/public/uploads; CMD_SESSION_SECRET is set from HD_SESSION_SECRET.
Template Content
hedgedoc
INAPP-Mobile/hedgedocpostgres
INAPP-Mobile/hedgedoc