# HedgeDoc

Collaborative Markdown editor where several people edit one note together.

- Replaces: [Google Docs](https://openlogs.fyi/alternatives/google-docs)
- Summary: Paid collaborative document editing services, such as Google Docs.
- Stack: TypeScript (language), PostgreSQL (database)
- Deployment: docker_compose
- License: AGPL-3.0 (osi) [source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/LICENSE)
- Business model: unknown. The README at the pinned commit does not state a business model, so it stays unknown. ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/README.md), read 2026-10-22)
- Difficulty: hard. 4 services (1 database or broker: postgres), 5 volume mounts, 5 env values to set, no elevated host access. Heuristic score 7 of 11: hard. A source checkout is needed, so the rating is at least medium.
- Requirements: not stated
- Repository: [hedgedoc/hedgedoc](https://github.com/hedgedoc/hedgedoc)

## Install

1. Docker with the Compose plugin and git ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/tutorials/setup.md))

   ```text
   A host with Docker, the Docker Compose plugin and git. This entry needs a checkout of the project repository.
   ```

2. Get the source at commit f98ea9c ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/tutorials/setup.md))

   ```bash
   git init hedgedoc
   cd hedgedoc
   git remote add origin https://github.com/hedgedoc/hedgedoc.git
   git sparse-checkout init --cone
   git sparse-checkout set docs/content/files/setup-docker
   git fetch --depth 1 --filter=blob:none origin f98ea9c4079dea39a54ed6d20e9521a3039dbff7
   git checkout FETCH_HEAD
   ```

3. Go to the folder the docs use ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/tutorials/setup.md))

   ```bash
   cd docs/content/files/setup-docker
   ```

4. The compose file in the checkout: docs/content/files/setup-docker/docker-compose.yml (shown here for reading) ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/files/setup-docker/docker-compose.yml))

   ```yaml
   services:
     backend:
       image: ghcr.io/hedgedoc/hedgedoc/backend:2.0.0-alpha.3
       volumes:
         - $PWD/.env:/usr/src/app/backend/.env
         - hedgedoc_uploads:/usr/src/app/backend/uploads
   
     frontend:
       image: ghcr.io/hedgedoc/hedgedoc/frontend:2.0.0-alpha.3
       environment:
         HD_BASE_URL: "${HD_BASE_URL}"
         HD_INTERNAL_API_URL: http://backend:3000
         HOSTNAME: "0.0.0.0"
   
     db:
       image: postgres:16
       environment:
         POSTGRES_USER: "${HD_DATABASE_USERNAME}"
         POSTGRES_PASSWORD: "${HD_DATABASE_PASSWORD}"
         POSTGRES_DB: "${HD_DATABASE_NAME}"
       volumes:
         - hedgedoc_postgres:/var/lib/postgresql/data
   
     proxy:
       image: caddy:latest
       restart: unless-stopped
       environment:
         HD_BASE_URL: "${HD_BASE_URL}"
       ports:
         - "80:80"
         - "443:443"
         - "443:443/udp"
       volumes:
         - $PWD/Caddyfile:/etc/caddy/Caddyfile
         - caddy_data:/data
   
   volumes:
     caddy_data:
     hedgedoc_uploads:
     hedgedoc_postgres:
   ```

5. Copy config.env to .env ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/tutorials/setup.md))

   ```bash
   cp config.env .env
   ```

6. What the compose file check ran with ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/tutorials/setup.md))

   ```text
   The compose file check ran in a checkout of hedgedoc/hedgedoc at f98ea9c4079dea39a54ed6d20e9521a3039dbff7 (a sparse checkout: the top-level files and the folder docs/content/files/setup-docker), in the folder docs/content/files/setup-docker, after config.env was copied to .env. The setup tutorial tells the reader to download config.env as .env, the Caddyfile and docker-compose.yml from the docs site, edit .env and run docker compose up -d. The same files are in docs/content/files/setup-docker of the repository.
   ```

7. Start it ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/tutorials/setup.md))

   ```bash
   docker compose up -d
   ```

8. Open the app ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/tutorials/setup.md))

   ```text
   Open https://hedgedoc.localhost. The docs name this address. The compose file publishes host port 443 for the proxy service. The docs say this address is enough for a local test; the base URL is set in .env.
   ```

Compose file check: config_ok on 2026-10-22.

## Gotchas and maintenance

### Gotchas

- Some images use the latest tag or no tag: Images without a pinned version: proxy: caddy:latest. A later pull can get a different version. ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/files/setup-docker/docker-compose.yml), checked 2026-10-22)
- The compose file publishes host ports: Host ports: 80 (proxy), 443 (proxy), 443/udp (proxy). A port without a host address listens on all host network interfaces. ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/files/setup-docker/docker-compose.yml), checked 2026-10-22)
- The compose file mounts host folders: Host paths mounted into containers: $PWD/.env at /usr/src/app/backend/.env (backend), $PWD/Caddyfile at /etc/caddy/Caddyfile (proxy). ([source](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/files/setup-docker/docker-compose.yml), checked 2026-10-22)

### Signals

Computed from a GitHub snapshot taken 2026-10-22.

- Open issues and pull requests: 275
- Stars: 7490, forks: 609
- Last push: 2026-10-22 (0 days ago)
- Latest release: 1.12.0 on 2026-08-21 (62 days ago)

## Sources

- [Repository: https://github.com/hedgedoc/hedgedoc](https://github.com/hedgedoc/hedgedoc)
- [License: https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/LICENSE](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/LICENSE)
- [Business model: https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/README.md](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/README.md)
- [Compose file: https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/files/setup-docker/docker-compose.yml](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/files/setup-docker/docker-compose.yml)
- [Install step: https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/tutorials/setup.md](https://github.com/hedgedoc/hedgedoc/blob/f98ea9c4079dea39a54ed6d20e9521a3039dbff7/docs/content/tutorials/setup.md)

---
Canonical: https://openlogs.fyi/tools/hedgedoc  
Last updated: 2026-10-22
