Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Wishlist
  3. Cypht - Lightweight open source webmail application written in PHP and JavaScript

Cypht - Lightweight open source webmail application written in PHP and JavaScript

Scheduled Pinned Locked Moved App Wishlist
44 Posts 16 Posters 7.9k Views 15 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • KubernetesK Offline
    KubernetesK Offline
    Kubernetes
    App Dev
    wrote on last edited by Kubernetes
    #24

    Grmpf.... I am totally lost with getting nginx up and running....

    I receive these error logs:

    root@b64767c7-9e50-475e-9f57-40b454d06b97:/app/code# ./start.sh 
    ==> Starting App
    2024-02-06 17:29:06,821 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
    2024-02-06 17:29:06,824 INFO supervisord started with pid 35
    2024-02-06 17:29:07,829 INFO spawned: 'nginx' with pid 46
    nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (30: Read-only file system)
    2024/02/06 17:29:07 [warn] 46#46: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
    2024/02/06 17:29:07 [emerg] 46#46: mkdir() "/run/client_body" failed (13: Permission denied)
    2024-02-06 17:29:07,863 INFO exited: nginx (exit status 1; not expected)
    

    I don't understand why it still tries to use /var/log/nginx/error.log

    I am using supervisord to start, in nginx.conf the access and error logs are directed to /run . even in the nginx default I refer to /run for the logging.

    I have updated the source in my repo, if someone want to have a look

    girishG 1 Reply Last reply
    1
    • timconsidineT Online
      timconsidineT Online
      timconsidine
      App Dev
      wrote on last edited by timconsidine
      #25

      I'm not sure, so genuine question : does /run/client_body need to be created in the Dockerfile or start.sh ?

      The error log is strange as you have set it explicitly.
      Is this line include /etc/nginx/conf.d/*.conf; including a master conf which overrides the nginx.conf ?
      Not an nginx expoert, just taking guesses.

      KubernetesK 1 Reply Last reply
      2
      • timconsidineT timconsidine

        I'm not sure, so genuine question : does /run/client_body need to be created in the Dockerfile or start.sh ?

        The error log is strange as you have set it explicitly.
        Is this line include /etc/nginx/conf.d/*.conf; including a master conf which overrides the nginx.conf ?
        Not an nginx expoert, just taking guesses.

        KubernetesK Offline
        KubernetesK Offline
        Kubernetes
        App Dev
        wrote on last edited by
        #26

        @timconsidine Thanks for sharing ideas, the path /etc/nginx/conf.d/ is empty

        1 Reply Last reply
        0
        • timconsidineT Online
          timconsidineT Online
          timconsidine
          App Dev
          wrote on last edited by
          #27

          Hmmm.
          I notice that /run/access.log and /run/error.log are owned root:root and are rw-r--r--
          But processes are running as www-data or cloudron ?
          Still just chucking stuff around

          1 Reply Last reply
          1
          • robiR Offline
            robiR Offline
            robi
            wrote on last edited by robi
            #28

            Perhaps it's looking for an environment variable and when not found it uses a default. Set HOME and whatever else nginx looks for with supervisor.

            Conscious tech

            KubernetesK 1 Reply Last reply
            0
            • robiR robi

              Perhaps it's looking for an environment variable and when not found it uses a default. Set HOME and whatever else nginx looks for with supervisor.

              KubernetesK Offline
              KubernetesK Offline
              Kubernetes
              App Dev
              wrote on last edited by
              #29

              @robi I already tried with HOME, didn't help

              robiR 1 Reply Last reply
              0
              • KubernetesK Offline
                KubernetesK Offline
                Kubernetes
                App Dev
                wrote on last edited by Kubernetes
                #30

                Okay, I got one step further after using a symlink in Dockerfile for the error.log

                It seems the document root is still broken, because I get
                Feb 06 20:22:40=> Healtheck error got response status 502

                Okay, this is because of not properly working php

                root@da491a6f-01a2-4d9c-859a-e34799e1c3cf:/app/code# tail -f /run/error.log 
                2024/02/06 19:25:20 [crit] 24#24: *37 connect() to unix:/run/php/php8.1-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 172.18.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.1-fpm.sock:", host: "a101.
                
                1 Reply Last reply
                1
                • KubernetesK Kubernetes

                  Grmpf.... I am totally lost with getting nginx up and running....

                  I receive these error logs:

                  root@b64767c7-9e50-475e-9f57-40b454d06b97:/app/code# ./start.sh 
                  ==> Starting App
                  2024-02-06 17:29:06,821 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
                  2024-02-06 17:29:06,824 INFO supervisord started with pid 35
                  2024-02-06 17:29:07,829 INFO spawned: 'nginx' with pid 46
                  nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (30: Read-only file system)
                  2024/02/06 17:29:07 [warn] 46#46: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
                  2024/02/06 17:29:07 [emerg] 46#46: mkdir() "/run/client_body" failed (13: Permission denied)
                  2024-02-06 17:29:07,863 INFO exited: nginx (exit status 1; not expected)
                  

                  I don't understand why it still tries to use /var/log/nginx/error.log

                  I am using supervisord to start, in nginx.conf the access and error logs are directed to /run . even in the nginx default I refer to /run for the logging.

                  I have updated the source in my repo, if someone want to have a look

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #31

                  @Kubernetes Can you tell me why cypht requires nginx? You can just modphp like other apps no? Atleast, that's what I see from https://www.cypht.org/install.html . Does it not work in the LAMP app?

                  As for apache itself, see cryptpad or discourse or nginx. They have a readonly config for nginx. They configure various paths that nginx wants to write to.

                  KubernetesK 1 Reply Last reply
                  3
                  • girishG girish

                    @Kubernetes Can you tell me why cypht requires nginx? You can just modphp like other apps no? Atleast, that's what I see from https://www.cypht.org/install.html . Does it not work in the LAMP app?

                    As for apache itself, see cryptpad or discourse or nginx. They have a readonly config for nginx. They configure various paths that nginx wants to write to.

                    KubernetesK Offline
                    KubernetesK Offline
                    Kubernetes
                    App Dev
                    wrote on last edited by
                    #32

                    @girish haha, good question! In fact I prefer nginx because I have "more" experience with it than with apache. I got a bit further now, if that keep failing I may change from nginx to apache 🙂

                    1 Reply Last reply
                    1
                    • KubernetesK Kubernetes

                      @robi I already tried with HOME, didn't help

                      robiR Offline
                      robiR Offline
                      robi
                      wrote on last edited by
                      #33

                      @Kubernetes hmm, try some debug set commands https://www.baeldung.com/linux/nginx-log-variable-output

                      this was interesting too:
                      https://www.baeldung.com/linux/nginx-config-environment-variables
                      https://stackoverflow.com/questions/21866477/nginx-use-environment-variables

                      or just stick them in a cyclic memory:2m
                      https://adamtheautomator.com/nginx-logs/

                      Conscious tech

                      1 Reply Last reply
                      0
                      • KubernetesK Offline
                        KubernetesK Offline
                        Kubernetes
                        App Dev
                        wrote on last edited by
                        #34

                        @girish thanks for pointing me to Apache. I was able to get it running now. Next problem is the authentication.

                        1 Reply Last reply
                        2
                        • girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #35

                          If it has IMAP or SMTP auth, use the "email" addon. Like in roundcube - https://git.cloudron.io/cloudron/roundcube-app/-/blob/master/config.inc.php?ref_type=heads#L9

                          1 Reply Last reply
                          3
                          • KubernetesK Offline
                            KubernetesK Offline
                            Kubernetes
                            App Dev
                            wrote on last edited by
                            #36

                            No luck today, now I just get an error from the App that Invalid auth configuration.

                            robiR 1 Reply Last reply
                            0
                            • KubernetesK Kubernetes

                              No luck today, now I just get an error from the App that Invalid auth configuration.

                              robiR Offline
                              robiR Offline
                              robi
                              wrote on last edited by
                              #37

                              @Kubernetes is that a typo in the start.sh?

                              #sed -i "s/^imap_auth_tls=.*/imap_auth_tls=${CLOUDRON_EMAIL_IMAPS_PORT}/" /app/data/hm3.ini

                              IMAP vs IMAPS

                              Conscious tech

                              KubernetesK 1 Reply Last reply
                              0
                              • robiR robi

                                @Kubernetes is that a typo in the start.sh?

                                #sed -i "s/^imap_auth_tls=.*/imap_auth_tls=${CLOUDRON_EMAIL_IMAPS_PORT}/" /app/data/hm3.ini

                                IMAP vs IMAPS

                                KubernetesK Offline
                                KubernetesK Offline
                                Kubernetes
                                App Dev
                                wrote on last edited by Kubernetes
                                #38

                                @robi I think this is okay. In the current state it is not used anyways, because after a change of the .ini a config generation php script needs to be run. So I have to move that to the Docker Image build process, because during runtime it is read-only...

                                1 Reply Last reply
                                0
                                • KubernetesK Offline
                                  KubernetesK Offline
                                  Kubernetes
                                  App Dev
                                  wrote on last edited by Kubernetes
                                  #39

                                  Okay, here we go...

                                  • The Cypht App is using Apache2 to get served.
                                  • The Login (auth) still fails - I have no idea why.
                                  • The PHP Session caching seems to fail in addition.
                                  • The use of redis db doesn't work at the moment.

                                  Some Logs:

                                  [Wed Feb 07 07:51:10.118044 2024] [php:notice] [pid 19] [client 172.18.0.1:51058] Array\n(\n    [0] => Using Hm_PHP_Session with Hm_Auth_IMAP\n    [1] => Using file based user configuration\n    [2] => Using sapi: apache2handler\n    [3] => Request type: HTTP\n    [4] => Request path: /\n    [5] => TLS request: 0\n    [6] => Mobile request: 0\n    [7] => Page ID: home\n    [8] => Using Hm_Cache for cache\n    [9] => Redis connect failed\n    [10] => Memcached enabled but not supported by PHP\n    [11] => CACHE backend using: noop\n    [12] => TRANSLATION NOT FOUND :Cypht powered by Cloudron:\n    [13] => PHP version 8.1.2-1ubuntu2.14\n    [14] => Zend version 4.1.2\n    [15] => Peak Memory: 4096\n    [16] => PID: 19\n    [17] => Included files: 78\n)\n
                                  [Wed Feb 07 07:51:15.862828 2024] [php:notice] [pid 14] [client 172.18.0.1:37006] Array\n(\n    [0] => Using Hm_PHP_Session with Hm_Auth_IMAP\n    [1] => Using file based user configuration\n    [2] => Using sapi: apache2handler\n    [3] => Request type: HTTP\n    [4] => Request path: /\n    [5] => TLS request: 0\n    [6] => Mobile request: 0\n    [7] => Page ID: home\n    [8] => Using Hm_Cache for cache\n    [9] => Redis connect failed\n    [10] => Memcached enabled but not supported by PHP\n    [11] => CACHE backend using: noop\n    [12] => \nDebug Array\n(\n)\n\nResponse Array\n(\n)\n\n    [13] => Invalid IMAP auth configuration settings\n    [14] => Setting cookie: name: hm_msgs, lifetime: 0, path: /, domain: a100.XXXXXX.XXX, secure: , html_only 1\n    [15] => Redirecting to /\n    [16] => PHP version 8.1.2-1ubuntu2.14\n    [17] => Zend version 4.1.2\n    [18] => Peak Memory: 4096\n    [19] => PID: 14\n    [20] => Included files: 77\n)\n, referer: https://a100.XXXXXX.XXX/
                                  [Wed Feb 07 07:51:15.890047 2024] [php:notice] [pid 15] [client 172.18.0.1:37018] Array\n(\n    [0] => Using Hm_PHP_Session with Hm_Auth_IMAP\n    [1] => Using file based user configuration\n    [2] => Using sapi: apache2handler\n    [3] => Request type: HTTP\n    [4] => Request path: /\n    [5] => TLS request: 0\n    [6] => Mobile request: 0\n    [7] => Page ID: home\n    [8] => Using Hm_Cache for cache\n    [9] => Redis connect failed\n    [10] => Memcached enabled but not supported by PHP\n    [11] => CACHE backend using: noop\n    [12] => Deleting cookie: name: hm_msgs, lifetime: 1707288675, path: /, domain: a100.XXXXX.XXX, secure: , html_only 1\n    [13] => TRANSLATION NOT FOUND :Cypht powered by Cloudron:\n    [14] => PHP version 8.1.2-1ubuntu2.14\n    [15] => Zend version 4.1.2\n    [16] => Peak Memory: 4096\n    [17] => PID: 15\n    [18] => Included files: 78\n)\n, referer: https://a100.XXXXXX.XXX/
                                  [Wed Feb 07 07:51:20.097269 2024] [php:notice] [pid 16] [client 172.18.0.1:37028] Array\n(\n    [0] => Using Hm_PHP_Session with Hm_Auth_IMAP\n    [1] => Using file based user configuration\n    [2] => Using sapi: apache2handler\n    [3] => Request type: HTTP\n    [4] => Request path: /\n    [5] => TLS request: 0\n    [6] => Mobile request: 0\n    [7] => Page ID: home\n    [8] => Using Hm_Cache for cache\n    [9] => Redis connect failed\n    [10] => Memcached enabled but not supported by PHP\n    [11] => CACHE backend using: noop\n    [12] => TRANSLATION NOT FOUND :Cypht powered by Cloudron:\n    [13] => PHP version 8.1.2-1ubuntu2.14\n    [14] => Zend version 4.1.2\n    [15] => Peak Memory: 4096\n    [16] => PID: 16\n    [17] => Included files: 78\n)\n
                                  

                                  The Invalid IMAP auth configuration settings error appeared after I removed the 143 imap port from configuration and kept only 9993 for secure imap

                                  When adding 143 again to the hm3.ini I get this error when trying to login:

                                  [Wed Feb 07 08:01:27.837212 2024] [php:notice] [pid 16] [client 172.18.0.1:42946] Array\n(\n    [0] => Using Hm_PHP_Session with Hm_Auth_IMAP\n    [1] => Using file based user configuration\n    [2] => Using sapi: apache2handler\n    [3] => Request type: HTTP\n    [4] => Request path: /\n    [5] => TLS request: 0\n    [6] => Mobile request: 0\n    [7] => Page ID: home\n    [8] => Using Hm_Cache for cache\n    [9] => Redis connect failed\n    [10] => Memcached enabled but not supported by PHP\n    [11] => CACHE backend using: noop\n    [12] => \nDebug Array\n(\n    [0] => Connecting to tls://mail on port 143\n    [1] => Could not connect to the IMAP server\n    [2] => fsockopen errors #111. Connection refused\n)\n\nResponse Array\n(\n)\n\n    [13] => Unable to connect to the IMAP auth server mail\n    [14] => Setting cookie: name: hm_msgs, lifetime: 0, path: /, domain: a100.XXXXXX.XXX, secure: , html_only 1\n    [15] => Redirecting to /\n    [16] => PHP version 8.1.2-1ubuntu2.14\n    [17] => Zend version 4.1.2\n    [18] => Peak Memory: 4096\n    [19] => PID: 16\n    [20] => Included files: 77\n)\n, referer: https://a100.XXXXXX.XXX/
                                  
                                  1 Reply Last reply
                                  2
                                  • KubernetesK Offline
                                    KubernetesK Offline
                                    Kubernetes
                                    App Dev
                                    wrote on last edited by Kubernetes
                                    #40

                                    Heureka! I got it working now after putting 9993 as "normal/unsecure" imap server port config....
                                    I will prepare the easy installer now and then some more people should check if it works correctly - be carefull and use a dummy mailbox - just in case it starts to run wild and delete emails or so!

                                    During my own tests I found following issues:

                                    • SMTP is not working (outgoing email)
                                    • Profile is not saved - after logout the profile is gone

                                    Link to Repo

                                    1 Reply Last reply
                                    5
                                    • robiR Offline
                                      robiR Offline
                                      robi
                                      wrote on last edited by
                                      #41

                                      Excellent, nice work, progress bit by bit!

                                      Conscious tech

                                      1 Reply Last reply
                                      1
                                      • SansGuidonS Offline
                                        SansGuidonS Offline
                                        SansGuidon
                                        wrote on last edited by
                                        #42

                                        I'm interested in having this web mail as an alternative to the existing solutions in Cloudron App Store. Any help needed to package it?

                                        About me / Now

                                        andreasduerenA 1 Reply Last reply
                                        1
                                        • SansGuidonS SansGuidon referenced this topic on
                                        • SansGuidonS SansGuidon

                                          I'm interested in having this web mail as an alternative to the existing solutions in Cloudron App Store. Any help needed to package it?

                                          andreasduerenA Offline
                                          andreasduerenA Offline
                                          andreasdueren
                                          wrote on last edited by
                                          #43

                                          @SansGuidon Looks like you can probably install it in a LAMP app

                                          1 Reply Last reply
                                          2
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search