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
  • Brite
  • 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 - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. cloudron cli 7.1.0 / instance 9.1.3 login

cloudron cli 7.1.0 / instance 9.1.3 login

Scheduled Pinned Locked Moved Solved Support
11 Posts 3 Posters 102 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.
  • timconsidineT Offline
    timconsidineT Offline
    timconsidine
    App Dev
    wrote last edited by
    #2

    Would it not be easier to support use of a token for cloudron login ?

    % cloudron login --token ffb1bc87d9ef8127f41aae7a7f950xxxxxxxxxxxxxxxxxxxxx --server my.example.uk
    Cloudron Domain (e.g. my.example.com): my.example.uk
    Opening browser for authentication...
    

    Browser involvement seems bit retrograde to me ...

    Indie app dev, scratching my itches, lover of Cloudron PaaS, communityapps.appx.uk

    jamesJ girishG 2 Replies Last reply
    1
    • jamesJ Offline
      jamesJ Offline
      james
      Staff
      wrote last edited by
      #3

      Hello @timconsidine

      Thanks for the report.
      We have to validate this with safari.

      As an alternative method you can generate the ~/.cloudron.json manually with a pre-generated cloudron API token that has read-write access.

      {
        "cloudrons": {
          "default": "my.cloudron.dev",
              "my.cloudron.dev": {
                  "apiEndpoint": "my.cloudron.dev",
                  "token": "$YOUR_TOKEN_GOES_HERE"
              },
        }
      }
      

      Or with a script using jq or yq:

      jq -n '
      {
        cloudrons: {
          default: env.CLOUDRON_DOMAIN,
          (env.CLOUDRON_DOMAIN): {
            apiEndpoint: env.CLOUDRON_DOMAIN,
            token: env.CLOUDRON_TOKEN
          }
        }
      }' > ~/.cloudron.json
      

      or

      yq -n '
      {
        "cloudrons": {
          "default": strenv(CLOUDRON_DOMAIN),
          (strenv(CLOUDRON_DOMAIN)): {
            "apiEndpoint": strenv(CLOUDRON_DOMAIN),
            "token": strenv(CLOUDRON_TOKEN)
          }
        }
      }' > ~/.cloudron.json
      
      1 Reply Last reply
      1
      • timconsidineT timconsidine

        Would it not be easier to support use of a token for cloudron login ?

        % cloudron login --token ffb1bc87d9ef8127f41aae7a7f950xxxxxxxxxxxxxxxxxxxxx --server my.example.uk
        Cloudron Domain (e.g. my.example.com): my.example.uk
        Opening browser for authentication...
        

        Browser involvement seems bit retrograde to me ...

        jamesJ Offline
        jamesJ Offline
        james
        Staff
        wrote last edited by
        #4

        Hello @timconsidine

        @timconsidine said:

        Browser involvement seems bit retrograde to me ...

        Yes and No.
        We had to make this switch to also support passkeys and other future webauthn validations.
        Other tools like npm cli or docker cli have also made the switch to the browser style auth flow.

        timconsidineT 1 Reply Last reply
        2
        • timconsidineT timconsidine

          Would it not be easier to support use of a token for cloudron login ?

          % cloudron login --token ffb1bc87d9ef8127f41aae7a7f950xxxxxxxxxxxxxxxxxxxxx --server my.example.uk
          Cloudron Domain (e.g. my.example.com): my.example.uk
          Opening browser for authentication...
          

          Browser involvement seems bit retrograde to me ...

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote last edited by
          #5

          @timconsidine I published a 7.1.1 which explicitly listens on IPv4. Can you check if that fixes anything? It's probably a Mac issue and not safari specifc. Do you have any more details on the error?

          1 Reply Last reply
          1
          • timconsidineT Offline
            timconsidineT Offline
            timconsidine
            App Dev
            wrote last edited by timconsidine
            #6

            Thanks -@James and @girish
            I held off manual creation of ~/.cloudron.json so as to test 7.1.1

            % sudo npm install -g cloudron
            Password:
            
            changed 60 packages in 3s
            
            17 packages are looking for funding
              run `npm fund` for details
            % cloudron -V
            7.1.1
            % rm ~/.cloudron.json 
            % cloudron login
            Cloudron Domain (e.g. my.example.com): my.example.uk
            Press ENTER to authenticate using the browser...
            

            Browser (Safari) says :

            Safari Can’t Open the Page
            
            Safari can’t open the page “http://localhost:1312/callback?code=TG_GsgNBsyfaY66pc4HsIj7135uFiuY7xvNM896Qwwl&state=24225191912c03d1feae234a7335894e&iss=https%3A%2F%2Fmy.example.uk%2Fopenid”. The error is: “Navigation failed because the request was for an HTTP URL with HTTPS-Only enabled” (WebKitErrorDomain:305)
            

            specifically : Navigation failed because the request was for an HTTP URL with HTTPS-Only enabled” (WebKitErrorDomain:305)

            I don't see anything else in browser dev view console or network.

            Laptop terminal times out with this :

            file:///Users/username/.nvm/versions/node/v25.2.1/lib/node_modules/cloudron/src/helper.js:157
                        reject(new Error('Login timed out after 2 minutes'));
                               ^
            
            Error: Login timed out after 2 minutes
                at Timeout._onTimeout (file:///Users/username/.nvm/versions/node/v25.2.1/lib/node_modules/cloudron/src/helper.js:157:20)
                at listOnTimeout (node:internal/timers:605:17)
                at process.processTimers (node:internal/timers:541:7)
            
            Node.js v25.2.1
            

            Indie app dev, scratching my itches, lover of Cloudron PaaS, communityapps.appx.uk

            1 Reply Last reply
            0
            • jamesJ james

              Hello @timconsidine

              @timconsidine said:

              Browser involvement seems bit retrograde to me ...

              Yes and No.
              We had to make this switch to also support passkeys and other future webauthn validations.
              Other tools like npm cli or docker cli have also made the switch to the browser style auth flow.

              timconsidineT Offline
              timconsidineT Offline
              timconsidine
              App Dev
              wrote last edited by
              #7

              @james said:

              We had to make this switch to also support passkeys and other future webauthn validations.

              cool
              understood

              Indie app dev, scratching my itches, lover of Cloudron PaaS, communityapps.appx.uk

              1 Reply Last reply
              0
              • girishG Offline
                girishG Offline
                girish
                Staff
                wrote last edited by
                #8

                @timconsidine you might have to add localhost as an exception in safari for localhost - https://github.com/orgs/community/discussions/161229 . Could that be the problem? Do you do local development in safari? Wondering why it's not already in the whitelist.

                1 Reply Last reply
                1
                • timconsidineT Offline
                  timconsidineT Offline
                  timconsidine
                  App Dev
                  wrote last edited by
                  #9

                  Wow - thank you so much for taking the time to research like that 🙏
                  Weirdly I could not find how in Safari to do that (embarrassing)
                  So I threw teddy out of pram, closed safari, set Firefox as default, and it worked immediately after pressing ENTER
                  Thank you !
                  Not sure whether I will switch back.
                  I hate Chrome, as an experience but also in principle, don’t really like Firefox and am tired of “also-ran” alternatives.

                  Thanks again for taking the time to solve this 🙏🙏🙏

                  Indie app dev, scratching my itches, lover of Cloudron PaaS, communityapps.appx.uk

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

                    @timconsidine I think probably a better way to implement this was so called Device Authorization Flow . That approach doesn't require callback to localhost. We are looking into implement the cli auth that way instead.

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

                      Device Authorization Flow is implemented in 9.1.4 (will be released shortly). With this, it won't require cors/callback.

                      1 Reply Last reply
                      2
                      • girishG girish has marked this topic as solved

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      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