mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 21:15:56 +03:00
[GH-ISSUE #1154] Can Cypht 2 work on a cPanel account? #588
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#588
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 @rr10 on GitHub (Aug 9, 2024).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1154
Originally assigned to: @Shadow243 on GitHub.
Hi Cypht team,
I am interested in using Cypht Version 2 on a cPanel hosting account. Could you please confirm whether Cypht 2 is compatible with cPanel? If there are specific configurations or limitations that I should be aware of, I would appreciate the guidance.
Thank you!
@marclaporte commented on GitHub (Aug 9, 2024):
Yes, it will install with manual instructions: https://www.cypht.org/install.html
If your cPanel has a one-click Tiki installer, you get Cypht within Tiki: https://doc.tiki.org/Cypht
@rr10 commented on GitHub (Aug 10, 2024):
Thank you so much for your quick response and assistance. I really appreciate the support!
I'm currently having some difficulties proceeding with the installation of Cypht. I created a script that performs various tasks, such as checking PHP and Composer versions, managing files and directories, installing Composer dependencies, and creating the necessary directory structure. The script seems to work correctly, and after it's completed, I can see the application's login page.
However, I'm unsure of which credentials to use for logging in. I tried running
php ./scripts/config_gen.php, and it seems to work without errors. However, when I runphp ./scripts/setup_database.phpafter entering the correct values forDB_HOST,DB_USER, andDB_PASSin the.envfile, I continuously get database connection errors like this:It seems that the script is unable to correctly read the values from the
.envfile. I have double-checked the.envfile, and everything seems to be in order. I also tried running the command manually, but without success.Below is the script I created and used:
Any guidance on how to proceed would be greatly appreciated. Thanks again for all your support!
@marclaporte commented on GitHub (Aug 10, 2024):
Wow! Looks like you did a good part of the job for https://github.com/cypht-org/cypht/issues/17
Please join us on https://gitter.im/cypht-org/community so a Cypht developer can do a screen share with you and make Cypht work for you.
@marclaporte commented on GitHub (Aug 10, 2024):
@Shadow243 please test the script above and advise.
@rr10 commented on GitHub (Aug 10, 2024):
Additionally, I'd like to clarify a specific part of the script that handles the creation of the
hm3directories. Based on the installation guidelines I found on the Cypht website, it appears that it's more secure to place thehm3directory outside of thepublic_htmlfolder. This is what the script does:In this part of the script, the
hm3directory is created inside a folder that is named based on the installation folder. This allows multiple Cypht installations in different folders or subdirectories without conflict, as each installation has its own isolatedhm3directory structure.The folder is created outside of the
public_htmldirectory for security reasons, but within a directory named according to the installation folder. This approach ensures that each installation is separated, and sensitive data remains secure while still being organized based on the installation paths.@Shadow243 commented on GitHub (Sep 30, 2024):
Sorry for this late reply @rr10 , I just tried but i have a composer error, so a suggestion came to me: instead of reporting the error could we instead give a choice: i.e. ask if we want to install composer or cancel the operation or continue like that ?
here is the first answer during the first test

I hade this error:

Installer corruptfromhttps://getcomposer.org/download/when trying to install composer, but after changing allow_url_fopen fromOfftoOn@Shadow243 commented on GitHub (Sep 30, 2024):
@rr10 commented on GitHub (Oct 5, 2024):
@Shadow243 All good, no worries! Feel free to modify the script as you see fit. Have you tested it on a cPanel account or another type of account? For cPanel, PHP extensions need to be installed using EA4. Keep in mind that not everyone has root access to the server, but many providers are usually willing to install PHP or Apache extensions if requested. If you don’t have access to a cPanel account, just let me know and I’ll be happy to assist you.
I believe it would be a good idea to create a specific script for cPanel, perhaps adding it to a repository so that it can be improved over time. Based on the cPanel script, it would then be possible to create scripts for other hosting platforms as well.
@rr10 commented on GitHub (Jan 21, 2025):
@Shadow243 Hi, are there any updates?
@Shadow243 commented on GitHub (Jan 22, 2025):
@rr10 Hi, I’m working on a task that also requires testing with cPanel: https://github.com/cypht-org/cypht/pull/1196. I’ve planned an extensive test to cover everything, and I’m almost ready.
@christer77 commented on GitHub (Mar 20, 2025):
Hi @rr10, @Shadow243
Cypht can actually be installed on cpanl as I did here: https://lab31.evoludata.com/
The important thing is to have access to the terminal of course,
public_html.git clone https://github.com/cypht-org/cypht.gitcompose installcommandhm3" folder in which you will create 3 other folders including "users", "attachments", "app_data".env.example" to ".env", and then open that fileAUTH_TYPE, USER_SETTINGS_DIR, ATTACHMENT_DIR, CYPHT_MODULES)example:
- AUTH_TYPE=DB
- USER_SETTINGS_DIR=/home/departme/public_html/hm3/users
- ATTACHMENT_DIR=/home/departme/public_html/hm3/attachments
- APP_DATA_DIR=/home/departme/public_html/hm3/app_data
- CYPHT_MODULES="core,contacts,local_contacts,carddav_contacts,profiles,imap_folders,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,sievefilters,api_login,recover_settings,hello_world,dynamic_login,inline_message,nasa,highlights,advanced_search,saved_searches,history,wordpress,recaptcha,github,tags,pgp,keyboard_shortcuts,site"
NB: AUTH_TYPE can be IMAP or DB, it depends on your needs.
If you are using IMAP, you will need to provide some 4 additional pieces of information, for example:
- IMAP_AUTH_SERVER=mail.postale.io
- IMAP_AUTH_PORT=993
- IMAP_AUTH_TLS=true
- IMAP_AUTH_SIEVE_CONF_HOST=tls://mail.postale.io
Normally with these few lines, your cypht is ready to use. If you still have problems, don't hesitate to provide them to us if needed, we can always share the screen to cypht community so that we can be more pragmatic.
Thank you.
@Shadow243 commented on GitHub (Mar 20, 2025):
Thanks for the great work @christer77
Did you try to use a different folder at:
USER_SETTINGS_DIR=/home/departme/public_html/hm3/users
another that a public folder ? and rerun the command ? Also imagine you are on an mutual server you don't have root access
@christer77 commented on GitHub (Mar 20, 2025):
Exactly that's the case here.
@Shadow243 commented on GitHub (Mar 20, 2025):
What are the prerequisites? Because if you don't have root access you can't do the sudo command.
And if you give a different path than public_html you must have the required rights.
@christer77 commented on GitHub (Mar 20, 2025):
So you don't necessarily need root access to create a folder in the public_html folder.
Here is an example:
Make sure you have access to your file manager and that you are positioned in public_html.
Then click on
point 1, provide the name"hm3"as shown inpoint 2, and finally, click on thecreate New folder buttonas shown inpoint 3.Once this is done, you will only have to access your terminal and type the command
find ~ -type d -name "hm3";Surely you will have the result like
/home/..../public_html/hm3. And it is this path that should be put at the level of USER_SETTINGS_DIR, ATTACHMENT_DIR, APP_DATA_DIR@Shadow243 commented on GitHub (Mar 20, 2025):
I know that. But what I'm referring to is not creating these folders in public_html but rather in a location other than there. Ex: /usr/bin/cypht
remember we have this command:
at https://www.cypht.org/install/
@Shadow243 commented on GitHub (Mar 20, 2025):
@christer77 I want to understand the limits we can allow ourselves when using cPanel and document everything accordingly.
@christer77 commented on GitHub (Mar 20, 2025):
Great!
Testing is still ongoing. If we encounter any issues, we'll be sure to share them.
Thank you @Shadow243
@Shadow243 commented on GitHub (Mar 20, 2025):
super @christer77
The final goal is to fix this script (https://github.com/cypht-org/cypht/issues/1154#issuecomment-2282192357) if necessary to make it work.
@christer77 commented on GitHub (Apr 24, 2025):
Hello @kroky
Given the difficulty we have in accessing the
var/lib/folder due to the limited access rights to a cPanel account,We thought of creating the 2 folders (
hm3/usersandhm3/attachments) on the root of the cPanel account inpublic_html/hm3instead ofvar/lib/.What would be the security issue on this decision please?
@marclaporte commented on GitHub (Apr 24, 2025):
/home/abc/public_html/hm3/attachments is risky because if there is a misconfiguration, data is visible by anonymous at example.org/hm3/attachments. So the attachments of your private emails can end up indexed by search engines (Google, Bing, Brave, etc.)
/home/abc/public_html/ The Cypht code can go here. Ideally with no data.
And data folders should go somewhere user has permissions but it not accessible to browsers. Ex.:
/home/abc/hm3/users
/home/abc/hm3/attachments
@christer77 commented on GitHub (Apr 24, 2025):
Great,
I'm checking the feasibility against your suggestion.
Thank you @marclaporte
@christer77 commented on GitHub (May 28, 2025):
hello @Shadow243, @rr10, @marclaporte
Can you confirm this resolution and close this issue if necessary please.
@christer77 commented on GitHub (Jul 7, 2025):
Hello @rr10
we are closing this discussion, please reopen it for us if the issue is still occurring.
Here resolution