319 lines
27 KiB
HTML
319 lines
27 KiB
HTML
<!doctype html>
|
|
<html lang="en-US">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<link rel="preload" as="font" href="/fonts/vendor/jost/jost-v4-latin-regular.woff2" type="font/woff2" crossorigin>
|
|
<link rel="preload" as="font" href="/fonts/vendor/jost/jost-v4-latin-700.woff2" type="font/woff2" crossorigin>
|
|
<link rel="stylesheet" href="/main.4492eacff4110697cd6162326bce4ee59e92315bf9acc357594066968669326dc80b75b1a39e6cea81c4f8898bd1d294fcc657a9cb61baed14c7dee6f9e2b2d6.css" integrity="sha512-RJLqz/QRBpfNYWIya85O5Z6SMVv5rMNXWUBmloZpMm3IC3Wxo55s6oHE+ImL0dKU/MZXqcthuu0Ux97m+eKy1g==" crossorigin="anonymous">
|
|
<noscript><style>img.lazyload { display: none; }</style></noscript>
|
|
<meta name="robots" content="index, follow">
|
|
<meta name="googlebot" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1">
|
|
<meta name="bingbot" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1">
|
|
<title>Deploy bare metal - mCaptcha</title>
|
|
<meta name="description" content="Bare metal deployment is tedious, most of this will be automated with a script in the future.">
|
|
<link rel="canonical" href="/docs/self-hosted/bare-metal/">
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
<meta name="twitter:image" content="/icon.png">
|
|
<meta name="twitter:title" content="Deploy bare metal">
|
|
<meta name="twitter:description" content="Bare metal deployment is tedious, most of this will be automated with a script in the future.">
|
|
|
|
<meta name="twitter:site" content="@">
|
|
<meta name="twitter:creator" content="@">
|
|
|
|
<meta property="og:title" content="Deploy bare metal">
|
|
<meta property="og:description" content="Bare metal deployment is tedious, most of this will be automated with a script in the future.">
|
|
<meta property="og:type" content="article">
|
|
<meta property="og:url" content="/docs/self-hosted/bare-metal/">
|
|
|
|
<meta property="og:image" content="/icon.png"/>
|
|
<meta property="article:modified_time" content="2023-03-10T20:01:19+05:30">
|
|
<meta property="og:site_name" content="mCaptcha">
|
|
|
|
<meta property="article:publisher" content="https://www.facebook.com/">
|
|
<meta property="article:author" content="https://www.facebook.com/">
|
|
<meta property="og:locale" content="en_US">
|
|
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "http://schema.org",
|
|
"@type": "BreadcrumbList",
|
|
"itemListElement": [{
|
|
"@type": "ListItem",
|
|
"position": 1 ,
|
|
"name": "Home",
|
|
"item": "\/"
|
|
},{
|
|
"@type": "ListItem",
|
|
"position": 2 ,
|
|
"name": "Docsself Hostedbare Metal",
|
|
"item": "\/docsself-hostedbare-metal\/"
|
|
}]
|
|
}
|
|
</script>
|
|
|
|
<meta name="theme-color" content="#fff">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
|
<link rel="manifest" href="/site.webmanifest">
|
|
|
|
</head>
|
|
<body class="docs single">
|
|
|
|
|
|
<div class="header-bar fixed-top"></div>
|
|
<header class="navbar fixed-top navbar-expand-md navbar-light">
|
|
<div class="container">
|
|
<input class="menu-btn order-0" type="checkbox" id="menu-btn">
|
|
<label class="menu-icon d-md-none" for="menu-btn"><span class="navicon"></span></label>
|
|
<a class="navbar-brand order-1 order-md-0 me-auto" href="/">mCaptcha</a>
|
|
<button id="mode" class="btn btn-link order-2 order-md-4" type="button" aria-label="Toggle mode">
|
|
<span class="toggle-dark"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg></span>
|
|
<span class="toggle-light"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg></span>
|
|
</button>
|
|
<ul class="navbar-nav social-nav order-3 order-md-5">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="https://github.com/mCaptcha"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg><span class="ms-2 visually-hidden">GitHub</span></a>
|
|
</li>
|
|
</ul>
|
|
<div class="collapse navbar-collapse order-4 order-md-1">
|
|
<ul class="navbar-nav main-nav me-auto order-5 order-md-2"><li class="nav-item">
|
|
<a class="nav-link" href="/blog/">Blog</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/community/">Community</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/contact/">Contact</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/about/">About</a>
|
|
</li>
|
|
<li class="nav-item active">
|
|
<a class="nav-link" href="/docs/introduction/installing-captcha/">Docs</a>
|
|
</li>
|
|
</ul>
|
|
<div class="break order-6 d-md-none"></div>
|
|
<form class="navbar-form flex-grow-1 order-7 order-md-3">
|
|
<input id="userinput" class="form-control is-search" type="search" placeholder="Search docs..." aria-label="Search docs..." autocomplete="off">
|
|
<div id="suggestions" class="shadow bg-white rounded"></div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="wrap container" role="document">
|
|
<div class="content">
|
|
|
|
<div class="row flex-xl-nowrap">
|
|
<div class="col-lg-5 col-xl-4 docs-sidebar">
|
|
<nav class="docs-links" aria-label="Main navigation">
|
|
<h3>Introduction</h3>
|
|
<ul class="list-unstyled">
|
|
<li><a class="docs-link" href="/docs/introduction/installing-captcha/">Installing mCaptcha on your website</a></li>
|
|
<li><a class="docs-link" href="/docs/introduction/configuring-difficulty-factor/">Configuring Difficulty Factor</a></li>
|
|
</ul>
|
|
<h3>Terminology</h3>
|
|
<ul class="list-unstyled">
|
|
<li><a class="docs-link" href="/docs/terminology/access-token/">Access token</a></li>
|
|
<li><a class="docs-link" href="/docs/terminology/cooldown-period/">Cooldown Period</a></li>
|
|
<li><a class="docs-link" href="/docs/terminology/difficulty-factor/">Difficulty Factor</a></li>
|
|
<li><a class="docs-link" href="/docs/terminology/sitekey/">Site key</a></li>
|
|
<li><a class="docs-link" href="/docs/terminology/visitor-threshold/">Visitor Threshold</a></li>
|
|
</ul>
|
|
<h3>Self-Hosted</h3>
|
|
<ul class="list-unstyled">
|
|
<li><a class="docs-link" href="/docs/self-hosted/getting-started/">Getting started</a></li>
|
|
<li><a class="docs-link active" href="/docs/self-hosted/bare-metal/">Deploy bare metal</a></li>
|
|
<li><a class="docs-link" href="/docs/self-hosted/docker/">Using Docker</a></li>
|
|
<li><a class="docs-link" href="/docs/self-hosted/dependencies/">Database and cache</a></li>
|
|
</ul>
|
|
<h3>API</h3>
|
|
<ul class="list-unstyled">
|
|
<li><a class="docs-link" href="/docs/api/browser/">Browser libraries</a></li>
|
|
<li><a class="docs-link" href="/docs/api/mcaptcha-system/">mCaptcha System Library</a></li>
|
|
<li><a class="docs-link" href="/docs/api/pow-sha256/">pow_sha256</a></li>
|
|
</ul>
|
|
<h3>Help</h3>
|
|
<ul class="list-unstyled">
|
|
<li><a class="docs-link" href="/docs/help/troubleshooting/">Troubleshooting</a></li>
|
|
<li><a class="docs-link" href="/docs/help/faq/">FAQ</a></li>
|
|
</ul>
|
|
|
|
</nav>
|
|
</div>
|
|
<nav class="docs-toc d-none d-xl-block col-xl-3" aria-label="Secondary navigation">
|
|
<div class="page-links">
|
|
<h3>On this page</h3>
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li>
|
|
<ul>
|
|
<li><a href="#2-configure">2. Configure</a></li>
|
|
<li><a href="#1-install-postgres-if-you-dont-have-it-already">1. Install postgres if you don’t have it already.</a></li>
|
|
<li><a href="#2-create-new-user-for-running-mcaptcha">2. Create new user for running <code>mcaptcha</code></a></li>
|
|
<li><a href="#3-create-new-user-in-postgres">3. Create new user in Postgres</a></li>
|
|
<li><a href="#4-install-and-load-mcaptchacachehttpsgithubcommcaptchacache-module">4. Install and load <a href="https://github.com/mCaptcha/cache"><code>mCaptcha/cache</code></a> module:</a></li>
|
|
<li><a href="#4-build-mcaptcha">4. Build <code>mcaptcha</code></a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#how-to-build">How to build</a>
|
|
<ul>
|
|
<li><a href="#5-install-package">5. Install package:</a></li>
|
|
<li><a href="#6-systemd-service-configuration">6. Systemd service configuration:</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
|
|
</nav>
|
|
<main class="docs-content col-lg-11 col-xl-9">
|
|
|
|
<h1>Deploy bare metal</h1>
|
|
<p class="lead">Bare metal deployment is tedious, most of this will be automated with a script in the future.</p>
|
|
<h3 id="2-configure">2. Configure<a href="#2-configure" class="anchor" aria-hidden="true">#</a> </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>
|
|
<h3 id="1-install-postgres-if-you-dont-have-it-already">1. Install postgres if you don’t have it already.<a href="#1-install-postgres-if-you-dont-have-it-already" class="anchor" aria-hidden="true">#</a> </h3>
|
|
<p>For Debian based distributions:</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1</span><span>sudo apt install postgres
|
|
</span></span></code></pre></div><h3 id="2-create-new-user-for-running-mcaptcha">2. Create new user for running <code>mcaptcha</code><a href="#2-create-new-user-for-running-mcaptcha" class="anchor" aria-hidden="true">#</a> </h3>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1</span><span>$ sudo useradd -b /srv -m -s /usr/bin/zsh mcaptcha
|
|
</span></span></code></pre></div><h3 id="3-create-new-user-in-postgres">3. Create new user in Postgres<a href="#3-create-new-user-in-postgres" class="anchor" aria-hidden="true">#</a> </h3>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1</span><span>$ sudo -iu postgres <span style="color:#6272a4"># switch to `postgres` user</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2</span><span>$ psql
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3</span><span><span style="color:#8be9fd;font-style:italic">postgres</span><span style="color:#ff79c6">=</span><span style="color:#6272a4"># CREATE USER mcaptcha WITH PASSWORD 'my super long password and yes you need single quote`;</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">4</span><span>$ createdb -O mcaptcha mcaptcha <span style="color:#6272a4"># create db 'mcaptcha' with 'mcaptcha' as owner</span>
|
|
</span></span></code></pre></div><h3 id="4-install-and-load-mcaptchacachehttpsgithubcommcaptchacache-module">4. Install and load <a href="https://github.com/mCaptcha/cache"><code>mCaptcha/cache</code></a> module:<a href="#4-install-and-load-mcaptchacachehttpsgithubcommcaptchacache-module" class="anchor" aria-hidden="true">#</a> </h3>
|
|
<p>See <a href="https://github.com/mCaptcha/cache"><code>mCaptcha/cache</code></a> for more
|
|
details.</p>
|
|
<h3 id="4-build-mcaptcha">4. Build <code>mcaptcha</code><a href="#4-build-mcaptcha" class="anchor" aria-hidden="true">#</a> </h3>
|
|
<p>To build <code>mcaptcha</code>, you need the following dependencies:</p>
|
|
<ol>
|
|
<li>rust</li>
|
|
<li>node(<code>v14.16.0</code>)</li>
|
|
<li>yarn(JavaScript package manager)</li>
|
|
<li>make</li>
|
|
</ol>
|
|
<h2 id="how-to-build">How to build<a href="#how-to-build" class="anchor" aria-hidden="true">#</a> </h2>
|
|
<ol>
|
|
<li>Install Cargo using <a href="https://rustup.rs/">rustup</a> with:</li>
|
|
</ol>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1</span><span>$ curl --proto <span style="color:#f1fa8c">'=https'</span> --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
</span></span></code></pre></div><ol start="2">
|
|
<li>
|
|
<p>Install node(<code>v14.16.0</code>)</p>
|
|
</li>
|
|
<li>
|
|
<p>Install yarn(JavaScript package manager)</p>
|
|
</li>
|
|
<li>
|
|
<p>Build with make:</p>
|
|
</li>
|
|
</ol>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1</span><span>$ make dev-env <span style="color:#ff79c6">&&</span> <span style="color:#f1fa8c">\
|
|
</span></span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2</span><span><span style="color:#f1fa8c"></span> make release
|
|
</span></span></code></pre></div><h3 id="5-install-package">5. Install package:<a href="#5-install-package" class="anchor" aria-hidden="true">#</a> </h3>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1</span><span>$ sudo cp ./target/release/mcaptcha /usr/bin/ <span style="color:#ff79c6">&&</span> <span style="color:#f1fa8c">\
|
|
</span></span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2</span><span><span style="color:#f1fa8c"></span> mkdir sudo /etc/mcaptcha <span style="color:#ff79c6">&&</span> <span style="color:#f1fa8c">\
|
|
</span></span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3</span><span><span style="color:#f1fa8c"></span> sudo cp config/default.toml /etc/mcaptcha/config.toml
|
|
</span></span></code></pre></div><h3 id="6-systemd-service-configuration">6. Systemd service configuration:<a href="#6-systemd-service-configuration" class="anchor" aria-hidden="true">#</a> </h3>
|
|
<ol>
|
|
<li>Copy the following to <code>/etc/systemd/system/mcaptcha.service</code>:</li>
|
|
</ol>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-systemd" data-lang="systemd"><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 1</span><span><span style="color:#ff79c6">[Unit]</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 2</span><span><span style="color:#50fa7b">Description</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">mCaptcha: a CAPTCHA system that gives attackers a run for their money</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 3</span><span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 4</span><span><span style="color:#ff79c6">[Service]</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 5</span><span><span style="color:#50fa7b">Type</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">simple</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 6</span><span><span style="color:#50fa7b">User</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">mcaptcha</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 7</span><span><span style="color:#50fa7b">ExecStart</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">/usr/bin/mcaptcha</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 8</span><span><span style="color:#50fa7b">Restart</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">on-failure</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 9</span><span><span style="color:#50fa7b">RestartSec</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">1</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">10</span><span><span style="color:#50fa7b">SuccessExitStatus</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">3 4</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">11</span><span><span style="color:#50fa7b">RestartForceExitStatus</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">3 4</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">12</span><span><span style="color:#50fa7b">SystemCallArchitectures</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">native</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">13</span><span><span style="color:#50fa7b">MemoryDenyWriteExecute</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">true</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">14</span><span><span style="color:#50fa7b">NoNewPrivileges</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">true</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">15</span><span><span style="color:#50fa7b">Environment</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">"RUST_LOG=info"</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">16</span><span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">17</span><span><span style="color:#ff79c6">[Unit]</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">18</span><span><span style="color:#50fa7b">After</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">sound.target</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">19</span><span><span style="color:#50fa7b">Wants</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">network-online.target</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">20</span><span><span style="color:#50fa7b">Wants</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">network-online.target</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">21</span><span><span style="color:#50fa7b">Requires</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">postgresql.service</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">22</span><span><span style="color:#50fa7b">After</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">syslog.target</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">23</span><span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">24</span><span><span style="color:#ff79c6">[Install]</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">25</span><span><span style="color:#50fa7b">WantedBy</span><span style="color:#ff79c6">=</span><span style="color:#f1fa8c">multi-user.target</span>
|
|
</span></span></code></pre></div><ol start="2">
|
|
<li>Enable service:</li>
|
|
</ol>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1</span><span>$ sudo systemctl daemon-reload <span style="color:#ff79c6">&&</span> <span style="color:#f1fa8c">\
|
|
</span></span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2</span><span><span style="color:#f1fa8c"></span> sudo systemctl <span style="color:#8be9fd;font-style:italic">enable</span> mcaptcha <span style="color:#ff79c6">&&</span> <span style="color:#f1fa8c">\ </span><span style="color:#6272a4"># Auto startup during boot</span>
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3</span><span> sudo systemctl start mcaptcha
|
|
</span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">4</span><span><span style="color:#f1fa8c">``</span>
|
|
</span></span></code></pre></div>
|
|
<p class="edit-page"><a href="https://github.com/mCaptcha/website/blob/master/content/docs/self-hosted/bare-metal.md"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>Edit this page on GitHub</a></p>
|
|
|
|
<div class="docs-navigation d-flex justify-content-between">
|
|
|
|
<a href="/docs/self-hosted/getting-started/">
|
|
<div class="card my-1">
|
|
<div class="card-body py-2">
|
|
← Getting started
|
|
</div>
|
|
</div>
|
|
</a>
|
|
<a class="ms-auto" href="/docs/self-hosted/docker/">
|
|
<div class="card my-1">
|
|
<div class="card-body py-2">
|
|
Using Docker →
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
|
|
</main>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<footer class="footer text-muted">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-8 order-last order-lg-first">
|
|
<ul class="list-inline">
|
|
<li class="list-inline-item">Powered by <a href="https://gohugo.io/">Hugo</a>, and <a href="https://getdoks.org/">Doks</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="col-lg-8 order-first order-lg-last text-lg-end">
|
|
<ul class="list-inline">
|
|
<li class="list-inline-item"><a href="/about/">About</a></li>
|
|
<li class="list-inline-item"><a href="/donate">Donate</a></li>
|
|
<li class="list-inline-item"><a href="/privacy-policy/">Privacy</a></li>
|
|
<li class="list-inline-item"><a href="/security">Security</a></li>
|
|
<li class="list-inline-item"><a href="https://stats.uptimerobot.com/GK7VLFJnBl">Status</a></li>
|
|
<li class="list-inline-item"><a href="/thanks">Thanks</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
<script src="/main.min.fc14a6a9dceb7093b6984e33583a45c79e3c960959d75df6b62753b4d1c63a97d25af2b0ca924ed12675f1de34f3fce9ec81668f2d3bee114b9b6357dd2e92cd.js" integrity="sha512-/BSmqdzrcJO2mE4zWDpFx548lglZ1132tidTtNHGOpfSWvKwypJO0SZ18d408/zp7IFmjy077hFLm2NX3S6SzQ==" crossorigin="anonymous" defer></script>
|
|
<script src="/index.min.f24b6e33dac74771476dda67fe905af998983abef17f74f74d71228ac8f40f87af8b15bcd9f0da775c90a41395c3d153fb0067cc75ff642c520b3607340014c0.js" integrity="sha512-8ktuM9rHR3FHbdpn/pBa+ZiYOr7xf3T3TXEiisj0D4evixW82fDad1yQpBOVw9FT+wBnzHX/ZCxSCzYHNAAUwA==" crossorigin="anonymous" defer></script>
|
|
|
|
</body>
|
|
</html>
|