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. App Wishlist
  3. Agate+ (dual protocol server to serve gemini/http from one source)

Agate+ (dual protocol server to serve gemini/http from one source)

Scheduled Pinned Locked Moved App Wishlist
29 Posts 5 Posters 172 Views 5 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.
  • nebulonN Offline
    nebulonN Offline
    nebulon
    Staff
    wrote last edited by
    #16

    So while this app being very geeky, it seems to work rather well what @timconsidine has put together. If the individual processes within the app get run by supervisor like in other packages, to avoid just backgrounding them within start.sh I think we can add some basic integration tests and get this published. Especially since it bundles an http server it seems a much better fit for Cloudron out of the box.

    Great job so far!

    L 1 Reply Last reply
    2
    • nebulonN nebulon

      So while this app being very geeky, it seems to work rather well what @timconsidine has put together. If the individual processes within the app get run by supervisor like in other packages, to avoid just backgrounding them within start.sh I think we can add some basic integration tests and get this published. Especially since it bundles an http server it seems a much better fit for Cloudron out of the box.

      Great job so far!

      L Online
      L Online
      LoudLemur
      wrote last edited by
      #17

      @nebulon maybe test integration with goaccess?

      https://goaccess.io/

      1 Reply Last reply
      1
      • L LoudLemur

        @timconsidine The geminauts are going to love your simple solution to making html available!

        I tried the installation just now. and it went well up to a point. It asked where it should be installed, and then this error happened:

        Port GEMINI_PORT: 19
        Failed to install app: 400 message: 19 for GEMINI_PORT is not in permitted range in ports
        
        timconsidineT Offline
        timconsidineT Offline
        timconsidine
        App Dev
        wrote last edited by
        #18

        @LoudLemur sorry, yes, it's broken with come code I am fixing.
        Standy by please

        1 Reply Last reply
        1
        • L LoudLemur

          @timconsidine
          The way this post is titled might be a bit confusing. It sounds like Agate+ is a browser that can visit gemini:// and html:// sites, rather than a gemini server which supports both gemini and html browsers.

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

          @LoudLemur said in Agate+ (dual protocol gemini/http browser):

          The way this post is titled might be a bit confusing.

          err, yes, you're right - will fix somehow

          1 Reply Last reply
          1
          • L LoudLemur

            @timconsidine The geminauts are going to love your simple solution to making html available!

            I tried the installation just now. and it went well up to a point. It asked where it should be installed, and then this error happened:

            Port GEMINI_PORT: 19
            Failed to install app: 400 message: 19 for GEMINI_PORT is not in permitted range in ports
            
            timconsidineT Offline
            timconsidineT Offline
            timconsidine
            App Dev
            wrote last edited by
            #20

            @LoudLemur said in Agate+ (dual protocol gemini/http browser):

            It asked where it should be installed, and then this error happened

            try port 1965 ?
            maybe you had a keyboard moment : 19 is not right

            L 1 Reply Last reply
            0
            • timconsidineT timconsidine

              @LoudLemur said in Agate+ (dual protocol gemini/http browser):

              It asked where it should be installed, and then this error happened

              try port 1965 ?
              maybe you had a keyboard moment : 19 is not right

              L Online
              L Online
              LoudLemur
              wrote last edited by LoudLemur
              #21

              @timconsidine thanks!

              "keyboard moment" ahaha! 🙂

              fails, with conflicting port. (Already have agate running, which perhaps is using port 1965. Try again though on 1966 (when England won the World Cup!) and it works... until it gives an

              App installation error: Installation failed: Unable to pull image docker_registry.domain.tld/cloudron-agate-plus:v2. registry error: {"reason" : "server error"", "statusCode": 500, "json":null}
              

              By the way, this is using the "running multiple instances" method, even though this is the first agate+ instsance.

              1 Reply Last reply
              0
              • DidierMalenfantD DidierMalenfant

                Testing it now...

                • You need a chmod +x cld.sh in the repo.
                • The installation never completes for me. It gets stuck at Waiting for propagation of newsite.malenfant.dev even though the DNS is updated. The app doesn't seem to launch.

                Could be something with the DNS on cloudflare... Log shows:

                Jul 16 17:28:25 box:dns/waitfordns resolveIp: Checking A for newsite.malenfant.dev at 162.159.38.40
                Jul 16 17:28:25 box:dns/waitfordns resolveIp: No A. Checking CNAME for newsite.malenfant.dev at 162.159.38.40
                Jul 16 17:28:25 box:dns/waitfordns isChangeSynced: NS davina.ns.cloudflare.com (162.159.38.40) errored when resolve newsite.malenfant.dev (A): Error: queryCname ENODATA newsite.malenfant.dev
                

                but if I ping newsite.malenfant.dev from the command line it gets resolved correctly... odd.

                Could it be that the domain is hardcoded in cld.sh?

                # Generate self-signed wildcard certificate for all subdomains
                echo "Generating self-signed wildcard certificate for *.appx.uk..."
                # Extract the base domain (appx.uk) from CLOUDRON_APP_DOMAIN
                BASE_DOMAIN="appx.uk"
                WILDCARD_DOMAIN="*.${BASE_DOMAIN}"
                
                timconsidineT Offline
                timconsidineT Offline
                timconsidine
                App Dev
                wrote last edited by
                #22

                @DidierMalenfant I fixed that hard-coding 👍

                I was struggling with self-signed certs for the scenario where a cloudron users wants to deploy multiple instances of agate+, e.g. for different sites on different subdomains. Easy for one domain, not so easy for multiple.

                Cloudrono handles this quite easily, but gemini protocol is quite tight on certs, and my 2nd/3rd test instances were failing.

                So I have to make a wildcard self-signed cert to handle any subdomain like xxxx.example.com.

                There is still some issue, because while xxxx.example.com and zzzz.example.com will be fine under this version, probably aaaa.test.com will not be. Need to do some more testing.

                Uploading fixed file to repo in a mo.

                1 Reply Last reply
                2
                • L Online
                  L Online
                  LoudLemur
                  wrote last edited by
                  #23

                  Tried just now with a new download. we had an error:

                  App is being installed.
                  
                   => Queued ...
                   => Deleting old containers
                   => Registering location agateplus.example.com ................
                   => Downloading image .....................................
                  
                  App installation error: Installation failed: Unable to pull image docker_registry.domain.tld/cloudron-agate-plus:v2. registry error: {"reason":"server error","statusCode":500,"json":null}
                  

                  During the course of testing this, we tried several ports (as it seemed that the default was occupied, perhaps by the previous effort, which was still using it.) We also tried a few sub-domains, as sometimes the port was accepted but the subdomain was already in use eg agateplus.example.com, agateplus2.example.com, agateplus3.example.com.

                  After we eventually manage to get agate+ running, how do we go about closing those ports again and stopping the "phantom" use of the sub-domains, which never worked anyway?

                  timconsidineT 1 Reply Last reply
                  0
                  • L LoudLemur

                    Tried just now with a new download. we had an error:

                    App is being installed.
                    
                     => Queued ...
                     => Deleting old containers
                     => Registering location agateplus.example.com ................
                     => Downloading image .....................................
                    
                    App installation error: Installation failed: Unable to pull image docker_registry.domain.tld/cloudron-agate-plus:v2. registry error: {"reason":"server error","statusCode":500,"json":null}
                    

                    During the course of testing this, we tried several ports (as it seemed that the default was occupied, perhaps by the previous effort, which was still using it.) We also tried a few sub-domains, as sometimes the port was accepted but the subdomain was already in use eg agateplus.example.com, agateplus2.example.com, agateplus3.example.com.

                    After we eventually manage to get agate+ running, how do we go about closing those ports again and stopping the "phantom" use of the sub-domains, which never worked anyway?

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

                    @LoudLemur couple of points raised :

                    1. cloudron only allows one assigned port like 1965 to one app. Once done, it's occupied/blocked. You need to uninstall the deployed app to clear it.
                      From CLI :
                      cloudron uninstall --app app.domain.tld
                      Or from the app dashboard 'Uninstall' option

                    2. you gave a code shot which mentions "agateplus.example.com". I'm guessing you obscure the actual app URL which is fine and wise. But it also refers to a docker registry. That's an example.
                      Just to clarify, did you build the app and deploy it to your registry ?
                      That's necessary for custom apps, and that's probably why the 'unable to pull' message was generated.

                    I am still tweaking the handling of multiple deployments. Cloudron supports it, and agateplus too, but I am resolving some content caching issues.

                    Advice for now is stick to one deployment until I solve the cache issue.

                    1 Reply Last reply
                    0
                    • DidierMalenfantD Offline
                      DidierMalenfantD Offline
                      DidierMalenfant
                      wrote last edited by
                      #25

                      Latest update works! Thanks for the fixes.

                      I'm going to play with it for a bit but I'll leave a few more things I noticed in case you want to address those too:

                      • If you do git add --chmod=+x cld.sh locally you can then commit the executable flag with your repo and skip a step in the README.
                      • The cld.sh script should probably have a set -e line at the top (after the #!/bin/bash) to make sure the script stop executing if something goes wrong with one of the commands.
                      • Currently everything in /app/data is owned by root and I believe agate itself is launched as a root owned app. It's probably safer to make all the files in in /app/data owned by cloudron:cloudron and launch programs with /usr/local/bin/gosu cloudron:cloudron to run as the cloudron user. I might be off here but that was my understanding of recommended behavior looking at the documentation. Someone else can deny or confirm.

                      Great job on the app!

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

                        @DidierMalenfant 👍 Good points, thank you, will get on to them.

                        I'm needing to review deployment of multiple instances as it is not working 100%, but hoping to find a "cunning plan".

                        1 Reply Last reply
                        1
                        • L Online
                          L Online
                          LoudLemur
                          wrote last edited by LoudLemur
                          #27

                          nearly...

                          
                          App installation error: Installation failed: Unable to pull image docker_registry.domain.tld/cloudron-agate-plus:v2. registry error: {"reason":"server error","statusCode":500,"json":null}
                          
                          1 Reply Last reply
                          0
                          • timconsidineT Offline
                            timconsidineT Offline
                            timconsidine
                            App Dev
                            wrote last edited by
                            #28

                            Is that really the address that you’re pulling the image from ? Or you spoofed it to hide the real one in an internet forum (searched and exposed by the great satan google) ?

                            If it’s the real one, it will never work.
                            You need to build the image locally
                            Push it to your docker repo
                            Then pull it from there.

                            L 1 Reply Last reply
                            0
                            • timconsidineT timconsidine

                              Is that really the address that you’re pulling the image from ? Or you spoofed it to hide the real one in an internet forum (searched and exposed by the great satan google) ?

                              If it’s the real one, it will never work.
                              You need to build the image locally
                              Push it to your docker repo
                              Then pull it from there.

                              L Online
                              L Online
                              LoudLemur
                              wrote last edited by
                              #29

                              @timconsidine ha! thanks, tim. will keep trying.

                              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