2023-04-05 16:40:01 +00:00
<!doctype html> < html lang = en class = no-js > < head > < meta charset = utf-8 > < meta name = viewport content = "width=device-width,initial-scale=1" > < meta name = description content = "Welcome to the home of the LinuxServer.io documentation!" > < meta name = author content = LinuxServer.io > < link href = https://docs.linuxserver.io/images/docker-codimd/ rel = canonical > < link href = ../docker-codiad/ rel = prev > < link href = ../docker-cops/ rel = next > < link rel = icon href = "https://gblobscdn.gitbook.com/spaces%2F-LWuIse8qFJj2MqDi90T%2Favatar-1590244439115.png?alt=media" > < meta name = generator content = "mkdocs-1.4.2, mkdocs-material-9.1.5" > < title > codimd - LinuxServer.io< / title > < link rel = stylesheet href = ../../assets/stylesheets/main.7a7fce14.min.css > < link rel = stylesheet href = ../../assets/stylesheets/palette.a0c5b2b5.min.css > < link rel = preconnect href = https://fonts.gstatic.com crossorigin > < link rel = stylesheet href = "https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback" > < style > : root { --md-text-font : "Roboto" ; --md-code-font : "Roboto Mono" } < / style > < script > _ _md _scope = new URL ( "../.." , location ) , _ _md _hash = e => [ ... e ] . reduce ( ( e , _ ) => ( e << 5 ) - e + _ . charCodeAt ( 0 ) , 0 ) , _ _md _get = ( e , _ = localStorage , t = _ _md _scope ) => JSON . parse ( _ . getItem ( t . pathname + "." + e ) ) , _ _md _set = ( e , _ , t = localStorage , a = _ _md _scope ) => { try { t . setItem ( a . pathname + "." + e , JSON . stringify ( _ ) ) } catch ( e ) { } } < / script > < / head > < body dir = ltr data-md-color-scheme = default data-md-color-primary = purple data-md-color-accent = indigo > < script > var palette = _ _md _get ( "__palette" ) ; if ( palette && "object" == typeof palette . color ) for ( var key of Object . keys ( palette . color ) ) document . body . setAttribute ( "data-md-color-" + key , palette . color [ key ] ) < / script > < input class = md-toggle data-md-toggle = drawer type = checkbox id = __drawer autocomplete = off > < input class = md-toggle data-md-toggle = search type = checkbox id = __search autocomplete = off > < label class = md-overlay for = __drawer > < / label > < div data-md-component = skip > < a href = #deprecation-notice class = md-skip > Skip to content < / a > < / div > < div data-md-component = announce > < / div > < header class = "md-header md-header--shadow" data-md-component = header > < nav class = "md-header__inner md-grid" aria-label = Header > < a href = ../.. title = LinuxServer.io class = "md-header__button md-logo" aria-label = LinuxServer.io data-md-component = logo > < img src = "https://gblobscdn.gitbook.com/spaces%2F-LWuIse8qFJj2MqDi90T%2Favatar-1590244439115.png?alt=media" alt = logo > < / a > < label class = "md-header__button md-icon" for = __drawer > < svg xmlns = http://www.w3.org/2000/svg viewbox = "0 0 24 24" > < path d = "M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z" / > < / svg > < / label > < div class = md-header__title data-md-component = header-title > < div class = md-header__ellipsis > < div class = md-header__topic > < span class = md-ellipsis > LinuxServer.io < / span > < / div > < div class = md-header__topic data-md-component = header-topic > < span class = md-ellipsis > codimd < / span > < / div > < / div > < / div > < form class = md-header__option data-md-component = palette > < input class = md-option data-md-color-media = "(prefers-color-scheme: light)" data-md-color-scheme = default data-md-color-primary = purple data-md-color-accent = indigo aria-label = "Switch to dark mode" type = radio name = __palette id = __palette_1 > < label class = "md-header__button md-icon" title = "Switch to dark mode" for = __palette_2 hidden > < svg xmlns = http://www.w3.org/2000/svg viewbox = "0 0 24 24" > < path d = "M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zM7 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" / > < / svg > < / label > < input class = md-option data-md-color-media = "(prefers-color-scheme: dark)" data-md-color-scheme = slate data-md-color-primary = purple data-md-color-accent = indigo aria-label = "Switch to light mode" type = radio name = __palette id = __palette_2 > < label class = "md-header__button md-icon" title = "Switch to light mode" for = __palette_1 hidden > < svg xmlns = http://www.w3.org/2000/svg viewbox = "0 0 24 24" > < path d = "M17 7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h10a5 5 0 0 0 5-5 5 5 0 0 0-5-5m0 8a3 3 0 0 1-3-3 3 3 0 0 1 3-3 3 3 0 0 1 3 3 3 3 0 0 1-3
2023-01-08 13:57:31 +00:00
< span class = nt > services< / span > < span class = p > :< / span >
< span class = w > < / span > < span class = nt > mariadb< / span > < span class = p > :< / span >
< span class = w > < / span > < span class = nt > image< / span > < span class = p > :< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > linuxserver/mariadb:latest< / span >
< span class = w > < / span > < span class = nt > container_name< / span > < span class = p > :< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > codimd_mariadb< / span >
< span class = w > < / span > < span class = nt > restart< / span > < span class = p > :< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > always< / span >
< span class = w > < / span > < span class = nt > volumes< / span > < span class = p > :< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > < path to mariadb data> :/config< / span >
< span class = w > < / span > < span class = nt > environment< / span > < span class = p > :< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > MYSQL_ROOT_PASSWORD=< secret password> < / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > MYSQL_DATABASE=codimd< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > MYSQL_USER=codimd< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > MYSQL_PASSWORD=< secret password> < / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > PGID=1000< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > PUID=1000< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > TZ=Europe/London< / span >
< span class = w > < / span > < span class = nt > codimd< / span > < span class = p > :< / span >
< span class = w > < / span > < span class = nt > image< / span > < span class = p > :< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > linuxserver/codimd:latest< / span >
< span class = w > < / span > < span class = nt > container_name< / span > < span class = p > :< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > codimd< / span >
< span class = w > < / span > < span class = nt > restart< / span > < span class = p > :< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > always< / span >
< span class = w > < / span > < span class = nt > depends_on< / span > < span class = p > :< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > mariadb< / span >
< span class = w > < / span > < span class = nt > volumes< / span > < span class = p > :< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > < path to config> :/config< / span >
< span class = w > < / span > < span class = nt > environment< / span > < span class = p > :< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > DB_HOST=mariadb< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > DB_USER=codimd< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > DB_PASS=< secret password> < / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > DB_NAME=codimd< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > DB_PORT=3306< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > PGID=1000< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > PUID=1000< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = "l l-Scalar l-Scalar-Plain" > TZ=Europe/London< / span >
< span class = w > < / span > < span class = nt > ports< / span > < span class = p > :< / span >
< span class = w > < / span > < span class = "p p-Indicator" > -< / span > < span class = w > < / span > < span class = s > " 3000:3000" < / span >
< / code > < / pre > < / div > < h3 id = docker-cli > docker cli< / h3 > < div class = highlight > < pre > < span > < / span > < code > docker run -d \
2022-12-02 02:14:39 +00:00
--name=codimd \
-e PUID=1000 \
-e PGID=1000 \
-e DB_HOST=< hostname or ip> \
-e DB_PORT=3306 \
-e DB_USER=codimd \
-e DB_PASS=< secret password> \
-e DB_NAME=codimd \
-e TZ=Europe/London \
-p 3000:3000 \
-v < /path/to/appdata> :/config \
--restart unless-stopped \
lscr.io/linuxserver/codimd
2023-01-08 13:57:31 +00:00
< / code > < / pre > < / div > < h2 id = parameters > Parameters< / h2 > < p > Docker images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate < code > < external> :< internal> < / code > respectively. For example, < code > -p 8080:80< / code > would expose port < code > 80< / code > from inside the container to be accessible from the host's IP on port < code > 8080< / code > outside the container.< / p > < h3 id = ports-p > Ports (< code > -p< / code > )< / h3 > < table > < thead > < tr > < th align = center > Parameter< / th > < th > Function< / th > < / tr > < / thead > < tbody > < tr > < td align = center > < code > 3000< / code > < / td > < td > If you wish to access this container from http://{IP}:${PORT}` this < em > must< / em > be left unchanged.< / td > < / tr > < / tbody > < / table > < h3 id = environment-variables-e > Environment Variables (< code > -e< / code > )< / h3 > < table > < thead > < tr > < th align = center > Env< / th > < th > Function< / th > < / tr > < / thead > < tbody > < tr > < td align = center > < code > PUID=1000< / code > < / td > < td > for UserID - see below for explanation< / td > < / tr > < tr > < td align = center > < code > PGID=1000< / code > < / td > < td > for GroupID - see below for explanation< / td > < / tr > < tr > < td align = center > < code > DB_HOST=< hostname or ip> < / code > < / td > < td > Host address of mysql database< / td > < / tr > < tr > < td align = center > < code > DB_PORT=3306< / code > < / td > < td > Port to access mysql database default is 3306< / td > < / tr > < tr > < td align = center > < code > DB_USER=codimd< / code > < / td > < td > Database user< / td > < / tr > < tr > < td align = center > < code > DB_PASS=< secret password> < / code > < / td > < td > Database password< / td > < / tr > < tr > < td align = center > < code > DB_NAME=codimd< / code > < / td > < td > Database name< / td > < / tr > < tr > < td align = center > < code > TZ=Europe/London< / code > < / td > < td > Specify a timezone to use EG Europe/London.< / td > < / tr > < / tbody > < / table > < h3 id = volume-mappings-v > Volume Mappings (< code > -v< / code > )< / h3 > < table > < thead > < tr > < th align = center > Volume< / th > < th > Function< / th > < / tr > < / thead > < tbody > < tr > < td align = center > < code > /config< / code > < / td > < td > CodiMD config and configurable files< / td > < / tr > < / tbody > < / table > < h2 id = environment-variables-from-files-docker-secrets > Environment variables from files (Docker secrets)< / h2 > < p > You can set any environment variable from a file by using a special prepend < code > FILE__< / code > .< / p > < p > As an example:< / p > < div class = highlight > < pre > < span > < / span > < code > -e FILE__PASSWORD=/run/secrets/mysecretpassword
< / code > < / pre > < / div > < p > Will set the environment variable < code > PASSWORD< / code > based on the contents of the < code > /run/secrets/mysecretpassword< / code > file.< / p > < h2 id = umask-for-running-applications > Umask for running applications< / h2 > < p > For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional < code > -e UMASK=022< / code > setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up < a href = https://en.wikipedia.org/wiki/Umask > here< / a > before asking for support.< / p > < h2 id = user-group-identifiers > User / Group Identifiers< / h2 > < p > When using volumes (< code > -v< / code > flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user < code > PUID< / code > and group < code > PGID< / code > .< / p > < p > Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.< / p > < p > In this instance < code > PUID=1000< / code > and < code > PGID=1000< / code > , to find yours use < code > id user< / code > as below:< / p > < div class = highlight > < pre > < span > < / span > < code > $ id username
2022-12-02 02:14:39 +00:00
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
2023-04-03 13:15:36 +00:00
< / code > < / pre > < / div > < h2 id = application-setup > Application Setup< / h2 > < p > THIS IMAGE IS DEPRECATED. CodiMD is rebranded as < code > HedgeDoc< / code > and the new docker image is at < a href = https://github.com/linuxserver/docker-hedgedoc > linuxserver/hedgedoc< / a > .< / p > < p > CodiMD web interface can be accessed < code > http://${IP}:3000/< / code > , if you want to use a custom domain or anything besides port 3000 you will need to leverage their env settings for callbacks: (specifically for CMD_DOMAIN and CMD_URL_ADDPORT)< / p > < p > < a href = https://github.com/codimd/server/blob/master/docs/configuration-env-vars.md > Full list of CodiMD options< / a > < / p > < p > For convience we provide a working example using Mysql as a backend in this document, if you do not wish to use our custom environment values or a Mysql database backend feel free to leverage any of the settings laid out in the link above.< / p > < p > To run behind a reverse proxy we have a < a href = https://github.com/linuxserver/reverse-proxy-confs/blob/master/codimd.subdomain.conf.sample > preconfigured config< / a > using docker networking included in our < a href = https://github.com/linuxserver/docker-letsencrypt > LetsEncrypt< / a > image and you can read how to use this in the < a href = https://github.com/linuxserver/reverse-proxy-confs/#how-to-use-these-reverse-proxy-configs > Reverse Proxy Confs repository< / a > < / p > < h2 id = docker-mods > Docker Mods< / h2 > < p > < a href = "https://mods.linuxserver.io/?mod=codimd" title = "view available mods for this container." > < img alt = "Docker Mods" src = "https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=codimd&query=%24.mods%5B%27codimd%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml" > < / a > < a href = "https://mods.linuxserver.io/?mod=universal" title = "view available universal mods." > < img alt = "Docker Universal Mods" src = "https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml" > < / a > < / p > < p > We publish various < a href = https://github.com/linuxserver/docker-mods > Docker Mods< / a > to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.< / p > < h2 id = support-info > Support Info< / h2 > < ul > < li > Shell access whilst the container is running:< / li > < li > < code > docker exec -it codimd /bin/bash< / code > < / li > < li > To monitor the logs of the container in realtime:< / li > < li > < code > docker logs -f codimd< / code > < / li > < li > Container version number< / li > < li > < code > docker inspect -f '{{ index .Config.Labels "build_version" }}' codimd< / code > < / li > < li > Image version number< / li > < li > < code > docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/codimd< / code > < / li > < / ul > < h2 id = versions > Versions< / h2 > < ul > < li > < strong > 22.12.20:< / strong > - Deprecate image in favor of the new rebranded image at < a href = https://github.com/linuxserver/docker-hedgedoc > linuxserver/hedgedoc< / a > .< / li > < li > < strong > 23.05.19:< / strong > - Initial release< / li > < / ul > < / article > < / div > < / div > < / main > < footer class = md-footer > < div class = "md-footer-meta md-typeset" > < div class = "md-footer-meta__inner md-grid" > < div class = md-copyright > < div class = md-copyright__highlight > Copyright © 2022 LinuxServer.io < / div > Made with < a href = https://squidfunk.github.io/mkdocs-material/ target = _blank rel = noopener > Material for MkDocs < / a > < / div > < div class = md-social > < a href = https://github.com/linuxserver target = _blank rel = noopener title = github.com class = md-social__link > < svg xmlns = http://www.w3.org/2000/svg viewbox = "0 0 448 512" > <!-- Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. --> < path d = "M400 32H48C21 .