Skip to main content

HedgeDoc Hosting on Hostim.dev

HedgeDoc is an open-source, self-hosted Markdown editor for real-time collaboration. Several people edit the same note at once in the browser and see the rendered result next to the text. Notes support diagrams, math, slide mode and per-note permissions, and you can publish a note as a read-only page.

HedgeDoc started as a fork of CodiMD (HackMD). It is one Node.js app next to a database.

Self-host HedgeDoc with Docker Compose (minimal)​

HedgeDoc runs on PostgreSQL, MySQL/MariaDB or SQLite. This example uses PostgreSQL.

services:
hedgedoc:
image: quay.io/hedgedoc/hedgedoc:1.12.0
restart: unless-stopped
environment:
CMD_DB_URL: postgres://hedgedoc:change-me@db:5432/hedgedoc
CMD_DOMAIN: notes.example.com
CMD_PROTOCOL_USESSL: "true"
CMD_SESSION_SECRET: change-me-to-a-long-random-string
volumes:
- ./uploads:/hedgedoc/public/uploads
ports:
- "127.0.0.1:3000:3000"
depends_on:
- db
db:
image: postgres:17
restart: unless-stopped
environment:
POSTGRES_USER: hedgedoc
POSTGRES_PASSWORD: change-me
POSTGRES_DB: hedgedoc
volumes:
- ./db:/var/lib/postgresql/data

HedgeDoc creates its tables on the first start. CMD_DOMAIN is the domain without https://. HedgeDoc builds all its links from it, so the app breaks when you open it under another name. This setup needs a reverse proxy with a certificate in front of port 3000, and the proxy should pass WebSocket connections through. Without them the editor falls back to slower HTTP polling. With the defaults, anyone who can open the page can sign up and write notes without an account; see the variables below to close that. More stacks are in our Docker Compose library.


Deploy HedgeDoc on Hostim.dev (One-Click)

The hosted route: no VPS, no proxy, no certificates. The template runs the official image with a managed PostgreSQL database, a persistent volume, a domain and HTTPS.

Try it Yourself

Guest project runs for 1 hour. Log in to save and extend to 5 days.

Why Host HedgeDoc on Hostim.dev?​

  • One-click Docker deployment
  • Managed PostgreSQL database
  • First account created on deploy, sign-ups and anonymous notes closed
  • Persistent volume for uploaded images
  • Automatic HTTPS and domain, WebSockets work out of the box

What's included​

ResourceDetails
Appquay.io/hedgedoc/hedgedoc:1.12.0 Docker image
Volume/hedgedoc/public/uploads (uploaded images)
DatabaseManaged PostgreSQL
DomainFree *.hostim.dev subdomain
SSLLet’s Encrypt (auto-enabled)
Port3000

The template sets these variables for you:

VariableValue
HEDGEDOC_ADMIN_EMAILadmin@example.com. The email you log in with
HEDGEDOC_ADMIN_PASSWORDRandom 20-character string, generated on deploy. The password of that account
CMD_DOMAINYour app domain
CMD_PROTOCOL_USESSLtrue, so links use https://
CMD_SESSION_SECRETRandom 32-character string, generated on deploy
CMD_DB_DIALECTpostgres
CMD_DB_HOST, _PORT, _DATABASE, _USERNAME, _PASSWORDAddress and credentials of the managed PostgreSQL
CMD_ALLOW_EMAIL_REGISTERfalse, so nobody can sign up on their own
CMD_ALLOW_ANONYMOUSfalse, so visitors without an account cannot create notes
CMD_IMAGE_UPLOAD_TYPEfilesystem, uploads go to the volume

HedgeDoc has no admin account and no user management page. Accounts are created with its bin/manage_users command. The template replaces the start command: it runs the database migrations, creates the account from HEDGEDOC_ADMIN_EMAIL and HEDGEDOC_ADMIN_PASSWORD if it does not exist yet, and then starts the image as usual.

How to Deploy​

  1. Go to your Hostim.dev dashboard.
  2. Click Create Project → Use a Template.
  3. Select HedgeDoc.
  4. Optional: change HEDGEDOC_ADMIN_EMAIL to your own email.
  5. Choose a resource plan.
  6. Deploy.
  7. Copy the value of HEDGEDOC_ADMIN_PASSWORD from the app's environment variables.
  8. Open the app URL, click Sign In and log in with that email and password.

The account is created on the first start. Changing HEDGEDOC_ADMIN_PASSWORD later does not change its password. Changing HEDGEDOC_ADMIN_EMAIL later creates a second account on the next start, and the old one stays. HedgeDoc does not let you change an email password in the web interface, so use bin/manage_users --reset (see below).


FAQ​

Where does HedgeDoc store its data?

Notes, revisions, users and sessions are in the managed PostgreSQL database. Uploaded images are files in /hedgedoc/public/uploads, on a persistent volume. We restarted the app three times in a row with a note and an uploaded image in place. The note, the image and the login session were all still there.

How do I add more users or reset a password?

Run bin/manage_users in the app container with the Hostim CLI:

hostim exec hedgedoc -- bin/manage_users --add alice@example.com --pass 'a-long-password'
hostim exec hedgedoc -- bin/manage_users --reset alice@example.com --pass 'a-new-password'

The first exec adds your SSH key to the project, and it can take a few minutes before the connection is accepted. To let people sign up on their own instead, set CMD_ALLOW_EMAIL_REGISTER=true and redeploy.

Can people read notes without an account?

Yes, if the note allows it. Each note has a permission setting. With CMD_ALLOW_ANONYMOUS=false, visitors without an account cannot create notes. They can read notes set to editable, locked or freely, and the published view of those notes. New notes get the permission in CMD_DEFAULT_PERMISSION (default editable: logged-in users edit, visitors only read). To let visitors edit, set CMD_ALLOW_ANONYMOUS_EDITS=true. This makes the freely permission available, and only notes set to it can be edited without an account.

How do I log in with GitHub, GitLab or another provider?

HedgeDoc supports GitHub, GitLab, Google, Mattermost, generic OAuth2 (use it for OpenID Connect), LDAP, SAML and others. Each provider has its own variables, for example CMD_GITHUB_CLIENTID and CMD_GITHUB_CLIENTSECRET. The callback URL is built from CMD_DOMAIN. See the configuration docs. To turn off the email login, set CMD_EMAIL=false.

How do I use my own domain?

Add the domain to the app in the Hostim.dev dashboard and point a DNS record at it. HTTPS is set up for it automatically. Then change CMD_DOMAIN to the new domain, without https://, and redeploy. Do this before you upload images: HedgeDoc writes the full image URL, including the domain, into the note, so images uploaded under the old domain keep pointing at it.

How do I back up HedgeDoc?

Back up the PostgreSQL database and the uploads volume. Together they hold your notes, users and images. You can also download single notes as Markdown or HTML from the note menu, and every user can export all their notes as a zip from the user menu.

How do I update HedgeDoc?

The template pins a version. HedgeDoc withdrew releases 1.12.1 and 1.12.2 because their database migrations failed, so check the release notes before you update. Back up the database, change the image tag and redeploy. The start command runs the database migrations. HedgeDoc 2 is a rewrite with a different setup and is not an in-place update.


Alternatives​

  • Docmost — collaborative wiki and documentation
  • Trilium Notes — hierarchical personal knowledge base (guide)
  • Memos — lightweight note-taking (guide)
  • Etherpad — real-time collaborative plain-text editor

Source + Docs​


Looking for something else? Browse all templates →


Try it now​

Deploy HedgeDoc Now – in less than 60 seconds