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 Accessing MongoDB for Rocket.Chat

    Rocket.Chat
    rocket.chat
    4
    8
    520
    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.
    • J
      jegillikin last edited by girish

      I'm trying to edit a specific user but no matter what I do, including trying to grant read or executeFunctions privileges to the user ID in

      env | grep MONGO
      

      I get the same response:

      Error: not authorized on XXX to execute command ...
      

      Is there a magic trick for actually querying the Rocket.Chat database from the Terminal that's not obvious to me?

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

        @jegillikin In the terminal, on the top bar, there is a mongodb button. If you click it, it will paste the command to connect to mongodb. Just press enter and you will land on the mongodb shell. Is that what you are looking for?

        1 Reply Last reply Reply Quote 0
        • J
          jegillikin last edited by

          No. I saw that helpful button and used it successfully to access the Mongo shell. The problem is that within the shell, I get "error: not authorized" messages for pretty much everything except switching DBs and listing containers.

          1 Reply Last reply Reply Quote 0
          • alex-adestech
            alex-adestech last edited by

            Hello. I'm having the same question since I'm new to Cloudron. I added the mongodb addon to the Manifest in a LAMP app, but I still don't know any mongo username and password, and it won't let me create new users or databases 😞

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

              @alex-adestech Are you trying to install a PHP app that uses mongodb?

              1 Reply Last reply Reply Quote 0
              • alex-adestech
                alex-adestech last edited by

                @girish We're making a web app with HTML5, JS and PHP.

                murgero 1 Reply Last reply Reply Quote 0
                • murgero
                  murgero App Dev @alex-adestech last edited by

                  @alex-adestech You should make a new post bud.

                  that said, I believe there is a text file in the LAMP apps /app/data folder that has that information you are looking for.

                  --
                  https://urgero.org
                  ~ Professional Nerd. Freelance Programmer. ~
                  Matrix: @murgero:urgero.org

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

                    @alex-adestech And the web app requires mongodb? I am wondering why you want mongo username and password. But as @murgero pointed out, please create a new thread and we will help you out.

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