selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

CodiMD logo

Self-host CodiMD

2.6.1

Realtime collaborative markdown notes editor

ReleaseOpen SourceAGPL-3.0
Docker ComposeCompose file & guide
docker-compose up -d
Updatedlast year
LanguageJavaScript
Setup difficultyModerate
Stars
10 164
Port
3000 (CodiMD web editor and API)
Docker
nabo.codimd.dev/hackmdio/hackmd
The CodiMD collaborative markdown note editor interface

What is CodiMD?

CodiMD is the community edition of HackMD: the HackMD team publishes it under AGPL so anyone can run the collaborative markdown editor on their own hardware. Several people edit the same note live in the browser, and notes carry permission presets (freely, editable, locked, private and others) with a configurable default. Administrators can open the instance to anonymous readers or writers, allow new notes to appear simply by visiting an unused URL, and switch PDF export on or off. Picture uploads stay on the local disk or move to Imgur, Amazon S3, MinIO, or Azure Blob Storage, PlantUML graphics can be rendered by a server you choose, and profile pictures can come from Gravatar. Users log in with local email accounts, SAML, LDAP/Active Directory, generic OAuth2, or provider-specific OAuth for GitHub, GitLab, Google, Mattermost, Dropbox and friends. Deploy it with docker-compose next to PostgreSQL or MySQL (the container listens on 3000), or install from source with Node.js and npm; Kubernetes, Heroku and Scalingo recipes are also written up, while TLS is normally left to nginx, Apache or HAProxy. Nearly every knob is a CMD_* environment variable, with config.json kept for development. CodiMD is the reduced-feature sibling of commercial HackMD — book mode is not included — and building the web bundle wants about 2GB of RAM.

Should you self-host CodiMD?

CodiMD scores 68/100 on selfhost.directory (how scoring works) and ranks #12 of 83 in Notes & Editors. It has 10 164 GitHub stars, +9 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in JavaScript.

Its closest alternative on selfhost.directory is Memos (85/100, 64 518 stars). It scores higher overall, so compare the two before you pick. See CodiMD vs Memos side by side.

Features

  • Anonymous access control
  • Book mode presentationCodiMD ships fewer features than HackMD; book mode is absent.
  • Custom note URLs
  • Markdown Notes
  • PDF Export
  • Per-note permission levels
  • PlantUML diagrams
  • Pluggable image storage
  • Real-time collaborative editing

CodiMD README

CodiMD

build status version Gitter Matrix POEditor

CodiMD lets you collaborate in real-time with markdown. Built on HackMD source code, CodiMD lets you host and control your team's content with speed and ease.

screenshot

How to install CodiMD

Install CodiMD with Docker Compose

Environment variables
CMD_DB_URL, CMD_USECDN

The easiest way to spin up CodiMD with docker is using docker-compose, see below docker-compose for example config.

version: "3"
services:
database:
image: postgres:11.6-alpine
environment:
- POSTGRES_USER=codimd
- POSTGRES_PASSWORD=change_password
- POSTGRES_DB=codimd
volumes:
- "database-data:/var/lib/postgresql/data"
restart: always
codimd:
image: nabo.codimd.dev/hackmdio/hackmd:2.6.0
environment:
- CMD_DB_URL=postgres://codimd:change_password@database/codimd
- CMD_USECDN=false
depends_on:
- database
ports:
- "3000:3000"
volumes:
- upload-data:/home/hackmd/app/public/uploads
restart: always
volumes:
database-data: {}
upload-data: {}
  1. Copy the config above and save as docker-compose.yml
  2. Modify your database username and password
  3. Run docker-compose up -d
  4. Visit http://localhost:3000 in your browser

For local image uploads the volume must be writable by the container user: `chown -R 1500:1500 volume_dir`. Since 2.5.1 there is a single image, and from 2.4.2 it is multi-arch (amd64 and arm64).

How to configure CodiMD

  • CMD_DOMAINThe domain name your service will be hosted.

    values: *`string`*

  • CMD_URL_PATHThe path in a URL your service will be hosted. (e.g., codimd.example.com/*`urlpath`*)

    values: *`string`*

  • CMD_URL_ADDPORTfalseSet to assign port for URL. (You don't need this for ports 80 or 443. This only works when `domain` is set)

    values: *`boolean`*

  • CMD_HOST0.0.0.0The host to which CodiMD will listen.

    values: *`string`*

  • CMD_PORT3000The port on which CodiMD will be accessed.

    values: *`string`*

CodiMD releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Notes & Editors

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…