mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 13:05:53 +03:00
[GH-ISSUE #1861] 💬 [Question] Issue on the first use #724
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#724
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @PeopleInside on GitHub (Feb 13, 2026).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1861
💬 Question
Hi, I'm new on Cypht.
I have a VPS where I own some email account.
I'm looking for a web client that support:
In the past I used RainLoop then switched to SnappyMail but now again the software seems to be no more updated.
Cypth seems the solution.
I tried to install on my server by uploading the folders and the first obstacle is the .env generation.
I dont need many settings just want load a webmail interface and login.
I read that I can be helped by the tool https://www.cypht.org/config-generator/ but here there are a lot of settings...
also I prefer run something on my server that insert ReCaptcha keys and other data on an external address as is https://www.cypht.org/config-generator/ - Could this be run locally? How?
With basic settings I need to insert just to be able to login to server email account?
I'm using the Virtualmin panel.
then on SSH root of the app I run composer install
I was able to see the login page on the web interface but I was not able to login with my server email account.
It's actually hard for me be able to use Cypht.
I used software like RainLoop or Snappymail where you upload the folder on the web and follow a web page who guide you into the installation.. then usually when the login page is showed I can login with email and password of emails accounts.
Will be nice to be able to try Cypht... also because there is no online demo.
Thank you for reading and for the time.
@PeopleInside commented on GitHub (Feb 14, 2026):
I given a try some week ago and I started to try the installation today.
Uploaded the folder on the server then tried to configure an .env file from the config generator where I set the follow on the app "tab":
Then on the bottom of the page i click on the green button "Generate .env file", the file is showed for a second or less then the page is refreshed and the page reload with again the standard .env file.
I'm unable to copy so the generated .env file so I'm unable to made a working configuration.
I'm using the updated Brave browser.
Another thing I dont understand is that the app ask for a safe place outside of the public_html for the attachment and user settings dir but the .env file is on the root of the app under the public_html folder and this .env file can include database password for who use it so sensible data. I'm confused as the .env file must be always outside of a public_html.
@jac-ron commented on GitHub (Feb 16, 2026):
Yes, I can confirm the problem with the config generator. But you can edit the
.envfile and change the following settings, then your IMAP login should work:Regarding the
.envinside the document root: as long as you use Apache and it reads.htaccessfiles, it should be protected.@PeopleInside commented on GitHub (Feb 17, 2026):
Thank you for your reply @jac-ron .
The issue is that maybe I not need edit just the piece you mentioned.
I ave to choose if use a database or a file saving... so the mentioned edit I suppose is not the only once necessary to be able to use the app.
As I mentioned I tried but I was not able to use the app and now I have also a confirm that the .env generator is not working.
My server get hacked in the past for an .env file that was accessible. Hackers discovered my email password and started to send spam. Is true that the server should be protected with Apache settings or .htaccess but is not good for security to have the .env file in a public folder access so... I'm asking how much is secure cypht as it have the .env file in the public accessible folder.
Also I was not able to use, impossibile to login and I'm sad because seems is not easy to find a web mail with great features today. there are few abandoned project and some active project that miss for example the reply-to function or a protection on the login.
Cypht seems to have this functions but I was not able to made it work.
Also now the fact the .env file is on an accessible place and also the generator is not working made me thing about security but also looks hard the setup to me.
@IrAlfred commented on GitHub (Feb 17, 2026):
Security and Setup Clarification
Hi @PeopleInside ! Thanks for raising these concerns. I can provide some clarification to the security aspects.
.envfile is secure by design when properly installed1. The
.envFile Security ConcernGood news: Your security concern is actually a non-issue when Cypht is installed correctly.
How Cypht's Architecture Protects
.envCypht's deployment model specifically addresses this concern:
.envfile lives in the source directory (e.g.,/usr/local/share/cypht/)site/subdirectory is symlinked to your web root.envfile is never in the web-accessible pathMultiple Protection Layers
Even if misconfigured, Cypht has defense-in-depth:
Layer 1 -
.htaccessProtection (lines 19-27):Layer 2 - Directory Structure: The
config_gen.phpbuild process creates a separate site/ directory containing only production files. The.envnever gets copied there.Layer 3 -
.gitignore: The.envfile is excluded from version control.Your Previous Server Hack
Your past incident with an exposed
.envhad likely a different protection architecture that placed.envin the document root or had misconfigured server settings. This scenario doesn't apply to Cypht because of its separate source/production architecture.@PeopleInside commented on GitHub (Feb 17, 2026):
Hi, thank you for the reply!
I'm glad about read some security rules are added to the .htaccess file.
My hack issue was present during a migration from a server to a new server with a new control panel and was on a different app.
I learn from this that .env file can be a dangerous configuration file with sensibile data that if a security rule to protect it is missed, the file can be easily be read by just pointing the web address in the browser.
When I download Cypht from GitHub then upload on the hosting the .env file is located on the root folder for the project.
On other application software that I use and that have the .env file usually this is placed outside of the app public folder.
mmm... 🤔 so if Cypht is installed by just uploading folder by FTP will not work? Also edit the .env file present on the main tor folder will not work?
I was not able to made Cypht work. I cannot run the .sh setup file, this is dangerous for me because can edit and create issue on my existing server where I run other application and a control panel.
As there is no setup wizard seems hard or impossibile made Cyphy working.
I was hoping to find how to to here, in this discussion but for now still cannot use.
@no-one commented on GitHub (Feb 17, 2026):
The above-mentioned changes for IMAP should be enough. Don't forget to set the paths for
USER_SETTINGS_DIRandATTACHMENT_DIRcorrectly as well. Also, don't forget to set your document root tocypht/site/and not tocypht/. Maybe you should also setENABLE_REDIS=falseandENABLE_MEMCACHED=falseif you don't use it.@IrAlfred commented on GitHub (Feb 17, 2026):
It will work, but this is not the recommended way to do that. This way your
.envfile is still secured by the .htaccess rules but present in the document root@PeopleInside commented on GitHub (Feb 17, 2026):
Thank you for the reply!
Question 1
Umh how I can set the .env file to be in a different place, to use the .env in a different place that in the root if I'm not using the .sh script?
Question 2
The tool to generate the .env file seems is not working as when click generate never generate a custom .env but it show the standard one after the page reload.
In that configurator and in the default .env file seems to be necessary decide if the app connect to Mysql database or file.
As I cannot use the configurator because is not working, I should not set in the .env file relative settings to use database or a file?
You said I can just made the changes above to the .env file but where the app will store things if I cannot set where the app should save?
I would prefer try to not use a Mysql database, will be nice try to use a file storage outside of the public html folder... but without the generator it's hard to me understand how to setup this in the .env file.
@IrAlfred commented on GitHub (Feb 17, 2026):
Important Clarifications First
Misconception 1: The website "config generator" doesn't create files for you
.env.example) and edit your.envfileMisconception 2: The
.envlocation.envfileSimple 5-Step Setup
Step 1: Place Cypht Source Outside Web Root
Step 2: Install the dependancies and create the database
Step 3: Create and Edit Your
.envFileStep 4: Create Storage Directories
Edit these env variables accordingly in your
.envfileStep 5: Symlink ONLY the site/ directory to web root
After this you can access your Cypht instance from http://example.com/cypht
Here is the full folder structure
/usr/local/share/cypht/ ← Source (NOT web accessible)
├── .env ← Your config (SAFE here)
├── .htaccess ← Extra protection
├── scripts/
├── modules/
├── lib/
└── site/ ← Only this gets exposed!
├── index.php
├── site.js
├── site.css
└── modules/
/var/www/html/
└── cypht → /usr/local/share/cypht/site ← Symlink (web accessible)
/var/lib/hm3/ ← File storage (NOT web accessible)
├── users/ ← User settings files
└── attachments/ ← Email attachments
Answering Your Specific Questions
Q1: "How can I set the .env file to be in a different place?"
envnever enters the web-accessible pathQ2: "The website generator isn't working / creating a custom .env"
A: You're misunderstanding the tool! It's not supposed to create files. It's just a helper to show you the syntax, not an automated installer.
Q3: "Where will the app store things without the generator?"
A: The storage location is set in your
.envfile:@IrAlfred commented on GitHub (Feb 17, 2026):
Please check the full documentation is here https://www.cypht.org/install/
@PeopleInside commented on GitHub (Feb 17, 2026):
Thanks, is not working but I'm closing the issue. I am unable to use cypth
@IrAlfred commented on GitHub (Feb 17, 2026):
Please don't give up so easily...
Would you be available for a brief screenshare session?
The easiest way to coordinate is to send me (or @Baraka24) a Direct Message (DM) on Matrix
@PeopleInside commented on GitHub (Feb 17, 2026):
Thank you for your help ♥️🥰😊