Video coming soon…

📝 Setup HedgeDoc — Real-Time Collaborative Markdown Editor

Deploy a self-hosted collaborative markdown editor for teams with real-time co-editing, presentation mode, and easy sharing.

⚠️ This script is provided for demo and testing purposes only. Not intended for production use.

📦 Resources & Setup Scripts

Grab the automated bash script from GitHub to follow along with the video.

Automated install — HedgeDoc collaborative notes running in one command.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/tools/hedgedoc/hedgedoc-ubuntu.sh
chmod +x hedgedoc-ubuntu.sh
sudo bash hedgedoc-ubuntu.sh

Tutorial Steps

1 Download & Run the Installer

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

2 Access the Web UI

Open your browser and navigate to HedgeDoc:

http://<your-server-ip>:3000

3 Create a Note

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.

4 Explore Features

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.

Ports Used

PortPurpose
3000HedgeDoc Web UI
5432PostgreSQL (internal)

Overview

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.

Why Use It

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.

When You Need It

    Who Should Use It

      Real Use Cases

        Main Features

          How to Use After Installation

            Security Best Practices

              Ports and Firewall Notes

              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.

              Backup and Maintenance

                Common Mistakes

                  Troubleshooting

                    Alternatives

                    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.

                    When Not to Use It

                    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 Professional Help

                    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.

                      Contact Us

                      Frequently Asked Questions

                      Can multiple users edit the same document simultaneously?

                      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.

                      Does HedgeDoc support diagrams?

                      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.

                      Can I restrict who can create or view notes?

                      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.

                      What authentication methods does HedgeDoc support?

                      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.

                      Can I export notes from HedgeDoc?

                      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.

                      Is HedgeDoc the same as CodiMD?

                      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.

                      How do I view note history?

                      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.

                      Can HedgeDoc be used on an air-gapped network?

                      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.