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. Directus
  3. Directus credentials no longer working

Directus credentials no longer working

Scheduled Pinned Locked Moved Solved Directus
15 Posts 3 Posters 1.4k Views 3 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.
  • I igaudette

    @robi I see a green button "Postgres" and when I click on it, It pastes this in the terminal:

    PGPASSWORD=${CLOUDRON_POSTGRESQL_PASSWORD} psql -h ${CLOUDRON_POSTGRESQL_HOST} -p ${CLOUDRON_POSTGRESQL_PORT} -U ${CLOUDRON_POSTGRESQL_USERNAME} -d ${CLOUDRON_POSTGRESQL_DATABASE}
    

    But I know that Directus backend uses Postgres as database, but this env variable is hardcoded from what I've seen so even if I would like to change it, it's maintained by Cloudron directly.

    I think my issue that I'm unable to log in is related to this environment variable that is missing somehow. Looking forward to the fix from the Cloudron support team.

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

    @igaudette I only suggested to try setting the env var to help you with your password reset from the CLI

    Conscious tech

    I 1 Reply Last reply
    0
    • robiR robi

      @igaudette I only suggested to try setting the env var to help you with your password reset from the CLI

      I Offline
      I Offline
      igaudette
      wrote on last edited by
      #7

      @robi I tried but this hasn't resolved my problem. Thanks for the suggestion tho.

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

        Were there any updates being made to Cloudron or the app between the working timeframe and not? At least there were no package updates from our side at that point. Last directus is from December 19.

        I guess first thing would be to restore the superadmin login, just to rule out OpenID integration, but odd that both stopped working at the same time.

        To run the cli tool for the user subcommand it appears that it requires the DB credentials in a specific way, so export those in the terminal first (just copy and paste them and hit enter) and then run the npx ...:

        export DB_CLIENT="pg" 
        export DB_HOST="$CLOUDRON_POSTGRESQL_HOST"
        export DB_PORT="$CLOUDRON_POSTGRESQL_PORT"
        export DB_DATABASE="$CLOUDRON_POSTGRESQL_DATABASE"
        export DB_USER="$CLOUDRON_POSTGRESQL_USERNAME"
        export DB_PASSWORD="$CLOUDRON_POSTGRESQL_PASSWORD"
        
        I 1 Reply Last reply
        0
        • nebulonN nebulon

          Were there any updates being made to Cloudron or the app between the working timeframe and not? At least there were no package updates from our side at that point. Last directus is from December 19.

          I guess first thing would be to restore the superadmin login, just to rule out OpenID integration, but odd that both stopped working at the same time.

          To run the cli tool for the user subcommand it appears that it requires the DB credentials in a specific way, so export those in the terminal first (just copy and paste them and hit enter) and then run the npx ...:

          export DB_CLIENT="pg" 
          export DB_HOST="$CLOUDRON_POSTGRESQL_HOST"
          export DB_PORT="$CLOUDRON_POSTGRESQL_PORT"
          export DB_DATABASE="$CLOUDRON_POSTGRESQL_DATABASE"
          export DB_USER="$CLOUDRON_POSTGRESQL_USERNAME"
          export DB_PASSWORD="$CLOUDRON_POSTGRESQL_PASSWORD"
          
          I Offline
          I Offline
          igaudette
          wrote on last edited by igaudette
          #9

          @nebulon

          I've been able to change the password using CLI following your commands, however, I'm still unable to log into Directus. Still says wrong username or password.

          b433f0c7-fc85-4ecd-bcc1-8a4d5afafefe-image.png

          I confirm no changes or updates have been made to Cloudron or Directus since the 20th December... and on 27th everything was still working fine.

          1 Reply Last reply
          1
          • I Offline
            I Offline
            igaudette
            wrote on last edited by
            #10

            @nebulon I want to add that the problem only affects the superadmin user... my other users work great! Can we restore the OpenID integration so I can log in via Cloudron and then create a new administrator?

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

              seems like a directus issue itself then if the built-in usermanagement doesn't work. Have you tried to find something upstream or contact them?

              For OpenID I am not sure I understand, what should be restored if it works great? You can probably set one of the cloudron users to be a superadmin in the app via the cli?

              1 Reply Last reply
              0
              • I Offline
                I Offline
                igaudette
                wrote on last edited by igaudette
                #12

                @nebulon Okay I will check on Directus side for the connection issue.

                For OpenID, for some reason I'm unable to log in with my Cloudron admin user.. when I choose "Log in via Cloudron", it says service unavailable.

                image.png

                I have seen in the Cloudron documentation for Directus that Cloudron users inherited automatically the administrator role.. so if I can make the Cloudron integration work, I could create a new administrator user and get my issue fixed quickly.

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

                  Can you login via OpenID from other apps on the Cloudron? If that is the case, maybe something went off in directus itself, as I can't see what else would have changed in that timeframe....maybe you have a backup of that app to clone a new app instance?

                  1 Reply Last reply
                  0
                  • I Offline
                    I Offline
                    igaudette
                    wrote on last edited by
                    #14

                    @nebulon Yes OpenAI works with other app.

                    I've been able to recover my admin account by creating a new admin account using the CLI (Thanks for the steps to follow!)

                    Then I realized my mistake.. in my account profile, I did set the provider to "Cloudron" instead of "Default". It's why I wasn't able to log in back into my account. I switched it back to Default with my new admin account and now I'm able to log in!

                    Thanks again for your support 🙏

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

                      oh glad it worked out in the end.

                      1 Reply Last reply
                      0
                      • nebulonN nebulon marked this topic as a question on
                      • nebulonN nebulon has marked this topic as solved on
                      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