[{"data":1,"prerenderedAt":191},["ShallowReactive",2],{"seo-verification":3,"blog-self-host-hedgedoc-on-vps-the-collaborative-markdown-editor-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"slugs":9,"title":12,"excerpt":13,"readTime":14,"views":15,"isPinned":16,"publishedAt":17,"category":18,"categories":24,"featuredImage":26,"bgImage":27,"posterImage":28,"relatedSolution":26,"intro":29,"sections":30,"ctaTitle":133,"ctaBody":134,"ctaButton":135,"ctaUrl":136,"relatedPosts":137},268,"self-host-hedgedoc-on-vps-the-collaborative-markdown-editor",{"fr":10,"en":8,"ar":11},"heberger-hedgedoc-vps","استضافة-hedgedoc-على-vps-محرر-markdown-التعاوني","Self-Host HedgeDoc on VPS: The Collaborative Markdown Editor","Deploy HedgeDoc 1.11.x on your VPS in 15 minutes with Docker and Nginx. Real-time collaborative Markdown editing, without Google Docs.",10,0,false,"2026-08-15T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},4,"Development","developpement","bg-warning\u002F10 text-warning","dev",[25],{"id":19,"name":20,"slug":21,"color":22,"icon":23},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fheberger-hedgedoc-vps-poster.svg","Google Docs works fine until your team prefers writing technical documentation in Markdown, integrating code blocks with syntax highlighting, or simply avoiding hosting meeting notes and specs at Google. HedgeDoc (formerly CodiMD) is a real-time collaborative Markdown editor, open-source (AGPL-3.0), deployable in under fifteen minutes on a VPS with Docker Compose. Each note has a shareable URL, editing is simultaneous with multiple cursors, and your data stays on your own infrastructure.",[31,35,44,63,66,70,73,124,127,130],{"type":32,"title":33,"body":34},"h2","Why HedgeDoc Instead of Notion or Google Docs?","HedgeDoc gives your technical team: **native Markdown** with real-time rendering, **collaborative editing** with multiple simultaneous cursors, **code blocks** with syntax highlighting for 200+ languages, **embedded diagrams** (Mermaid, PlantUML, Vega-lite, flowcharts), **math formulas** (LaTeX via MathJax), **one-click export** to PDF, Markdown, or HTML, and **hosting on your own VPS** — your data never leaves your infrastructure.",{"type":36,"title":37,"items":38},"ul","Prerequisites Before You Start",[39,40,41,42,43],"A VPS running Ubuntu 22.04 or Debian 12 with **at least 1 GB of RAM**.","**Docker Engine ≥ 24** and Docker Compose V2 installed.","A **domain name** pointing to your VPS (required for TLS — WebSockets require a secure connection).","Port **3000** available (HedgeDoc default port).","**Nginx** installed for the reverse proxy (with WebSocket support — essential).",{"type":45,"title":46,"steps":47},"steps","Installing HedgeDoc with Docker Compose",[48,51,54,57,60],{"title":49,"body":50},"Step 1 — Create the project structure","```bash\nmkdir -p \u002Fopt\u002Fhedgedoc && cd \u002Fopt\u002Fhedgedoc\n```\n\nCreate `docker-compose.yml` with PostgreSQL and HedgeDoc containers, using image `quay.io\u002Fhedgedoc\u002Fhedgedoc:1.11.1`. Bind app to `127.0.0.1:3000:3000`. Set `depends_on: database: condition: service_healthy`.",{"title":52,"body":53},"Step 2 — Create the environment file","```bash\ncat > \u002Fopt\u002Fhedgedoc\u002F.env \u003C\u003C 'EOF'\nPOSTGRES_PASSWORD=STRONG_PASSWORD_HERE\nCMD_DOMAIN=hedgedoc.yourdomain.com\nCMD_SESSION_SECRET=A_LONG_FIXED_RANDOM_STRING\nEOF\n```\n\n⚠️ `CMD_SESSION_SECRET` must be **fixed** and never changed after first launch. Generate it with `openssl rand -base64 32`.",{"title":55,"body":56},"Step 3 — Start the containers","```bash\ndocker compose up -d\ndocker compose ps\ndocker compose logs app\n```\n\nHedgeDoc will automatically migrate the PostgreSQL database on first startup. Once logs show `listening on port 3000`, the app is ready.",{"title":58,"body":59},"Step 4 — Configure Nginx with WebSocket support","⚠️ The Nginx configuration for HedgeDoc **must include a `\u002Fsocket.io\u002F` block** with WebSocket headers. Missing this block causes silent real-time collaboration failure.\n\n```nginx\nserver {\n    server_name hedgedoc.yourdomain.com;\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:3000;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n    }\n    location \u002Fsocket.io\u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:3000;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_set_header Host $host;\n    }\n}\n```\n\nThen run `certbot --nginx -d hedgedoc.yourdomain.com`.",{"title":61,"body":62},"Step 5 — Create the First Account","Go to `https:\u002F\u002Fnotes.yourdomain.com` and register your first account (email + password). This account becomes the admin.\n\nTo disable public registration after initial setup, add to `.env`:\n```\nCMD_ALLOW_REGISTRATION=false\nCMD_ALLOW_ANONYMOUS=false\n```\nThen recreate the container: `docker compose up -d hedgedoc`.",{"type":32,"title":64,"body":65},"Features to Discover","**Share a note:** each HedgeDoc note has a unique URL. Click the share button to get the URL and choose the access mode (read-only, comments, editing).\n\n**Insert a Mermaid diagram:**\n\n```mermaid\ngraph LR\n    A[Client] --> B[API]\n    B --> C[Database]\n```\n\n**Export the note:** in the menu (≡ icon), choose **Export** to download as Markdown, HTML, or PDF.\n\n**Presentation mode:** add `---` between sections to turn them into slides.",{"type":67,"title":68,"body":69},"tip","Missing Socket.io Block = Silently Broken Collaboration","Symptom: the interface looks normal, you can type in notes, but other users' changes don't appear in real time — no visible error message.\n\nCause: the `\u002Fsocket.io\u002F` route requires a **WebSocket connection**. Without the dedicated Nginx block that sends `Upgrade: websocket` and `Connection: upgrade` headers, Nginx treats the request as plain HTTP and the real-time connection fails silently.\n\nQuick check:\n```bash\ncurl -v -N -H \"Connection: Upgrade\" -H \"Upgrade: websocket\" \\\n  https:\u002F\u002Fhedgedoc.yourdomain.com\u002Fsocket.io\u002F?transport=websocket\n```\nYou should see `101 Switching Protocols`. A `200` or `400` means the `\u002Fsocket.io\u002F` block is missing.",{"type":67,"title":71,"body":72},"Proxy Trailing Slash = Blank Page or 404","In Nginx's `proxy_pass` directive, the trailing slash changes behavior:\n\n```nginx\n# CORRECT — no trailing slash\nproxy_pass http:\u002F\u002F127.0.0.1:3000;\n\n# INCORRECT — trailing slash rewrites the path\nproxy_pass http:\u002F\u002F127.0.0.1:3000\u002F;\n```\n\nWith a trailing slash, Nginx rewrites the path, breaking HedgeDoc's internal routing. Always omit the trailing slash.",{"type":74,"title":75,"headers":76,"rows":81},"comparison","HedgeDoc vs Notion vs Confluence",[77,78,79,80],"Criterion","HedgeDoc (self-hosted)","Notion","Confluence (Cloud)",[82,87,92,97,102,107,112,117,121],[83,84,85,86],"Price","Free (VPS cost)","Free up to 10 members, ~$10\u002Fmember\u002Fmo","~$5.75\u002Fuser\u002Fmo (min 10)",[88,89,90,91],"Format","Native Markdown","Proprietary blocks","Rich editor (WYSIWYG)",[93,94,95,96],"Native diagrams","Mermaid, PlantUML, Vega-lite","Limited (via integrations)","Via macros",[98,99,100,101],"Code blocks","200+ languages with highlighting","Yes (limited)","Yes (via plugin)",[103,104,105,106],"Data hosting","Your VPS","Notion servers (US)","Atlassian servers",[108,109,110,111],"Markdown export","Yes (native)","Partial","Not native",[113,114,115,116],"Presentation mode","Yes (built-in)","No","Via plugin",[118,119,120,120],"Real-time collaboration","Yes (WebSocket)","Yes",[122,123,120,116],"LaTeX formulas","Yes (MathJax)",{"type":32,"title":125,"body":126},"Backup and Updates","```bash\n# Backup PostgreSQL\ndocker compose exec -T database pg_dump -U hedgedoc hedgedoc | gzip > \u002Fopt\u002Fhedgedoc\u002Fbackups\u002Fhedgedoc-$(date +%Y%m%d).sql.gz\n\n# Update HedgeDoc\ncd \u002Fopt\u002Fhedgedoc\ndocker compose pull app\ndocker compose up -d app\n```\n\nDatabase migrations apply automatically on new version startup. Check logs to confirm successful migrations. Current image: `quay.io\u002Fhedgedoc\u002Fhedgedoc:1.11.1`.",{"type":32,"title":128,"body":129},"Manage Users and Permissions","HedgeDoc manages three access levels per note: **Freely** (anyone can edit without an account), **Editable** (logged-in users only can edit), **Limited** (owner edits, others comment), **Locked** (read-only for all except owner), **Private** (owner-only access).\n\n**Disable public registration:** set `CMD_ALLOW_REGISTRATION: 'false'` in `.env` and recreate the container. Create accounts via CLI: `docker compose exec app npm run manage_users -- --add user@email.com --password Password`.\n\n**Enable OAuth (GitHub, GitLab…):** configure `CMD_GITHUB_CLIENTID` \u002F `CMD_GITHUB_CLIENTSECRET` in `.env`.",{"type":32,"title":131,"body":132},"Troubleshoot Common Issues","**Interface loads but real-time collaboration doesn't work:** check the `\u002Fsocket.io\u002F` block in Nginx (see the dedicated tip above).\n\n**502 Bad Gateway after startup:** wait 60 seconds for containers to be ready. Check that `database` is `healthy` with `docker compose ps`. If not, inspect: `docker compose logs database`.\n\n**Uploaded images disappear after restart:** check that the `uploads` volume is correctly mounted (type `volume`, not `bind`) with `docker inspect hedgedoc-app-1 | grep Mounts`.\n\n**PDF export error:** if Chromium is not included in your Docker image version, disable PDF export with `CMD_ALLOW_PDF_EXPORT: 'false'`.","A VPS for Your Documentation Collaboration Stack","HedgeDoc runs comfortably on 1 GB of RAM. Our VPS plans start at a few euros per month and include daily snapshots to protect your team notes. Your tech specs, RFCs, and meeting notes stay on your own infrastructure.","See our agency plans","\u002Fsolutions\u002Fagences",[138,160,176],{"id":139,"slug":140,"slugs":141,"title":144,"excerpt":145,"readTime":146,"views":15,"isPinned":16,"publishedAt":147,"category":148,"categories":154,"featuredImage":26,"bgImage":27,"posterImage":156,"relatedSolution":157},148,"how-to-self-host-docmost-on-a-vps",{"fr":142,"en":140,"ar":143},"self-host-docmost-vps","كيفية-استضافة-docmost-ذاتيا-على-vps","How to Self-Host Docmost on a VPS","Deploy Docmost on your VPS for a self-hosted team wiki with real-time collaboration. Open-source Notion and Confluence alternative — Docker Compose in 15 minutes.",3,"2026-01-28T00:00:00+00:00",{"id":149,"name":150,"slug":151,"color":152,"icon":153},7,"Self-hosting","self-hosting","bg-indigo-500\u002F10 text-indigo-400","cloud",[155],{"id":149,"name":150,"slug":151,"color":152,"icon":153},"\u002Fblog\u002Fcovers\u002Fself-host-docmost-vps-poster.svg",{"categorySlug":158,"appSlug":159},"collaboration-productivity","docmost",{"id":161,"slug":162,"slugs":163,"title":166,"excerpt":167,"readTime":168,"views":15,"isPinned":16,"publishedAt":169,"category":170,"categories":171,"featuredImage":26,"bgImage":27,"posterImage":173,"relatedSolution":174},183,"self-host-memos-on-a-vps-lightweight-notes-and-team-journal",{"fr":164,"en":162,"ar":165},"self-host-memos-vps","استضافة-memos-على-vps-ملاحظات-شخصية-وسجل-للفريق","Self-Host Memos on a VPS: Lightweight Notes and Team Journal","Deploy Memos on your VPS: privacy-first open-source note-taking with Markdown, tags, full-text search and REST API. 20 MB image, under 128 MB RAM, SQLite.",5,"2026-07-18T00:00:00+00:00",{"id":149,"name":150,"slug":151,"color":152,"icon":153},[172],{"id":149,"name":150,"slug":151,"color":152,"icon":153},"\u002Fblog\u002Fcovers\u002Fself-host-memos-vps-poster.svg",{"categorySlug":158,"appSlug":175},"memos",{"id":177,"slug":178,"slugs":179,"title":182,"excerpt":183,"readTime":19,"views":15,"isPinned":16,"publishedAt":184,"category":185,"categories":186,"featuredImage":26,"bgImage":27,"posterImage":188,"relatedSolution":189},139,"docker-dev-stack-on-a-vps-an-environment-ready-for-coding",{"fr":180,"en":178,"ar":181},"stack-dev-docker-vps","حزمة-تطوير-docker-على-خادم-vps-بيئة-جاهزة-للبرمجة","Docker Dev Stack on a VPS: an environment ready for coding","Set up a Docker dev stack on a VPS: Compose, volumes, ports, backups and secure access to prototype fast.","2026-02-06T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[187],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fstack-dev-docker-vps-poster.svg",{"categorySlug":23,"appSlug":190},"docker-dev-stack",1787581012285]