Deploy a self-hosted collaborative markdown editor for teams with real-time co-editing, presentation mode, and easy sharing.
Grab the automated bash script from GitHub to follow along with the video.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/tools/hedgedoc/hedgedoc-ubuntu.sh
chmod +x hedgedoc-ubuntu.sh
sudo bash hedgedoc-ubuntu.sh
The script installs Docker, pulls the HedgeDoc and PostgreSQL images, configures environment variables, and starts all containers. HedgeDoc will be available on port 3000 with PostgreSQL handling all note storage and user sessions.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/tools/hedgedoc/hedgedoc-ubuntu.sh
chmod +x hedgedoc-ubuntu.sh
sudo bash hedgedoc-ubuntu.sh
Open your browser and navigate to HedgeDoc:
http://<your-server-ip>:3000
Click "New Note" to open a blank markdown document. Start writing using standard Markdown syntax — headings, bold, lists, code blocks, tables, and diagrams are all supported. Share the note's URL with teammates so they can join and co-edit in real time. Each collaborator appears with a distinct cursor color.
Append /slide to any note URL to view it as a reveal.js presentation. Use /book to combine multiple notes into a wiki-style book. Publish notes publicly with a share link, or download them as Markdown, HTML, or PDF. Explore diagram support with Mermaid, math with KaTeX, and syntax highlighting for 100+ languages.
| Port | Purpose |
|---|---|
| 3000 | HedgeDoc Web UI |
| 5432 | PostgreSQL (internal) |
HedgeDoc (formerly CodiMD) is a self-hosted real-time collaborative Markdown editor. Multiple users can edit the same document simultaneously with changes appearing instantly. It renders Markdown, supports diagrams via Mermaid and PlantUML, and is ideal for team notes, documentation, and meeting minutes.
HedgeDoc gives teams a private, self-hosted alternative to HackMD or Google Docs for Markdown collaboration. All notes stay on your server, no third-party accounts are required, and it can be integrated into your internal network without internet exposure.
HedgeDoc listens on port 3000. In production, proxy it through Nginx or NPM on port 443 with SSL. If used only internally, firewall port 3000 from the public internet and allow only from your office or VPN IP ranges.
Alternatives include HackMD (hosted version), Etherpad (plain text real-time editing), Outline (richer wiki with better organization), and Notion (full-featured but cloud-only). Choose HedgeDoc for simple, fast Markdown collaboration on your own server.
Avoid HedgeDoc if you need a full knowledge management system with page hierarchy, tags, and search — consider Outline or BookStack instead. Also avoid if your team prefers rich text editing over Markdown syntax.
PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.
Yes — real-time collaboration is HedgeDoc's core feature. All connected users see changes instantly via WebSocket. Each user's cursor position is visible in a different color, and changes are merged in real time without conflicts.
Yes. HedgeDoc supports Mermaid, PlantUML, Graphviz, and Vega-Lite diagrams rendered directly in the Markdown preview. Write diagram code in a fenced code block with the appropriate language tag such as mermaid and the diagram renders live alongside the text.
Yes. HedgeDoc has configurable permission modes: Free allows anyone to create, Restricted requires login to create while guests can view, and Private requires login to view. Individual notes can also be set to public, protected, private, or limited to specific users.
HedgeDoc supports local username and password accounts, LDAP and Active Directory, SAML, GitHub OAuth, GitLab OAuth, Google OAuth, and more. Configure the desired method via environment variables in the docker-compose.yml file.
Yes. Any note can be exported as raw Markdown, rendered HTML, or PDF directly from the editor menu. The PDF export uses the browser print function. You can also access notes programmatically via the HedgeDoc API.
HedgeDoc is the community-maintained fork of CodiMD, which itself was an open-source version of HackMD. HedgeDoc is the actively developed project while CodiMD is largely unmaintained. They are functionally similar but HedgeDoc has more recent features and security fixes.
HedgeDoc automatically maintains note revision history. Users can view history from the note menu and restore previous versions. History is stored in the database, so regular database backups preserve your complete version history.
Yes — once deployed, HedgeDoc runs entirely on your server with no external dependencies for core functionality. Diagram rendering for PlantUML may require an external PlantUML server unless you self-host that component as well.