<description><h2 id="1-install-database">1. Install Database</h2>
<p>The following databases are supported:</p>
<ol>
<li>Postgres</li>
<li>MariaDB</li>
</ol>
<p>Please install the database of your choice. Then:</p>
<ol>
<li>Create new database user for mCaptcha</li>
<li>Create new database for mCaptcha</li>
</ol>
<p>mCaptcha binary has migrations baked-in and is applied on start up. The
choice of database is described using the <a href="https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#scheme">scheme</a> of the database URL. For
instance:</p>
<ol>
<li>Postgres: <code>postgres://mcaptcha:password@localhost:5432/mcaptcha</code></li>
<li>Mariadb: <code>mysql://mcaptcha:password@localhost:3306/mcaptcha</code></li>
</ol>
<h2 id="2-optionally-install-mcaptchacache">2. Optionally, install mCaptcha/cache</h2>
<p>We recommend this for larger instances. For single-user instances or for
instances that protect personal websites, we recommend using the
internal cache system. To do so, please comment out the
<a href="https://github.com/mCaptcha/mCaptcha/blob/d4967626ee59504b32b0f85e409b4e3444ddc4f0/config/default.toml#L54"><code>redis</code></a> section of the configuration file.</p></description>
<description><h2 id="with-docker">With Docker</h2>
<h3 id="1-configure">1. Configure</h3>
<p>mcaptcha is highly configurable.</p>
<p>Configuration is applied/merged in the following order:</p>
<ol>
<li>path to configuration file passed in via <code>MCAPTCHA_CONFIG</code></li>
<li><code>./config/default.toml</code></li>
<li><code>/etc/mcaptcha/config.toml</code></li>
<li>environment variables.</li>
</ol>
<p>See
<a href="https://github.com/mCaptcha/mCaptcha/tree/master/docs/CONFIGURATION.md">CONFIGURATION.md</a>
for configurable options.</p>
<h3 id="2-run-image">2. Run image</h3>
<p>If you have already have a Postgres instance running, then:</p>
<pre tabindex="0"><code>docker run -p &lt;host-machine-port&gt;:&lt;port-in-configuration-file&gt; \
	--add-host=database:&lt;database-ip-addrss&gt; \
	-e RUST_LOG=debug \
	-e DATABASE_URL=&#34;postgres://&lt;db-user&gt;:&lt;db-password&gt;@database:&lt;db-port&gt;/&lt;db-name&gt;&#34; \
	mcaptcha/mcaptcha:latest
</code></pr</description>