{"id":23131170,"url":"https://github.com/friendlycaptcha/friendly-lite-server","last_synced_at":"2025-07-03T23:33:01.184Z","repository":{"id":37765140,"uuid":"420374924","full_name":"FriendlyCaptcha/friendly-lite-server","owner":"FriendlyCaptcha","description":"Lite server for Friendly Captcha","archived":false,"fork":false,"pushed_at":"2024-02-02T10:52:38.000Z","size":49,"stargazers_count":42,"open_issues_count":5,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-01T09:47:39.539Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://friendlycaptcha.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FriendlyCaptcha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-10-23T09:58:56.000Z","updated_at":"2024-02-26T19:55:24.000Z","dependencies_parsed_at":"2024-01-17T11:17:21.747Z","dependency_job_id":"4f5a4768-0576-4f90-b5be-d0ad3540ff5a","html_url":"https://github.com/FriendlyCaptcha/friendly-lite-server","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendlyCaptcha%2Ffriendly-lite-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendlyCaptcha%2Ffriendly-lite-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendlyCaptcha%2Ffriendly-lite-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FriendlyCaptcha%2Ffriendly-lite-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FriendlyCaptcha","download_url":"https://codeload.github.com/FriendlyCaptcha/friendly-lite-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230105996,"owners_count":18173954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T11:12:13.800Z","updated_at":"2024-12-17T11:12:14.307Z","avatar_url":"https://github.com/FriendlyCaptcha.png","language":"PHP","funding_links":["https://github.com/sponsors/FriendlyCaptcha"],"categories":[],"sub_categories":[],"readme":"# friendly-lite-server - Self Hosted Captcha Server, compatible with Friendly Captcha\n\n[**Friendly Captcha**](https://friendlycaptcha.com) offers a privacy aware captcha service. This repository provides a lite server version of the service with some basic features for puzzle and verification on your own machine. The Friendly Captcha service normally works by serving challenges with the difficulty based on the likelihood of being a real human user, as well as being highly available. This implementation is much simpler but will work for small hobby projects.\n\nThis distribution is licensed under a non-commercial source available license, which means you can run this server yourself for non-commercial or internal projects. \n\nIf you need more advanced security features and reliability or want to support our work, we highly recommend to [**subscribe**](https://friendlycaptcha.com/signup)  to the Friendly Captcha service and/or [**sponsor** us on GitHub](https://github.com/sponsors/FriendlyCaptcha).\n\n## Requirements\n\n* PHP 7.4 or higher\n* sodium support\n* apcu support\n\n## Installation\n\nYou need a web server running PHP 7.4 or later.\n\n1. Install the public folder to the your document root.\n2. Copy and adapt Env.template.php to Env.php in classes folder.\n3. Change the friendly captcha widgets endpoint to user your server\n4. In your backend configuration, use the your own server endpoint and\n\n## Endpoints\n\nInstead of `https://api.friendlycaptcha.com/api/v1/siteverify` use `https://yourserver/siteverify.php`.\nInstead of `https://(eu-)api.friendlycaptcha.eu/api/v1/puzzle\"` use `https://yourserver/puzzle.php`. \n\n## Running as Docker Container\n\nYou can also run the server as a docker container. Use the following command to build the container:\n\n```bash\ndocker build -t friendly-lite-server .\n```\n\nThen run the container with the following command:\n\n```bash\ndocker run -d -p 80:80 -e \"SECRET=FILL-YOUR-SECRET-HERE\" -e \"API_KEY=FILL-YOUR-API-KEY-HERE\" friendly-lite-server\n```\n\nAlternatively, use the following `docker-compose` commands:\n\n```bash\ndocker-compose build\ndocker-compose up -d\n```\n\nWhen using Docker, the following environment variables are available:\n\n* `SECRET`: Your secret \n* `API_KEY`: Your api key\n* `LOG_FILE`: Default is `php://stdout`.\n* `SCALING_TTL_SECONDS`: Default is `1800`\n* `EXPIRY_TIMES_5_MINUTES`: Default is `12`\n\n## What works\n\n* Check of signature\n* Check of puzzles\n* Check of timestamps\n* Replay checks\n* Basic difficulty scaling\n\n## Executing tests\n\nTo run the included [PHPUnit](https://phpunit.de/index.html) tests, make sure you have [composer](https://getcomposer.org/) installed. Then run:\n\n```bash\ncomposer install\n./vendor/bin/phpunit\n```\n\nIf you want to execute the [PHPUnit code coverage reporting](https://docs.phpunit.de/en/9.6/textui.html#the-command-line-test-runner), make sure you have [XDebug](https://xdebug.org/docs/install) installed and activated in your PHP CLI ini. You could for example install it via `pecl install xdebug` and then make sure your `/etc/php/x.xx/cli/php.ini` contains a line like `zend_extension=xdebug.so`. Then, to for example create an HTML coverage report, run:\n\n```bash\nXDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-html coverage\n```\n\nYour report will be saved to the `coverage` folder in this example.\n\n## License \n\nThis software is [**fair-code**](http://faircode.io) distributed under [**Apache 2.0 with Commons Attribution Clause**](https://github.com/FriendlyCaptcha/friendly-lite-server/blob/main/LICENSE) license.\n\n## Troubleshooting \n\n### The widget shows an error when loading the puzzle \n\n* Check your server log for errors \n* Open /puzzle.php manually and see if there are any errors displayed\n* Is LibSodium available?\n\n### Captcha is not validated, even generated by the widget itself\n\n* This should not happen, maybe file an issue including the server logs\n\n### Invalid Captchas are accepted (for example form submitted before captcha was solved) \n\n* Friendly Captcha recommends to accept Captcha solutions on server errors, so also here check for server errors\n* Is APCU and LibSodium available?\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriendlycaptcha%2Ffriendly-lite-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffriendlycaptcha%2Ffriendly-lite-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriendlycaptcha%2Ffriendly-lite-server/lists"}