captns / statamic-altcha
ALTCHA captcha integration for Statamic CMS
Package info
gitlab.com/captns/statamic-altcha
Type:statamic-addon
pkg:composer/captns/statamic-altcha
v0.4.0
2026-07-21 13:55 UTC
Requires
- php: ^8.1
- altcha-org/altcha: ^2.1
- statamic/cms: ^5.0|^6.0
README
A privacy-focused, proof-of-work captcha addon for Statamic CMS using ALTCHA.
Depends on Altcha and its Widget.
Installation
Install via Composer:
composer require captns/statamic-altcha
Add your HMAC key to .env:
ALTCHA_HMAC_KEY=your-64-character-hex-key-here
Generate a secure key:
php -r "echo bin2hex(random_bytes(32)) . PHP_EOL;"
Usage
Basic configuration
The plugin needs to inject Javascript into your page's templates. You need to add these two tags:
Script includes
Add this into your <head> tag:
...
@stack('altcha-head')
</head>
...
Add this statement near the bottom of your page:
...
@stack('altcha-scripts')
</body>
...
In Templates
Use the tag:
{{ altcha }}
Configuration Options
complexity: Computational difficulty (default: 50000)salt_length: Length of challenge salt (default: 12)expires: Challenge expiration in minutes (default: 10)hide_logo: Hide the ALTCHA logo (default: false)hide_footer: Hide the widget footer (default: false)
License
GPLv2