Skip to content

Instantly share code, notes, and snippets.

@irbis22
Created February 10, 2026 10:33
Show Gist options
  • Select an option

  • Save irbis22/e5109f35ac370ab177b62d8c60409c44 to your computer and use it in GitHub Desktop.

Select an option

Save irbis22/e5109f35ac370ab177b62d8c60409c44 to your computer and use it in GitHub Desktop.
HedgeDoc: Self-Hosted Real-Time Collaboration Without Compromise

HedgeDoc: Self-Hosted Real-Time Collaboration Without Compromise

HedgeDoc (formerly CodiMD) has emerged as the go-to solution for teams demanding both collaborative power and data sovereignty. This open-source, web-based markdown editor delivers Google Docs-like real-time co-authoring while letting organizations retain complete control over their infrastructure and content. Born from the CodiMD project and rebranded in 2020, HedgeDoc solves a critical modern dilemma: how to collaborate effectively without surrendering sensitive information to third-party SaaS platforms.

Architecture and Core Philosophy

Unlike cloud-based alternatives, HedgeDoc operates on a straightforward principle: your data stays where you put it. The application runs as a Node.js service with PostgreSQL (or SQLite for lightweight setups) handling document storage. Authentication integrates seamlessly with LDAP, OAuth2 providers, or traditional username/password systems. This architecture makes HedgeDoc particularly attractive to government agencies, healthcare organizations, and financial institutions bound by strict data residency requirements.

The editor itself renders markdown instantly using an in-browser parser, eliminating the disconnect between writing and previewing found in traditional two-pane editors. What you type appears formatted immediately—code blocks highlight as you write, LaTeX equations render on keystroke, and tables adjust dynamically.

Feature Deep Dive

Real-Time Synchronization

HedgeDoc uses operational transformation to resolve edit conflicts when multiple users modify the same document simultaneously. Each participant sees others' cursors and selections in distinct colors, with avatars indicating active collaborators. The revision history tracks every change with timestamps and author attribution, allowing point-in-time restoration without cluttering the interface.

Extended Markdown Capabilities

Beyond CommonMark compliance, HedgeDoc supports specialized syntax extensions including code blocks with syntax highlighting for 100+ languages, LaTeX math rendering ($$E=mc^2$$), Mermaid diagrams, task lists, emoji, and embedded media. Tables render cleanly without manual alignment, and slide mode transforms any document into a presentation by separating sections with triple dashes.

Access Control Granularity

Document permissions operate on four tiers: public (viewable by anyone with link), unlisted (not indexed but accessible via direct URL), restricted (requires authentication), and private (owner-only with explicit sharing). Administrators can enforce organization-wide defaults while allowing per-document overrides—a balance many enterprise tools fail to achieve.

Practical Deployment Scenarios

Small teams under ten users can run HedgeDoc with a single Docker container using SQLite backend. Enterprise deployments typically employ PostgreSQL clusters with replication, Redis for session management, reverse proxies handling TLS termination, and S3-compatible object storage for uploaded assets. Kubernetes environments benefit from community-maintained Helm charts enabling autoscaling during peak collaboration periods.

Why Organizations Choose HedgeDoc

Three drivers accelerate adoption: compliance necessity (GDPR, HIPAA audits increasingly question where collaborative content resides), cost predictability (no per-user SaaS fees—only infrastructure costs already provisioned), and workflow integration (documents export to standard markdown enabling Git version control and publishing pipelines). Unlike walled-garden platforms, HedgeDoc treats your knowledge as protected intellectual capital rather than disposable content.

Limitations and Considerations

HedgeDoc isn't universally optimal. Organizations requiring complex permission hierarchies beyond document-level sharing, built-in approval workflows, or native mobile apps might find gaps. Users must learn markdown syntax—though live preview significantly lowers this barrier. Offline editing remains unsupported; connectivity is required for real-time synchronization.

Getting Started

Begin evaluation with the official Docker image. For production deployments, review comprehensive documentation at https://docs.hedgedoc.org covering backup strategies, authentication setup, and performance tuning. The active community provides support through GitHub Discussions and community forums, with transparent roadmaps shaped directly by user input—a stark contrast to proprietary tools where feature decisions happen behind closed doors.

Public Community Instances

Numerous organizations host public HedgeDoc instances for community use:

These instances demonstrate HedgeDoc's adoption across universities, hackspaces, activist communities, and technical organizations valuing open collaboration with data ownership.


Official project website: https://hedgedoc.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment