Self-Hosting on/docs/self-hosting/Recent content in Self-Hosting onHugo -- gohugo.ioen-USGetting started/docs/self-hosting/getting-started/Mon, 01 Jan 0001 00:00:00 +0000/docs/self-hosting/getting-started/Get started There are two main ways to self-host mCaptcha: Bare metal With Docker With AnsibleDeploy bare metal/docs/self-hosting/bare-metal/Mon, 01 Jan 0001 00:00:00 +0000/docs/self-hosting/bare-metal/1. Install Database The following databases are supported: Postgres MariaDB Please install the database of your choice. Then: Create new database user for mCaptcha Create new database for mCaptcha mCaptcha binary has migrations baked-in and is applied on start up. The choice of database is described using the scheme of the database URL. For instance: Postgres: postgres://mcaptcha:password@localhost:5432/mcaptcha Mariadb: mysql://mcaptcha:password@localhost:3306/mcaptcha 2. Optionally, install mCaptcha/cache We recommend this for larger instances.Using Ansible/docs/self-hosting/ansible/Mon, 01 Jan 0001 00:00:00 +0000/docs/self-hosting/ansible/Ansible playbooks to install mCaptcha are available here. Instructions Installation Clone the repository: 1git clone https://git.batsense.net/mCaptcha/iac && cd iac Create inventory file. You should have SSH access to the remote machine, and the user must have sudo privileges. Example inventory file: 1[mcaptcha_hosts] 2"mcaptcha_hosts" 3<node name> ansible_host=<node IP> ansible_user=<remote username> It is important that the group name be mcaptcha_hosts. Configure installation by editing ansible/vars/mcaptcha/vars.yml. Most parameters have defaults, and the required parameters are annotated.Using Docker/docs/self-hosting/docker/Mon, 01 Jan 0001 00:00:00 +0000/docs/self-hosting/docker/With Docker 1. Configure mcaptcha is highly configurable. Configuration is applied/merged in the following order: path to configuration file passed in via MCAPTCHA_CONFIG ./config/default.toml /etc/mcaptcha/config.toml environment variables. See CONFIGURATION.md for configurable options. 2. Run image If you have already have a Postgres instance running, then: docker run -p <host-machine-port>:<port-in-configuration-file> \ --add-host=database:<database-ip-addrss> \ -e RUST_LOG=debug \ -e DATABASE_URL="postgres://<db-user>:<db-password>@database:<db-port>/<db-name>" \ mcaptcha/mcaptcha:latest If you don’t have a Postgres instance running, you can either install one using a package manager or launch one with docker.