[GH-ISSUE #1869] 💬 [Question] How to configure Captcha, Two Factor and disable debug button #731

Closed
opened 2026-02-25 21:35:46 +03:00 by kerem · 9 comments
Owner

Originally created by @PeopleInside on GitHub (Feb 17, 2026).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1869

Hi, I hope the day is going well.
I open this Question discussion to asking:

  1. How to setup the recaptcha plugin?
    In the .env file I can find two configuration string
RECAPTCHA_SECRET=
RECAPTCHA_SITE_KEY=

but I cannot find documentation or useful text in the readme file about with Recaptcha version is supported: invisibile, check box and version 2 or 3 is supported.

Also if the site and the private key must be inserted between "" or not and how to activate.
I tried to put site key and private key and save but no cappcha is showed on login.

Will be useful a guide or know here what to do to activate.

  1. How setup the two factor plugin?
    In the .env file there is two rows but what to do?
APP_2FA_SECRET=""
APP_2FA_SIMPLE=false

The two factor will be activated for every email address or can be choose with address should have the two factor active? I expect to find a web interface that let me manage two factor but is not.

How it works and how to setup?
I dont find any documentation about this.
https://github.com/cypht-org/cypht/blob/master/modules/2fa/README.md
https://www.cypht.org/developers-documentation/

  1. How to deactivate the footer debug right bottom label?
Image

Thank you

Originally created by @PeopleInside on GitHub (Feb 17, 2026). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1869 Hi, I hope the day is going well. I open this Question discussion to asking: 1. How to setup the [recaptcha plugin](https://github.com/cypht-org/cypht/tree/master/modules/recaptcha)? In the .env file I can find [two configuration string](https://github.com/cypht-org/cypht/blob/c0ccd9100f2c7dd97566777ee7ef3251d1a514b1/.env.example#L216-L217) ``` RECAPTCHA_SECRET= RECAPTCHA_SITE_KEY= ``` but I cannot find [documentation](https://www.cypht.org/developers-documentation/) or useful text in the [readme](https://github.com/cypht-org/cypht/blob/master/modules/recaptcha/README.md) file about with Recaptcha version is supported: invisibile, check box and version 2 or 3 is supported. Also if the site and the private key must be inserted between "" or not and how to activate. I tried to put site key and private key and save but no cappcha is showed on login. Will be useful a guide or know here what to do to activate. 2. How setup the [two factor plugin](https://github.com/cypht-org/cypht/tree/master/modules/2fa)? In the .env file there is [two rows](https://github.com/cypht-org/cypht/blob/c0ccd9100f2c7dd97566777ee7ef3251d1a514b1/.env.example#L148-L149) but what to do? ``` APP_2FA_SECRET="" APP_2FA_SIMPLE=false ``` The two factor will be activated for every email address or can be choose with address should have the two factor active? I expect to find a web interface that let me manage two factor but is not. How it works and how to setup? I dont find any documentation about this. https://github.com/cypht-org/cypht/blob/master/modules/2fa/README.md https://www.cypht.org/developers-documentation/ 3. How to deactivate the footer debug right bottom label? <img width="1279" height="695" alt="Image" src="https://github.com/user-attachments/assets/a01609f4-157e-417c-8287-e22cbe43b0c4" /> Thank you
kerem 2026-02-25 21:35:46 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@PeopleInside commented on GitHub (Feb 17, 2026):

For the Re CAPTCHA I was able to activate but with issues.
For activate the Re Captcha I have to insert Re Captcha V2 with the check box Site Key and Key into the relative line in .env file and also add recaptcha to the following line:
CYPHT_MODULES="core,contacts,local_contacts,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,profiles,imap_folders,sievefilters,tags,history"

So after will be

CYPHT_MODULES="core,contacts,local_contacts,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,profiles,imap_folders,sievefilters,tags,history,recaptcha"

But the CAPTCHA is showed in a wrong place at the page footer instead of under the login form:
It works but who dont know is there will be unable to login.
The position should be fixed this seems to be a bug.
Should I open a separate bug report?
Also some documentation should be added about how to enable it.

Image

<!-- gh-comment-id:3916710236 --> @PeopleInside commented on GitHub (Feb 17, 2026): For the Re CAPTCHA I was able to activate but with issues. For activate the Re Captcha I have to insert Re Captcha V2 with the check box Site Key and Key into the relative line in .env file and also add recaptcha to the [following line](https://github.com/cypht-org/cypht/blob/c0ccd9100f2c7dd97566777ee7ef3251d1a514b1/.env.example#L219): `CYPHT_MODULES="core,contacts,local_contacts,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,profiles,imap_folders,sievefilters,tags,history"` So after will be `CYPHT_MODULES="core,contacts,local_contacts,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,profiles,imap_folders,sievefilters,tags,history,recaptcha"` But the CAPTCHA is showed in a wrong place at the page footer instead of under the login form: It works but who dont know is there will be unable to login. The position should be fixed this seems to be a bug. Should I open a separate bug report? Also some documentation should be added about how to enable it. ![Image](https://github.com/user-attachments/assets/7fd6feab-5f1c-403c-b709-942aae1b75c7)
Author
Owner

@PeopleInside commented on GitHub (Feb 17, 2026):

For activate the two factor I need also add 2fa to the following line:

CYPHT_MODULES="core,contacts,local_contacts,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,profiles,imap_folders,sievefilters,tags,history"

that will be

CYPHT_MODULES="core,contacts,local_contacts,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,profiles,imap_folders,sievefilters,tags,history,2fa"

Then log in with email and going under settings, two factor.
Here I have the issue cannot generate 2 factor QR.

So need go on .env file and on the line
APP_2FA_SECRET=

I need insert a randoom string
APP_2FA_SECRET="randoom_string"

Now it works.
A documentation for this will be not bad.

Now issues remain the bug with Captcha position and how to remove debug on bottom right as showed also in the gif above

<!-- gh-comment-id:3916804975 --> @PeopleInside commented on GitHub (Feb 17, 2026): For activate the two factor I need also add 2fa to the [following line](https://github.com/cypht-org/cypht/blob/c0ccd9100f2c7dd97566777ee7ef3251d1a514b1/.env.example#L219): `CYPHT_MODULES="core,contacts,local_contacts,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,profiles,imap_folders,sievefilters,tags,history"` that will be `CYPHT_MODULES="core,contacts,local_contacts,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,profiles,imap_folders,sievefilters,tags,history,2fa"` Then log in with email and going under settings, two factor. Here I have the issue cannot generate 2 factor QR. So need go on .env file and on the line `APP_2FA_SECRET=` I need insert a randoom string `APP_2FA_SECRET="randoom_string"` Now it works. A documentation for this will be not bad. **Now issues remain the bug with Captcha position and how to remove debug on bottom right as showed also in the gif above**
Author
Owner

@IrAlfred commented on GitHub (Feb 17, 2026):

Great, to remove the debug button you need to run the production version. To generate this use the command

php ./scripts/config_gen.php
<!-- gh-comment-id:3916828849 --> @IrAlfred commented on GitHub (Feb 17, 2026): Great, to remove the debug button you need to run the production version. To generate this use the command ``` php ./scripts/config_gen.php ```
Author
Owner

@PeopleInside commented on GitHub (Feb 17, 2026):

Thank you, I run it but still have debug
Output of the command was:

WARNING: No PHP Memcached support found, Memcached caching or sessions will not work


WARNING: No PHP gnupg support found, The PGP module set will not work if enabled

scanning module core ...
scanning module contacts ...
scanning module local_contacts ...
scanning module ldap_contacts ...
scanning module gmail_contacts ...
scanning module feeds ...
scanning module jmap ...
scanning module imap ...
scanning module smtp ...
scanning module account ...
scanning module idle_timer ...
scanning module desktop_notifications ...
scanning module calendar ...
scanning module themes ...
scanning module nux ...
scanning module developer ...
scanning module profiles ...
scanning module imap_folders ...
scanning module sievefilters ...
scanning module tags ...
scanning module history ...
scanning module recaptcha ...
scanning module 2fa ...
site.css file created
site.js file created
dynamic.php file written
creating production site
copying assets directory...
<!-- gh-comment-id:3916858343 --> @PeopleInside commented on GitHub (Feb 17, 2026): Thank you, I run it but still have debug Output of the command was: ``` WARNING: No PHP Memcached support found, Memcached caching or sessions will not work WARNING: No PHP gnupg support found, The PGP module set will not work if enabled scanning module core ... scanning module contacts ... scanning module local_contacts ... scanning module ldap_contacts ... scanning module gmail_contacts ... scanning module feeds ... scanning module jmap ... scanning module imap ... scanning module smtp ... scanning module account ... scanning module idle_timer ... scanning module desktop_notifications ... scanning module calendar ... scanning module themes ... scanning module nux ... scanning module developer ... scanning module profiles ... scanning module imap_folders ... scanning module sievefilters ... scanning module tags ... scanning module history ... scanning module recaptcha ... scanning module 2fa ... site.css file created site.js file created dynamic.php file written creating production site copying assets directory... ```
Author
Owner

@IrAlfred commented on GitHub (Feb 17, 2026):

great, next step is to copy move the full Cypht directory outside of the document root, and symlink it to your public_html folder using this command

sudo ln -s /yourfolderoutofdocumentroot/cypht/site /var/www/html/cypht
<!-- gh-comment-id:3916878445 --> @IrAlfred commented on GitHub (Feb 17, 2026): great, next step is to ~copy~ move the full Cypht directory outside of the document root, and symlink it to your public_html folder using this command ``` sudo ln -s /yourfolderoutofdocumentroot/cypht/site /var/www/html/cypht ```
Author
Owner

@IrAlfred commented on GitHub (Feb 17, 2026):

The previous command php ./scripts/config_gen.php generated a site/ folder on the root of Cypht directory. Inside, we have the production version

<!-- gh-comment-id:3916883974 --> @IrAlfred commented on GitHub (Feb 17, 2026): The previous command `php ./scripts/config_gen.php` generated a site/ folder on the root of Cypht directory. Inside, we have the production version
Author
Owner

@PeopleInside commented on GitHub (Feb 17, 2026):

Thank you!
I need some AI help to elaborate your reply then I was able to do but a fix is necessary under /site/index.php where the line
define('APP_PATH', 'my/old/cyphtpath');
need to be replaced by
define('APP_PATH', __DIR__ . '/../');

Without this I get error 500 after following your instructions.

Now debug has been removed and the login page works with the captcha in the wrong position :D the recaptcha need a fix or cypht need a fix the position of the recaptcha :)

Thank you!

<!-- gh-comment-id:3917001195 --> @PeopleInside commented on GitHub (Feb 17, 2026): Thank you! I need some AI help to elaborate your reply then I was able to do but a fix is necessary under /site/index.php where the line `define('APP_PATH', 'my/old/cyphtpath');` need to be replaced by `define('APP_PATH', __DIR__ . '/../');` Without this I get error 500 after following your instructions. Now debug has been removed and the login page works with the captcha in the wrong position :D the recaptcha need a fix or cypht need a fix the position of the recaptcha :) Thank you!
Author
Owner

@IrAlfred commented on GitHub (Feb 17, 2026):

@PeopleInside

We will fix the captcha position issue. Thank you again for choosing Cypht Webmail.
Your setup helped us discover a few gaps in the documentation. We will work on these as well.
Please feel free to submit any issues you find. Enjoy Cypht Webmail!

<!-- gh-comment-id:3917033257 --> @IrAlfred commented on GitHub (Feb 17, 2026): @PeopleInside We will fix the captcha position issue. Thank you again for choosing Cypht Webmail. Your setup helped us discover a few gaps in the documentation. We will work on these as well. Please feel free to submit any issues you find. Enjoy Cypht Webmail!
Author
Owner

@PeopleInside commented on GitHub (Feb 17, 2026):

Thank you. I'm closing the question.
If you need track by yourself the Captcha issue.

<!-- gh-comment-id:3917045221 --> @PeopleInside commented on GitHub (Feb 17, 2026): Thank you. I'm closing the question. If you need track by yourself the Captcha issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#731
No description provided.