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 | Demo | Docs | Install
  1. Cloudron Forum
  2. App Packaging & Development
  3. Wildcard Alias added, but no https

Wildcard Alias added, but no https

Scheduled Pinned Locked Moved App Packaging & Development
9 Posts 4 Posters 112 Views 4 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.
  • S Offline
    S Offline
    sfeldkamp
    wrote last edited by
    #1

    I've added a wildcard alias to the custom app install for the app that I am packaging. It works, entering an address like test2.[app.domain.com] resolves to the app. However, there is no valid security certificate for it.

    I've restarted the app. Is there another step that I need to do? I didn't see anything in the docs.

    Also, is it possible to setup a wildcard alias during app installation? I'd prefer not to ask the user to do this, if possible.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sfeldkamp
      wrote last edited by
      #2

      Oh, my domain is setup with a DNS provider of "Wildcard" domain but the "Let's Encrypt Prod" certificate provider. I probably need to switch that around to a programmatic provider instead.

      timconsidineT 1 Reply Last reply
      0
      • S sfeldkamp

        Oh, my domain is setup with a DNS provider of "Wildcard" domain but the "Let's Encrypt Prod" certificate provider. I probably need to switch that around to a programmatic provider instead.

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

        @sfeldkamp mine works with those settings

        Did you set up AAAA as well as A records ?

        1 Reply Last reply
        0
        • J Offline
          J Offline
          joseph
          Staff
          wrote last edited by
          #4

          Note that your existing wildcard *.blah.com does NOT cover *.foo.blah.com . You have to add another wildcard entry ...

          1 Reply Last reply
          1
          • S Offline
            S Offline
            sfeldkamp
            wrote last edited by
            #5

            I switched to my domain registrar as the provider, connected with an API key, regenerated the certs, and then synced DNS records. Everything seems to be working as I need it to.

            Can anyone answer my second question... Is there a way to setup a domain alias during app installation so the user doesn't have to configure it manually?

            1 Reply Last reply
            0
            • J Offline
              J Offline
              joseph
              Staff
              wrote last edited by
              #6

              @sfeldkamp the API supports it via the aliasDomains property in the domains route but the UI only supports settings the primary domain right now. (not sure if this is what you are asking?)

              1 Reply Last reply
              0
              • S Offline
                S Offline
                sfeldkamp
                wrote last edited by
                #7

                @joseph

                Thank you, I see that here: https://docs.cloudron.io/api.html#tag/Apps/operation/installApp.

                I want to set this value automatically during App Installation. Is there a way to do that using either the CloudronManifest.json file or the Cloudron CLI?

                1 Reply Last reply
                0
                • jamesJ Offline
                  jamesJ Offline
                  james
                  Staff
                  wrote last edited by
                  #8

                  Hello @sfeldkamp

                  You can do this with the cloudron cli or the API.

                  API example based on the Cloudron LAMP app:

                  export ACCESS_TOKEN="YOUR_CLOUDRON_TOKEN"
                  export CLOUDRON_DOMAIN="my.DOMAIN.TLD"
                  
                  curl "https://${CLOUDRON_DOMAIN}/api/v1/apps?access_token=${ACCESS_TOKEN}" \
                    -H 'content-type: application/json' \
                    --data-raw '{"appStoreId":"lamp.cloudronapp.php74@5.0.1","subdomain":"domain1","domain":"cloudron.dev","secondaryDomains":{},"aliasDomains":[{"domain": "cloudron.dev", "subdomain": "domain2"}, {"domain": "cloudron.dev", "subdomain": "*.wildcarddomain"}],"ports":{},"accessRestriction":null}'
                  

                  CLI example based on the Cloudron LAMP app:

                  cloudron install --appstore-id "lamp.cloudronapp.php74@5.0.1" --location "domain1" --alias-domains "domain2,*.wildcarddomain"
                  

                  CLI example for a custom app:
                  Note: I am using the yq tool to get the id and version from the CloudronManifest.json since this is how I also build the docker images for convenience.
                  Info: You need to add "multiDomain": true, to the CloudronManifest.json to enable domain aliases, see: https://docs.cloudron.io/packaging/manifest/#multidomain

                  cloudron install --location $(yq -r .id CloudronManifest.json) --image dr.cloudron.dev/$(yq -r .id CloudronManifest.json):$(yq -r .version CloudronManifest.json) --alias-domains "domain2,*.wildcarddomain"
                  
                  1 Reply Last reply
                  1
                  • S Offline
                    S Offline
                    sfeldkamp
                    wrote last edited by
                    #9

                    I see, I think. I'll try to work the API example into the start.sh script that runs when the app is started.

                    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