Skip to content
Snippets Groups Projects
Commit 597dbc00 authored by piuvas silly's avatar piuvas silly
Browse files

improve mcaptcha.md

parent 4a6b150b
No related branches found
No related tags found
1 merge request!31add mcaptcha doc.
...@@ -4,7 +4,7 @@ weight: 3300 ...@@ -4,7 +4,7 @@ weight: 3300
toc: true toc: true
--- ---
mCaptcha offers a self-hosted captcha, which is already featured in docker-compose so the installation is pretty easy. mCaptcha offers a self-hosted CAPTCHA, which is already featured in docker-compose so the installation is pretty simple.
## Docker setup ## Docker setup
...@@ -36,7 +36,7 @@ services: ...@@ -36,7 +36,7 @@ services:
<...> <...>
``` ```
Of course, here you want to change `example.tld` to the domain that'll be hosting the mCaptcha interface. Of course, here you want to change `example.tld` to the domain that'll be hosting the mCaptcha interface. You can also comment this option out if you wish to setup on `localhost`.
### Nginx Configuration ### Nginx Configuration
...@@ -47,13 +47,14 @@ Borrowing from Misskey, this is the config I use for mCaptcha: ...@@ -47,13 +47,14 @@ Borrowing from Misskey, this is the config I use for mCaptcha:
``` ```
server { server {
server_name example.tld; server_name example.tld;
listen 80; listen 80;
listen [::]:80; listen [::]:80;
# For SSL domain validation # For SSL domain validation
root /var/www/html; root /var/www/html;
location /.well-known/acme-challenge/ { allow all; } location /.well-known/acme-challenge/ { allow all; }
location /.well-known/pki-validation/ { allow all; } location /.well-known/pki-validation/ { allow all; }
location / { return 301 https://$server_name$request_uri; }} location / { return 301 https://$server_name$request_uri; }
}
server { server {
listen 443 ssl; listen 443 ssl;
...@@ -115,9 +116,13 @@ Don't forget to run `nginx -t` to test your configuration file. ...@@ -115,9 +116,13 @@ Don't forget to run `nginx -t` to test your configuration file.
### mCaptcha Configuration ### mCaptcha Configuration
After having mCaptcha up and running, create an account and start configuring a website. After having mCaptcha up and running, navigate to the domain you setup in the previous step.
You should see a "Sign in" screen with a registration button at the bottom. If `MCAPTCHA_allow_registration` is `true`, you (and anyone!) will be able to create an account. It's recommended to set it to `false` after setting up.
After that, click "New Site" to begin configuring the challenge itself.
The configuration is incredibly easy as you just type in the traffic you expect (it can be adjusted whenever), though if you want to have more control, it can get more complex: [Configuring Difficulty Factor](https://mcaptcha.org/docs/webmasters/configuring-difficulty-factor). The configuration is intuitive as you just type in the traffic you expect (it can be adjusted whenever), though if you want to have more control, it can get more complex: [Configuring Difficulty Factor](https://mcaptcha.org/docs/webmasters/configuring-difficulty-factor).
You need to save the public/"sitekey" and private keys. You can get the sitekey on the sidebar. You need to save the public/"sitekey" and private keys. You can get the sitekey on the sidebar.
...@@ -125,9 +130,9 @@ You need to save the public/"sitekey" and private keys. You can get the sitekey ...@@ -125,9 +130,9 @@ You need to save the public/"sitekey" and private keys. You can get the sitekey
On the control panel as an administrator, access the Security page, where you can enable mCaptcha. On the control panel as an administrator, access the Security page, where you can enable mCaptcha.
As straight forward as it is, the fields are where you input your keys and the domain (now in `https://example.tld/` format). As straight forward as it is, "Site key" is where the public key goes, "Secret key" for private keys and "mCaptcha server URL" for the domain (now in `https://example.tld/` format).
After saving, test the captcha in the same page, but also be sure to check it out in the signup form. After saving, test the captcha in the "preview" widget, but also be sure to check it out in the signup form.
### Finishing Touches ### Finishing Touches
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment