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. Invoice Ninja
  3. Automated env configuration destroys InvoiceNinja custom mail configuration on every restart

Automated env configuration destroys InvoiceNinja custom mail configuration on every restart

Scheduled Pinned Locked Moved Invoice Ninja
35 Posts 9 Posters 1.6k Views 9 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.
    • girishG girish

      @foliovision I think there is some confusion as to how Cloudron works. Cloudron packages, whenever possible, will automatically configure both user authentication and email configuration. The idea is to not repeat the same setup over and over again in each app.

      For email, you have to configure Sendgrid in Email section of Cloudron. See https://docs.cloudron.io/email/#relay-outbound-mails . Once you do that, all apps will send email via Sendgrid. For some apps, like those which send bulk email, we have added a provision in the packaging system to say "Do not configure email for this app" . For example, mautic, mailtrain to new a few. But those aside, all apps use the outbound relay of Cloudron mail server.

      In short, you don't need all the cron and other changes. Just have to configure Sendgrid in Email section of Cloudron.

      jdaviescoatesJ Offline
      jdaviescoatesJ Offline
      jdaviescoates
      wrote on last edited by
      #6

      @girish said in Automated env configuration destroys InvoiceNinja custom mail configuration on every restart:

      For some apps, like those which send bulk email, we have added a provision in the packaging system to say "Do not configure email for this app"

      It seems to me the solution to this issue would be to just make that an option that is available on all apps?

      Then @foliovision could just continue to use Cloudron email for most things but turn it off for InvoiceNinja (like you already can on some other apps).

      I use Cloudron with Gandi & Hetzner

      girishG 1 Reply Last reply
      0
      • jdaviescoatesJ jdaviescoates

        @girish said in Automated env configuration destroys InvoiceNinja custom mail configuration on every restart:

        For some apps, like those which send bulk email, we have added a provision in the packaging system to say "Do not configure email for this app"

        It seems to me the solution to this issue would be to just make that an option that is available on all apps?

        Then @foliovision could just continue to use Cloudron email for most things but turn it off for InvoiceNinja (like you already can on some other apps).

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

        @jdaviescoates the option for optional email is added package by package. It's not possible to add it wholesale because it needs changes to each package. But I can add it to invoiceninja.

        jdaviescoatesJ 1 Reply Last reply
        0
        • girishG girish

          @jdaviescoates the option for optional email is added package by package. It's not possible to add it wholesale because it needs changes to each package. But I can add it to invoiceninja.

          jdaviescoatesJ Offline
          jdaviescoatesJ Offline
          jdaviescoates
          wrote on last edited by
          #8

          @girish said in Automated env configuration destroys InvoiceNinja custom mail configuration on every restart:

          @jdaviescoates the option for optional email is added package by package. It's not possible to add it wholesale because it needs changes to each package.

          Perhaps just add it package by package then, as part of the the update cycle? Or not, if it's too much work. Possibly better to so as you currently do and just do it as and when the need arises.

          I use Cloudron with Gandi & Hetzner

          1 Reply Last reply
          0
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #9

            One consideration here is always how much options we support for how many apps. Each such tweak setting causes support tickets and ongoing testing, which takes time away from other things. Its easy to add initially but the long tail will have an impact.

            jdaviescoatesJ foliovisionF 2 Replies Last reply
            1
            • nebulonN nebulon

              One consideration here is always how much options we support for how many apps. Each such tweak setting causes support tickets and ongoing testing, which takes time away from other things. Its easy to add initially but the long tail will have an impact.

              jdaviescoatesJ Offline
              jdaviescoatesJ Offline
              jdaviescoates
              wrote on last edited by jdaviescoates
              #10

              @nebulon said in Automated env configuration destroys InvoiceNinja custom mail configuration on every restart:

              Its easy to add initially but the long tail will have an impact.

              Totally your call, but it seems to me that the impact could actually be less support tickets from all the people who try to change email settings within apps (this seems quite a common thing for people to do, resulting in a fair few threads on here about it) and then find out that doesn't work and get stuck because the app in question doesn't have that option yet 🤷

              I use Cloudron with Gandi & Hetzner

              1 Reply Last reply
              1
              • nebulonN nebulon

                One consideration here is always how much options we support for how many apps. Each such tweak setting causes support tickets and ongoing testing, which takes time away from other things. Its easy to add initially but the long tail will have an impact.

                foliovisionF Offline
                foliovisionF Offline
                foliovision
                wrote on last edited by
                #11

                @nebulon said in Automated env configuration destroys InvoiceNinja custom mail configuration on every restart:

                One consideration here is always how much options we support for how many apps. Each such tweak setting causes support tickets and ongoing testing, which takes time away from other things. Its easy to add initially but the long tail will have an impact.

                Another consideration is the living hell we've been through with our InvoiceNinja instance. This is production financial software and Cloudron is willy-nilly overwriting settings.

                Generally the Cloudron default email setup is unsatisfactory.

                1. Cloudron recommends DigitalOcean as the default server provider.
                2. Maintaining deliverability to large commercial ISP on DigitalOcean IP's is a nightmare/impossible (this is what we tried first, SendGrid only came in later).
                3. Automated setup with SendGrid is not possible.

                This is just tear-your-hair-out-in-frustration open-source-sucks territory.

                Cloudron mysteriously overwriting our email settings has cost us about ten billable hours, disrupted client payments and communication and created a huge amount of stress for eighteen months.

                Overwriting mail settings on every reset is about the craziest thing I've ever heard of. If you want to be this aggressive remove the email settings within the applications or lock them. Or warn us on every restart:

                Your email settings have been overwritten. Please be sure you are happy with the current settings

                and then show the current settings to us.

                This libertarian attitude of it's up to you to know all your tools inside out all of the time, rather than a protect the user attitude, is one of the principal downfalls of open source (along with "make every option visible, fulfill every feature request however obscure").

                There was a guy called Steve Jobs. He pioneered a method of software development which is to make applications and processes user-friendly. I call this way of designing software "intelligent defaults". Wiping email settings on restart is not an intelligent default.

                Cloudron does so much of the plumbing right but this careless attitude towards email is extremely user-unfriendly, neckbeard kind of attitude, which does not fit the rest of what you get right.

                Email must be just right for deliverability in 2023 (in fact any time after about 2018). Without perfect email pipelines, the production use of any communication application becomes a game of Russian roulette.

                Right now there are certainly thousands of other Cloudron users going through frustration with email deliverability and email setup right now. Like us (and we are technically competent), they just don't know how they landed in the email hell they are in.

                1 Reply Last reply
                0
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by
                  #12

                  Sorry if this particular issue caused you so much trouble. We are a very small team maintaining a large platform and a lot of apps with each their own special peculiarities. This is a huge field where we have to strike some balance between the vast use-cases amongst our user base. I doubt we can be compared to a company like Apple and that also not for the price point we have.

                  I am still not quite sure why you can't configure a Cloudron global email relay which will ensure deliverability across the whole system.

                  foliovisionF 1 Reply Last reply
                  1
                  • nebulonN nebulon

                    Sorry if this particular issue caused you so much trouble. We are a very small team maintaining a large platform and a lot of apps with each their own special peculiarities. This is a huge field where we have to strike some balance between the vast use-cases amongst our user base. I doubt we can be compared to a company like Apple and that also not for the price point we have.

                    I am still not quite sure why you can't configure a Cloudron global email relay which will ensure deliverability across the whole system.

                    foliovisionF Offline
                    foliovisionF Offline
                    foliovision
                    wrote on last edited by foliovision
                    #13

                    @nebulon said in Automated env configuration destroys InvoiceNinja custom mail configuration on every restart:

                    I am still not quite sure why you can't configure a Cloudron global email relay which will ensure deliverability across the whole system.

                    1. Yes, we can. But it's a bit finicky with SendGrid. Moreover we only want InvoiceNinja on SendGrid at this point.
                    2. You still shouldn't be erasing people's email settings. This is just wrong. Particularly without actively notifying the user.

                    At the least, any app where you erase the email settings on restart should come up with a big notification on restart right across the screen that email settings have been zeroed with a hint of what to do about it. This would not be difficult to do across all applications as it's easy enough to run a check if email settings match env or not before overwriting them.

                    In terms of the platform and what you maintain, I agree it's a lot. It might be better if there were fewer applications with more robust support. Originally I spun up a Cloudron instance just to demo some open source software for internal use. We now use Cloudron in production. In production, issues like this are considerable friction and let down the user experience.

                    1 Reply Last reply
                    0
                    • necrevistonnezrN Offline
                      necrevistonnezrN Offline
                      necrevistonnezr
                      wrote on last edited by
                      #14

                      Indeed, the documentation at https://docs.cloudron.io/apps/invoiceninja/ suggests you can edit the env file to your liking… At the very least, it should say what settings are not persistent

                      girishG 1 Reply Last reply
                      0
                      • necrevistonnezrN necrevistonnezr

                        Indeed, the documentation at https://docs.cloudron.io/apps/invoiceninja/ suggests you can edit the env file to your liking… At the very least, it should say what settings are not persistent

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

                        @necrevistonnezr Customization within limits 😄

                        I guess we expect users to know to not change authentication, database and email setup in apps directly. These 3 things are integrated into Cloudron since we identified these as 3 painful things to configure again and again when selfhosting apps. Database is very tied to backups, so this is close to impossible to change. Authentication is changeable only at install time. We tried to make this dynamic but couldn't since each app is special when it comes to migrating users from one auth provider to another.

                        Email can may be changable, still thinking about this after this thread. The reason why email is re-configured each time is because if you change domains of an app etc, the email is automatically re-configured on package start. A while ago we implemented the "Leave email configuration to the app" switch. We are open to add this switch to more and more apps as the use cases arise.

                        The original "expectation" that users need to know this has been a problem from day 1 🙂 We even put a splash screen immediately after Cloudron setup, but I think nobody reads those (can't blame them). Suggestions welcome...

                        1 Reply Last reply
                        2
                        • foliovisionF Offline
                          foliovisionF Offline
                          foliovision
                          wrote on last edited by foliovision
                          #16

                          @nebulon Yes, simplification (I'm a fan) is always in conflict with customisation. But come on, the email preferences in InvoiceNinja are so clear and inviting. Billing is exactly the case where one might have special SMTP. Either lock these settings in InvoiceNinja (and show an error message when trying to save with information on where to change the information) or stop overwriting these preferences.

                          My vote in this case would be to stop overwriting the InvoiceNinja email preferences.

                          You have literally made my life much, much worse for two years with these decisions. There's been unnecessary friction with our most important clients due to missing invoices and deliverability issues. Cloudron became as much a source of frustration as joy due to this one issue.

                          Cloudron is not just a toybox at this point. People depend on it for work. Overlooking core issues like overwriting email preferences is no longer the right thing to do if it ever was. Cloudron is not proof-of-concept, it's production software.

                          1 Reply Last reply
                          1
                          • foliovisionF Offline
                            foliovisionF Offline
                            foliovision
                            wrote on last edited by
                            #17

                            To follow up, some applications are just a pain-in-the-neck and are difficult to make work. For instance managing file space on NextCloud. NextCloud never wants to release files and delete them and it's very easy to run out of space and very hard to clear free space. These are complex issues and there are no simple solutions (apart from not running NextCloud which looks like it's probably our next step as the amount of time which goes into admin of NextCloud makes it a losing proposition). @girish was incredibly helpful and at least got us back to the starting line.

                            But in the case of InvoiceNinja, the application works, the preferences work. What was breaking InvoiceNinja was the Cloudron setup, not InvoiceNinja. Cloudron is effectively sabotaging effective work with an important app which does have its act together.

                            robiR 1 Reply Last reply
                            2
                            • foliovisionF foliovision

                              To follow up, some applications are just a pain-in-the-neck and are difficult to make work. For instance managing file space on NextCloud. NextCloud never wants to release files and delete them and it's very easy to run out of space and very hard to clear free space. These are complex issues and there are no simple solutions (apart from not running NextCloud which looks like it's probably our next step as the amount of time which goes into admin of NextCloud makes it a losing proposition). @girish was incredibly helpful and at least got us back to the starting line.

                              But in the case of InvoiceNinja, the application works, the preferences work. What was breaking InvoiceNinja was the Cloudron setup, not InvoiceNinja. Cloudron is effectively sabotaging effective work with an important app which does have its act together.

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

                              @foliovision What was the procedure to properly clean NextCloud files? That might be useful to many here that use it.

                              Conscious tech

                              1 Reply Last reply
                              2
                              • foliovisionF Offline
                                foliovisionF Offline
                                foliovision
                                wrote on last edited by
                                #19

                                First one has to delete the files, then one has to make NextCloud delete the files (NextCloud only hides files), then one has to clean the database.

                                Here's our own notes:

                                We wanted to check what's taking so much space on the server and found the trashed items in NextCloud never seem to disappear. There does not seem to be any setting of NextCloud to do that. So you found a workaround:

                                First I removed content of /home/yellowtent/appsdata/230be9ee-72d6-4c54-8218-b08f8d217666/data/admin/files_trashbin on server
                                Then I run the command on NextCloud console on Cloudron to re-check files for the "admin" user:

                                sudo -u www-data php occ files:scan admin
                                
                                robiR necrevistonnezrN 2 Replies Last reply
                                1
                                • foliovisionF foliovision

                                  First one has to delete the files, then one has to make NextCloud delete the files (NextCloud only hides files), then one has to clean the database.

                                  Here's our own notes:

                                  We wanted to check what's taking so much space on the server and found the trashed items in NextCloud never seem to disappear. There does not seem to be any setting of NextCloud to do that. So you found a workaround:

                                  First I removed content of /home/yellowtent/appsdata/230be9ee-72d6-4c54-8218-b08f8d217666/data/admin/files_trashbin on server
                                  Then I run the command on NextCloud console on Cloudron to re-check files for the "admin" user:

                                  sudo -u www-data php occ files:scan admin
                                  
                                  robiR Offline
                                  robiR Offline
                                  robi
                                  wrote on last edited by
                                  #20

                                  @foliovision is there a setting for nextcloud to not save trash data? Or only keep it for a short time?

                                  Conscious tech

                                  jdaviescoatesJ foliovisionF 2 Replies Last reply
                                  0
                                  • robiR robi

                                    @foliovision is there a setting for nextcloud to not save trash data? Or only keep it for a short time?

                                    jdaviescoatesJ Offline
                                    jdaviescoatesJ Offline
                                    jdaviescoates
                                    wrote on last edited by
                                    #21

                                    @robi yes as per the first link in @foliovision previous post

                                    I use Cloudron with Gandi & Hetzner

                                    1 Reply Last reply
                                    1
                                    • C Offline
                                      C Offline
                                      crazybrad
                                      wrote on last edited by
                                      #22

                                      I am fairly new to the Cloudron ecosystem, so my thoughts on email config may be impractical or not possible. In our experience (using Postmark), segmenting email streams is a desirable approach to improve deliverability. Different applications have different email rates, frequency, and loads and combining them into one outbound stream may be counterproductive.

                                      Email platforms are intentionally vague about limits, best practices, what triggers spam classification, etc. But separating streams, at least in the Postmark ecosystem is their recommendation. My guess is other platforms would prefer that as well.

                                      My suggestion (assuming this was possible) would be to support a global email config (default for all applications), unless an application-specific set of env variables existed. For those people who don't want/need outbound email streams by application, then the single, global email config would handle this. For those needing more, there would be one place in Cloudron to set all the email options, making it easier for us (and the support team) to debug.

                                      1 Reply Last reply
                                      1
                                      • J Offline
                                        J Offline
                                        jagan
                                        wrote on last edited by
                                        #23

                                        The 'Bug' is an important feature. The other perspective is that of users like myself, who appreciate the magic of changing some of the values, say the 'sender email address', and the values in the env file are all automatically updated to reflect the new changed values, and everything just works.

                                        But I understand your frustration if that is something you really don't want, and wish your customised SMTP values were left alone and not overwritten. To be fair, the common-denominator approach that suits most users is what is being followed. There will always be a need for even more customisation as the user base expands to greater degrees of heterogeneity.

                                        1 Reply Last reply
                                        1
                                        • foliovisionF foliovision

                                          First one has to delete the files, then one has to make NextCloud delete the files (NextCloud only hides files), then one has to clean the database.

                                          Here's our own notes:

                                          We wanted to check what's taking so much space on the server and found the trashed items in NextCloud never seem to disappear. There does not seem to be any setting of NextCloud to do that. So you found a workaround:

                                          First I removed content of /home/yellowtent/appsdata/230be9ee-72d6-4c54-8218-b08f8d217666/data/admin/files_trashbin on server
                                          Then I run the command on NextCloud console on Cloudron to re-check files for the "admin" user:

                                          sudo -u www-data php occ files:scan admin
                                          
                                          necrevistonnezrN Offline
                                          necrevistonnezrN Offline
                                          necrevistonnezr
                                          wrote on last edited by necrevistonnezr
                                          #24

                                          @foliovision This is not a general problem but must be specific to your setup. We have more than 100 GB on Nextcloud with various users and our admin folder is less than 16 MB (BTW for others: the uuid is unique, don‘t copy and paste the commands).

                                          @foliovision said in Automated env configuration destroys InvoiceNinja custom mail configuration on every restart:

                                          First one has to delete the files, then one has to make NextCloud delete the files (NextCloud only hides files), then one has to clean the database.

                                          Here's our own notes:

                                          We wanted to check what's taking so much space on the server and found the trashed items in NextCloud never seem to disappear. There does not seem to be any setting of NextCloud to do that. So you found a workaround:

                                          First I removed content of /home/yellowtent/appsdata/230be9ee-72d6-4c54-8218-b08f8d217666/data/admin/files_trashbin on server
                                          Then I run the command on NextCloud console on Cloudron to re-check files for the "admin" user:

                                          sudo -u www-data php occ files:scan admin
                                          
                                          foliovisionF 2 Replies Last reply
                                          0
                                          • necrevistonnezrN necrevistonnezr

                                            @foliovision This is not a general problem but must be specific to your setup. We have more than 100 GB on Nextcloud with various users and our admin folder is less than 16 MB (BTW for others: the uuid is unique, don‘t copy and paste the commands).

                                            @foliovision said in Automated env configuration destroys InvoiceNinja custom mail configuration on every restart:

                                            First one has to delete the files, then one has to make NextCloud delete the files (NextCloud only hides files), then one has to clean the database.

                                            Here's our own notes:

                                            We wanted to check what's taking so much space on the server and found the trashed items in NextCloud never seem to disappear. There does not seem to be any setting of NextCloud to do that. So you found a workaround:

                                            First I removed content of /home/yellowtent/appsdata/230be9ee-72d6-4c54-8218-b08f8d217666/data/admin/files_trashbin on server
                                            Then I run the command on NextCloud console on Cloudron to re-check files for the "admin" user:

                                            sudo -u www-data php occ files:scan admin
                                            
                                            foliovisionF Offline
                                            foliovisionF Offline
                                            foliovision
                                            wrote on last edited by
                                            #25

                                            @necrevistonnezr said in Automated env configuration destroys InvoiceNinja custom mail configuration on every restart:

                                            @foliovision This is not a general problem but must be specific to your setup. We have more than 100 GB on Nextcloud with various users and our admin folder is less than 16 MB (BTW for others: the uuid is unique, don‘t copy and paste the commands).

                                            Okay, I'm annoyed now with myself for agreeing to answer an off-topic question in the conversation about email settings, which is critical. Our NextCloud setup is a test setup, somehow NextCloud managed to tie me into an admin user ID to be able to sync with WebDAV for iPhones to share address books. With individual user it wouldn't work and barely works with admin user. I've wasted days of my life on WebDAV sync for Apple Contacts but that's not the issue here, nor is our NextCloud. The point I was making about NextCloud is that it's a really complex application, whose vagaries are not the Cloudron team's fault. @girish and @nebulon do what they can to make NextCloud viable software (it's not, without serious server admin hours and a fair amount of study).

                                            InvoiceNinja does work out of the box, and that it didn't work for us is mostly the Cloudron admin's team fault with this absolutely ludicrous zero the email setting on every restart.

                                            Every day I think about how absolutely misguided this setup is, the more annoyed I become.

                                            @nebulon, if you are going to zero your users' email settings on every restart, you certainly owe it to them to serve notice every time you do it. But mostly you shouldn't do it.

                                            In fact, this situation is so easy to fix. If email settings have been changed in app, Cloudron has no business at all modifying those settings again. It's so brain-stunned an approach to providing open-source applications, I'm surprised no one has taken Cloudron to task for it before.

                                            I'm not a server admin. I'm an expert on user interface and workflow, who is daily in contact with code and direct development. If Cloudron hopes to make any progress, you will have to improve your workflows and safety rails for people like me to be able to use your systems.

                                            Another weak spot is the backups which always fail even when carefully configured. I had to get help within our office to solve the backups and the programmer in charge had to spend a fair amount of time to make them work with Linode object storage instead of fail and fail and fail again. At least we received notifications about the failed backups. We never got any notifications about how you were screwing with our InvoiceNinja settings and the how and why of it.

                                            Go ahead @nebulon stick your head in the sand and blame user error again. This is a systemic failure, however clever it seems to you to zero people's email settings and/or force us to keep all apps on the same second-rate undeliverable SMTP, or upgrade all of our apps to external high end SMTP which requires a considerable management for subaccounts.

                                            You're not running Microsoft or Apple where you can get away with ruining people's lives (deliberately breaking WebDAV every second OS release which worked fine and according to spec on 10.6.8) and continue to expand your business. This email settings fiasco should come to an active resolution and not just get swept under the carpet again, with "it worked for some people, it's how we've always done it".

                                            It doesn't work and it's extremely user-hostile to erase people's custom settings. One more time, it's extremely user-hostile to erase people's custom settings. Don't do it.

                                            1 Reply Last reply
                                            0
                                            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