Cap CAPTCHA on Railway
Self-hosted proof-of-work CAPTCHA with a dashboard and analytics, running as Cap 4.0.13 on Railway.
Cap is an open-source, privacy-friendly CAPTCHA that you host yourself. Instead of asking visitors to pick images, the browser solves a small proof-of-work puzzle in the background, and your backend checks the resulting token with Cap through a reCAPTCHA-style siteverify endpoint.
The server, capd, also provides a dashboard for site keys, live events, rules and settings, so one instance can protect several sites, each with its own difficulty, allowed origins and rules. It is a self-hosted alternative to services such as Google reCAPTCHA or hCaptcha.
Cap is released under the Apache-2.0 licence.
What Cap CAPTCHA can do
- Proof-of-work challenge solved in the visitor's browser
- siteverify endpoint for backend token checks
- Dashboard for site keys, live events and settings
- Per-site difficulty, allowed origins and rules
- Analytics events stored in DuckDB
- Rate limits per visitor
What people use it for
- Protecting sign-up, login and contact forms from bots
- One CAPTCHA server for several sites, each with its own site key
- Guarding API endpoints that should require a solved challenge
- Watching bot traffic per site key
Running Cap CAPTCHA on Railway
The Railway template runs Cap 4.0.13 (capd) from the official image together with a password-protected Valkey 9.1.3 on the private network. Cap keeps analytics in DuckDB on its own volume, and Valkey keeps site keys, sessions and rate limits on another volume. The dashboard key and the Valkey password are generated at deploy. The template notes measure Cap at roughly 0.07 GB idle and 0.14 GB at peak, so memory use is small.
Cap CAPTCHA templates on Railway
Tracklayer templates are listed first. Other Cap CAPTCHA templates follow, ordered by total deployments on Railway. How this works.
Deployment numbers as of 2026-11-20.
Questions about Cap CAPTCHA
How do I log in to the dashboard?
Open the Cap service's domain and sign in with ADMIN_KEY from the Cap service Variables tab. Create a site key, then use Settings, Add Cap to your site for the widget snippet and secret.
How does my backend verify a token?
It sends the token and the key secret to the /{site-key}/siteverify endpoint, once per token. A response with success true means a solved challenge. Services in the same Railway project can use the private URL.
Is data kept across redeploys?
Yes. Analytics are stored in DuckDB on the Cap volume, and Valkey uses AOF and snapshots on its own volume.
Can I run more than one replica?
No. Run one Cap replica per volume.
How do I upgrade?
Change the tag and digest in services/cap/Dockerfile and redeploy. The template notes say upgrading from v3 to v4 needs a migration, so read the release notes first.
Tracklayer maintains the templates marked as such; Cap CAPTCHA is a trademark of its owners and this site is not affiliated with them.
