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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Bitwarden - Self-hosted password manager

    App Wishlist
    20
    218
    42261
    Loading More Posts
    • 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.
    • W
      will @girish last edited by

      @girish Got it, makes sense.

      1 Reply Last reply Reply Quote 0
      • iamthefij
        iamthefij App Dev @will last edited by

        @will Strange. It looks like you're getting some validation issue from bionic-* for some reason. Possibly the clocks are off. Maybe try again? That's not specific to this project.

        It looks like you could reproduce with an new Dockerfile below, or just rebuild the existing one as caching should be in place now.

        FROM cloudron/base:1.0.0@sha256:147a648a068a2e746644746bbfb42eb7a50d682437cead3c67c933c546357617
        RUN apt-get update
        

        Does it work now? If not, check your system clock and timezone.

        W 1 Reply Last reply Reply Quote 0
        • W
          will @iamthefij last edited by

          @iamthefij Ooooh I'm running this from a Fedora WSL 2 VM, does the Cloudron build have Ubuntu dependencies?

          1 Reply Last reply Reply Quote 0
          • W
            will last edited by will

            Interesting note:
            I was using Ubuntu on Windows Subsystem for Linux last night. I performed the following steps:
            01 Installing the App
            $ sudo docker login
            $ sudo cloudron login my.example.com
            $ git clone https://git.cloudron.io/fbartels/bitwardenrs-app
            $ cd bitwardenrs-app
            $ sudo cloudron build
            Enter repository (e.g registry/username/com.github.bitwardenrs): docker-hub-username/docker-hub-public-repo
            $ sudo cloudron install
            Location: bitwarden.example.com

            After that the apps worked in Cloudron, worked great!

            Today I uninstalled the app, and ran through the same steps on a Fedora WSL box, the app deploys, but it seems to not be serving anything. I checked the logs and found this:
            AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.13. Set the 'ServerName' directive globally to suppress this message
            Everything else looks good with the startup of the container. Thoughts?

            If Fedora isn't a supported dev enviroment, I'll swap back over to Ubuntu. Thanks guys!

            EDIT: It was DNS propagation with this issue! It's always DNS....

            1 Reply Last reply Reply Quote 1
            • W
              will last edited by

              Devs,
              What's keeping bitwarden out of the store? Been running the fbartels version all day with no issues that were not my own fault.
              As seemless as any other app that doesn't tie in with Cloudron SSO/LDAP.

              iamthefij 1 Reply Last reply Reply Quote 3
              • girish
                girish Staff last edited by

                @will Mostly, we are just super short on time 😕 To release an app, we need to test the package, write docs, write tests, make sure updates work, make sure we understand packaging, all so that we can support it. Cloudron customers also ask us many app related questions so we have to be in a position to (reasonably) answer them.

                Of course, we can just publish the app and skip all the above. I understand there is a need to "just publish" and we have a great bunch of early adopters here who will put up with all the above. I just spoke to @nebulon about this, we will get unstable package for bitwarden shortly without any of the above.

                1 Reply Last reply Reply Quote 4
                • iamthefij
                  iamthefij App Dev @will last edited by

                  @will just a note, I don't believe fbartels version supports a using a dump for backing up the database. This means that if the backup is taken while the db is in a transaction, it could be corrupted.

                  Bitwarden_rs now supports an admin API for making sqlite backups, but does not have any cron embedded. Similar to the way the LDAP sync tool works, an additional script could be added to periodically make dumps of the sqlite database so that it can be properly backed up.

                  Instead, the version I have is using MySQL, which leverages the native Cloudron backup and restore functionality.

                  That and the LDAP invite service are the real differences between the two forks. If you do not wish to use automated LDAP invites on my fork, you can select to opt out when installing. This is covered in the readme.

                  W 1 Reply Last reply Reply Quote 3
                  • W
                    will @iamthefij last edited by

                    @iamthefij I just havent been able to get yours going using the steps I posted above

                    iamthefij 1 Reply Last reply Reply Quote 0
                    • iamthefij
                      iamthefij App Dev @will last edited by

                      @will Which thing is failing? Building still works for me, even if I clear my cache. Make sure you do a git pull though. It looks like your build command is using the single build Dockerfile rather than the multi-phase one.

                      W 1 Reply Last reply Reply Quote 1
                      • W
                        will @iamthefij last edited by

                        @iamthefij How do I use the multi stage dockerfile?

                        1 Reply Last reply Reply Quote 0
                        • girish
                          girish Staff last edited by

                          It seems people are struggling to build. @iamthefij if you have your docker image public, you can just put it here. People can then install it as:

                          cloudron install --image <image> # run this in the repo directory
                          

                          No need to build!

                          iamthefij 1 Reply Last reply Reply Quote 1
                          • iamthefij
                            iamthefij App Dev @girish last edited by

                            @girish good idea. Here's my build: https://hub.docker.com/r/iamthefij/cloudron-app-bitwarden

                            @will The multi-stage build should be default if you've pulled the latest. Dockerfile should be a symblink to the multi-stage one.

                            1 Reply Last reply Reply Quote 0
                            • girish
                              girish Staff last edited by girish

                              thanks @iamthefij

                              For those looking to install this:

                              $ git clone ssh://git@git.cloudron.io:6000/iamthefij/bitwardenrs-app.git
                              $ cd bitwardenrs-app
                              $ cloudron install --image iamthefij/cloudron-app-bitwarden:0.3.0
                              

                              Aaaannd it's running:

                              testing.png

                              After installing, both my users got an invite to join bitwarden. Very cool.

                              jdaviescoates yusf W 3 Replies Last reply Reply Quote 2
                              • jdaviescoates
                                jdaviescoates @girish last edited by

                                @girish any reason not to have this in the app store as unstable? I'm assuming the only thing keeping for being officially released are tests need to be written etc?

                                I use Cloudron with Gandi & Hetzner

                                1 Reply Last reply Reply Quote 1
                                • yusf
                                  yusf @girish last edited by

                                  @girish said in Bitwarden - Self-hosted password manager:

                                  After installing, both my users got an invite to join bitwarden

                                  Like, automatically?

                                  1 Reply Last reply Reply Quote 1
                                  • girish
                                    girish Staff last edited by

                                    @jdaviescoates Yes, tests plus making sure we can actually maintain it in the long run (for example, if everything is pinned properly in the docker file, things like that). Usually, @nebulon and also do a round of manual testing and put some basic docs before putting it in unstable.

                                    @yusf yes, both users got the invite automatically.

                                    jdaviescoates 1 Reply Last reply Reply Quote 1
                                    • jdaviescoates
                                      jdaviescoates @girish last edited by

                                      @girish said in Bitwarden - Self-hosted password manager:

                                      @yusf yes, both users got the invite automatically.

                                      I'm guessing perhaps @yusf was asking because what if you don't want to invite all users automatically?

                                      I use Cloudron with Gandi & Hetzner

                                      yusf 1 Reply Last reply Reply Quote 1
                                      • yusf
                                        yusf @jdaviescoates last edited by

                                        @jdaviescoates Namesake reads my mind.

                                        jdaviescoates 1 Reply Last reply Reply Quote 1
                                        • jdaviescoates
                                          jdaviescoates @yusf last edited by

                                          @yusf 🙂 heh, I only just realised Yusf is obviously Yussef which of course is the same as Josef 😊

                                          I use Cloudron with Gandi & Hetzner

                                          1 Reply Last reply Reply Quote 1
                                          • iamthefij
                                            iamthefij App Dev last edited by

                                            When installing, uncheck SSO.

                                            yusf 1 Reply Last reply Reply Quote 0
                                            • yusf
                                              yusf @iamthefij last edited by

                                              @iamthefij I haven't followed the thread continously but is there a specific reason for emailing all users who are granted access to the app through the SSO?

                                              iamthefij 1 Reply Last reply Reply Quote 1
                                              • iamthefij
                                                iamthefij App Dev @yusf last edited by

                                                @yusf Yea, the Readme describe the reasoning.

                                                There is no way to actually do true SSO without breaking the model for Bitwarden. The only thing that we can do is automatically invite users to sign up.

                                                The Bitwarden_rs project doesn't have a way to invite without sending an email as when an SMTP server is configured, it will generate unique invite links for each user.

                                                If you disable SSO, you only disable the auto-invite feature. You will then need to invite yourself via the Admin panel (admin token is echoed in the logs and in /app/data/admin_token). You can then invite anyone else you wish manually.

                                                W 1 Reply Last reply Reply Quote 3
                                                • necrevistonnezr
                                                  necrevistonnezr last edited by

                                                  Is there a reliable way to move from Bitwarden SQLite (fbartels build) to Bitwarden MySQL (iamthefij build) including all attachments?

                                                  1 Reply Last reply Reply Quote 0
                                                  • W
                                                    will @girish last edited by will

                                                    This post is deleted!
                                                    1 Reply Last reply Reply Quote 0
                                                    • W
                                                      will @iamthefij last edited by

                                                      @iamthefij I can't login to the admin page. It keeps saying "invalid token"
                                                      I did a fresh boot of the container, copied everything between access token= and HTTP/1.1"
                                                      access_token= copied this giberish HTTP/1.1"

                                                      Thoughts?

                                                      1 Reply Last reply Reply Quote 0
                                                      • nebulon
                                                        nebulon Staff last edited by

                                                        Just to inform everyone here, today I've created a new gitlab project for this app package repo wise, based on @iamthefij version, however without relying on external dockerimages being mounted during app image building. The repo is at https://git.cloudron.io/cloudron/bitwardenrs

                                                        One thing I wanted to ask here is, how to deal with ldap sync. Generally this works currently by a cron job running every now and then, checking availalbe users on ldap and then will invite all users, which are not yet invited to the app instance. This has the current annoying thing, where if an admin wants to first try bitwarden on the Cloudron and does not restrict access during installation, the app will send out invites to all users. Since this is the default flow, I don't want to publish the app package like that. On the other hand I do see value in those invites being sent out at the point where the admin decides this app is good to be used.
                                                        To not delay any package release further, we could avoid this topic by packaging it first without ldap, but I wanted to collect some feedback on this here in the thread first. It would be great if you all could share your ideal flow regarding this and maybe explain the use-cases briefly.

                                                        Thanks! And even more thanks to @iamthefij for all the work done on the package already! 😄

                                                        W iamthefij d19dotca 3 Replies Last reply Reply Quote 5
                                                        • W
                                                          will @nebulon last edited by

                                                          @nebulon My view is if it does not have "full" ldap, ldap should be taken out and left up to the admin to manage by hand, such as it is with other apps, like Ghost, or Monica.

                                                          1 Reply Last reply Reply Quote 4
                                                          • iamthefij
                                                            iamthefij App Dev @nebulon last edited by

                                                            @nebulon yea, the best for Cloudron would be a way to silently invite so only ldap users could sign up. Maybe I’ll make that suggestion over at the main project.

                                                            I feel that would make a much better experience for users and admins here.

                                                            What I did was install it scoped to only my user and then expanded the users to a group later.

                                                            1 Reply Last reply Reply Quote 2
                                                            • d19dotca
                                                              d19dotca @nebulon last edited by

                                                              @nebulon I'm not certain why this app would be unique in that when it's setup it just immediately sends out invites to everyone possible. Seems very strange to have it work that way.

                                                              Not sure if it's possible, but I think my ideal vision of it is that when we select an LDAP group for authentication, it will allow those users access / send an invite once they attempt the first login from an allowed group, but otherwise it would not auto-invite anybody.

                                                              And if that can't be done then I'd prefer it just be a manual invite or even "app managed" instead like Invoice Ninja or something where you don't need to have LDAP be the authenticator for the app and can manage it fully inside the app itself instead.

                                                              Hopefully I didn't misunderstand the situation and question. 👼 haha

                                                              --
                                                              Dustin Dauncey
                                                              www.d19.ca

                                                              1 Reply Last reply Reply Quote 0
                                                              • nebulon
                                                                nebulon Staff last edited by

                                                                @d19dotca yes that would be nice to only send invites upon user login attempt, or even better to not send invites but just allow users in that LDAP group to signup normally. However currently this is not possible with the upstream app. So my suggestion is to polish the app package now without any LDAP, since it is confusing currently and just get it pulished. We can always add LDAP once the flow is more obvious and straightforwards.

                                                                d19dotca 1 Reply Last reply Reply Quote 5
                                                                • d19dotca
                                                                  d19dotca @nebulon last edited by

                                                                  @nebulon Ah okay, didn’t realize it was an app limitation rather than a packaging limitation. In that case then I would definitely prefer it be pushed without LDAP support (so app-managed) and we can add LDAP support at a later time when the app will allow a better workflow.

                                                                  --
                                                                  Dustin Dauncey
                                                                  www.d19.ca

                                                                  1 Reply Last reply Reply Quote 0
                                                                  • nebulon
                                                                    nebulon Staff last edited by

                                                                    I will lock this thread as we have published the initial app package now: https://forum.cloudron.io/topic/2372/bitwarden_rs

                                                                    1 Reply Last reply Reply Quote 3
                                                                    • First post
                                                                      Last post
                                                                    Powered by NodeBB