</span></code></pre></div><h2id=parameters>Parameters<aclass=headerlinkhref=#parameterstitle="Permanent link">¶</a></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><h3id=ports-p>Ports (<code>-p</code>)<aclass=headerlinkhref=#ports-ptitle="Permanent link">¶</a></h3><table><thead><tr><thstyle="text-align: center;">Parameter</th><th>Function</th></tr></thead><tbody><tr><tdstyle="text-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><h3id=environment-variables-e>Environment Variables (<code>-e</code>)<aclass=headerlinkhref=#environment-variables-etitle="Permanent link">¶</a></h3><table><thead><tr><thstyle="text-align: center;">Env</th><th>Function</th></tr></thead><tbody><tr><tdstyle="text-align: center;"><code>PUID=1000</code></td><td>for UserID - see below for explanation</td></tr><tr><tdstyle="text-align: center;"><code>PGID=1000</code></td><td>for GroupID - see below for explanation</td></tr><tr><tdstyle="text-align: center;"><code>DB_HOST=<hostname or ip></code></td><td>Host address of mysql database</td></tr><tr><tdstyle="text-align: center;"><code>DB_PORT=3306</code></td><td>Port to access mysql database default is 3306</td></tr><tr><tdstyle="text-align: center;"><code>DB_USER=codimd</code></td><td>Database user</td></tr><tr><tdstyle="text-align: center;"><code>DB_PASS=<secret password></code></td><td>Database password</td></tr><tr><tdstyle="text-align: center;"><code>DB_NAME=codimd</code></td><td>Database name</td></tr><tr><tdstyle="text-align: center;"><code>TZ=Europe/London</code></td><td>Specify a timezone to use EG Europe/London.</td></tr></tbody></table><h3id=volume-mappings-v>Volume Mappings (<code>-v</code>)<aclass=headerlinkhref=#volume-mappings-vtitle="Permanent link">¶</a></h3><table><thead><tr><thstyle="text-align: center;">Volume</th><th>Function</th></tr></thead><tbody><tr><tdstyle="text-align: center;"><code>/config</code></td><td>CodiMD config and configurable files</td></tr></tbody></table><h2id=environment-variables-from-files-docker-secrets>Environment variables from files (Docker secrets)<aclass=headerlinkhref=#environment-variables-from-files-docker-secretstitle="Permanent link">¶</a></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><divclass="language-text highlight"><pre><span></span><code><spanid=__span-2-1><aid=__codelineno-2-1name=__codelineno-2-1href=#__codelineno-2-1></a>-e FILE__PASSWORD=/run/secrets/mysecretpassword
</span></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><h2id=umask-for-running-applications>Umask for running applications<aclass=headerlinkhref=#umask-for-running-applicationstitle="Permanent link">¶</a></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 <ahref=https://en.wikipedia.org/wiki/Umask>here</a> before asking for support.</p><h2id=user-group-identifiers>User / Group Identifiers<aclass=headerlinkhref=#user-group-identifierstitle="Permanent link">¶</a></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><divclass="language-text highlight"><pre><span></span><code><spanid=__span-3-1><aid=__codelineno-3-1name=__codelineno-3-1href=#__codelineno-3-1></a> $ id username
</span></code></pre></div><h2id=application-setup>Application Setup<aclass=headerlinkhref=#application-setuptitle="Permanent link">¶</a></h2><p>THIS IMAGE IS DEPRECATED. CodiMD is rebranded as <code>HedgeDoc</code> and the new docker image is at <ahref=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><ahref=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 <ahref=https://github.com/linuxserver/reverse-proxy-confs/blob/master/codimd.subdomain.conf.sample>preconfigured config</a> using docker networking included in our <ahref=https://github.com/linuxserver/docker-letsencrypt>LetsEncrypt</a> image and you can read how to use this in the <ahref=https://github.com/linuxserver/reverse-proxy-confs/#how-to-use-these-reverse-proxy-configs>Reverse Proxy Confs repository</a></p><h2id=docker-mods>Docker Mods<aclass=headerlinkhref=#docker-modstitle="Permanent link">¶</a></h2><p><ahref="https://mods.linuxserver.io/?mod=codimd"title="view available mods for this container."><imgalt="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><ahref="https://mods.linuxserver.io/?mod=universal"title="view available universal mods."><imgalt="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 <ahref=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><h2id=support-info>Support Info<aclass=headerlinkhref=#support-infotitle="Permanent link">¶</a></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><h2id=versions>Versions<aclass=headerlinkhref=#versionstitle="Permanent link">¶</a></h2><ul><li><strong>22.12.20:</strong> - Deprecate image in favor of the new rebranded image at <ahref=https://github.com/linuxserver/docker-hedgedoc>linuxserver/hedgedoc</a>.</li><li><strong>23.05.19:</strong> - Initial release</li></ul><asideclass=md-source-file><spanclass=md-source-file__fact><spanclass=md-icontitle="Last update"><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg></span>