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. Cal.com
  3. ALLOWED_HOSTNAMES environment variable breaks app startup

ALLOWED_HOSTNAMES environment variable breaks app startup

Scheduled Pinned Locked Moved Solved Cal.com
8 Posts 2 Posters 2.1k Views 2 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
    sparkwise
    wrote on last edited by
    #1

    In our Cal.com app logs, I noticed these two lines:

    WARN orgDomains.ts Match of WEBAPP_URL with ALLOWED_HOSTNAME failed ...
    ...
    ALLOWED_HOSTNAMES: []
    

    I modified the env file to specify ALLOWED_HOSTNAMES using the format demonstrated upstream (see .env.example#L64), but this made the app fail on startup.

    I suspect that the issue here may be that the requested list syntax ('"a","b","c"') is somehow getting modified when Cloudron's env file is included in the Cal.com .env file.

    1 Reply Last reply
    1
    • S sparkwise referenced this topic on
    • S Offline
      S Offline
      sparkwise
      wrote on last edited by
      #2

      Noting that this may be part of the problem underlying issue https://forum.cloudron.io/topic/9969/err_invalid_url-upstash-log-entries-sidequest-disable-telemetry-signup

      1 Reply Last reply
      1
      • girishG Do not disturb
        girishG Do not disturb
        girish
        Staff
        wrote on last edited by
        #3

        @sparkwise https://github.com/calcom/cal.com/issues/12201 is the upstream issue (despite closed, the issue exists)

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sparkwise
          wrote on last edited by
          #4

          Problem solved! With these two in my env file, I'm no longer seeing the error messages:
          NEXT_PUBLIC_WEBAPP_URL=https://cal.example.com
          ALLOWED_HOSTNAMES='"example.com","cal.example.com"'
          (I suspect that the first hostname is sufficient on its own. Haven't yet tried removing the second one.)

          1 Reply Last reply
          2
          • nebulonN nebulon marked this topic as a question on
          • nebulonN nebulon has marked this topic as solved on
          • S Offline
            S Offline
            sparkwise
            wrote on last edited by
            #5

            I'm wrong. I see the same 404 reported upstream on user profiles after making this change.

            1 Reply Last reply
            1
            • girishG Do not disturb
              girishG Do not disturb
              girish
              Staff
              wrote on last edited by
              #6

              @sparkwise what's the motivation to set this variable? Does something break when this is not set?

              1 Reply Last reply
              1
              • S Offline
                S Offline
                sparkwise
                wrote on last edited by
                #7

                Nothing specific. I saw the errors in the log, and was curious to see if anything changed or behaved differently after addressing them. I didn't notice any changes, other than the logs being cleaner.

                girishG 1 Reply Last reply
                1
                • S sparkwise

                  Nothing specific. I saw the errors in the log, and was curious to see if anything changed or behaved differently after addressing them. I didn't notice any changes, other than the logs being cleaner.

                  girishG Do not disturb
                  girishG Do not disturb
                  girish
                  Staff
                  wrote on last edited by
                  #8

                  @sparkwise ah yes, that's what made me go down this route earlier as well. Unfortunately, I never found a fix for this. I think it requires some upstream fixes.

                  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