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. Support
  3. Issue with Cloudflare Domain Installation

Issue with Cloudflare Domain Installation

Scheduled Pinned Locked Moved Solved Support
cloudflaredomains
16 Posts 6 Posters 1.2k Views 6 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 Offline
    I Offline
    ivan-petro
    wrote on last edited by joseph
    #1

    Hi Cloudron Support Team,

    I'm facing an issue when trying to install a Cloudflare domain. I've followed all the steps outlined in your documentation: https://docs.cloudron.io/domains/#dns-providers.

    This feature had been working perfectly for around three years without any issues. However, now when I try to add a Cloudflare domain, the interface returns the following error:
    "Zone not found: 404 'API does not exist'"

    In the Cloudron logs, I see the following entries:

    Jan 31 01:42:49 box:dns/cloudflare upsert: cloudrontestdns.mydomainexample.com for zone mydomainexample.com of type A with values ["192.168.1.1"]  
    Jan 31 01:42:50 box:dns/cloudflare upsert: Updating existing record fqdn: cloudrontestdns.mydomainexample.com, zoneName: mydomainexample.com proxied: false  
    Jan 31 01:42:51 box:dns/cloudflare verifyDomainConfig: Test A record added  
    Jan 31 01:42:52 box:dns/cloudflare del: [{"id":"9c9e0a4db92748e2dfb0fada09e574fc","name":"cloudrontestdns.mydomainexample.com","type":"A","content":"192.168.1.1","proxiable":false,"proxied":false,"ttl":120,"settings":{},"meta":{"auto_added":false,"managed_by_apps":false,"managed_by_argo_tunnel":false},"comment":null,"tags":[],"created_on":"2025-01-30T23:39:21.525284Z","modified_on":"2025-01-30T23:39:21.525284Z"}]  
    Jan 31 01:42:  
    

    Despite this, the interface still shows the error: "Zone not found: 404 'API does not exist'"

    I've checked the API tokens multiple times, and they are correct. Zone permissions are also set correctly. I even tried using the global API key, but the issue persists.

    Could you please advise on how to resolve this?

    Platform Version: v8.2.3 (Ubuntu 22.04.1 LTS)

    Thank you for your support!

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

      @ivan-petro is the cloudrontestdns record still visible in cloudflare dashboard? For some reason, the delete API call returned 404 (invalid api) .

      I 1 Reply Last reply
      0
      • J joseph

        @ivan-petro is the cloudrontestdns record still visible in cloudflare dashboard? For some reason, the delete API call returned 404 (invalid api) .

        I Offline
        I Offline
        ivan-petro
        wrote on last edited by
        #3

        Hi @joseph,

        Yes, the cloudrontestdns record is still visible in the Cloudflare dashboard. The issue occurs after this record is added, and the process fails immediately afterward.

        Here are the current details of the record in the domain's DNS settings:

        Type: A
        Name: cloudrontestdns
        Content: 127.0.0.1 (local IP)
        Proxy Status: DNS only
        TTL: 2 minutes
        

        Please let me know if you need any further details or steps to troubleshoot this.

        Thank you!

        J 1 Reply Last reply
        0
        • I ivan-petro

          Hi @joseph,

          Yes, the cloudrontestdns record is still visible in the Cloudflare dashboard. The issue occurs after this record is added, and the process fails immediately afterward.

          Here are the current details of the record in the domain's DNS settings:

          Type: A
          Name: cloudrontestdns
          Content: 127.0.0.1 (local IP)
          Proxy Status: DNS only
          TTL: 2 minutes
          

          Please let me know if you need any further details or steps to troubleshoot this.

          Thank you!

          J Offline
          J Offline
          joseph
          Staff
          wrote on last edited by
          #4

          @ivan-petro Can you try this curl command

          curl -vX DELETE -H 'Authorization: Bearer yourtoken' https://api.cloudflare.com/client/v4/zones/ZONE_ID/dns_records/9c9e0a4db92748e2dfb0fada09e574fc
          

          You have to fill in yourtoken with the Cloudflare token.

          You have to fill in ZONE_ID . Maybe this is visible somewhere in Cloudflare UI.

          9c9e0a4db92748e2dfb0fada09e574fc is the record id (from the log file you posted). No need to change this.

          1 Reply Last reply
          0
          • I Offline
            I Offline
            ivan-petro
            wrote on last edited by
            #5

            Hi @joseph,

            Yes, I tried the manual API call, and the record was successfully deleted. Here is the result:

            {
              "result": {
                "id": "9c9e0a4db92748e2dfb0fada09e574fc"
              },
              "success": true,
              "errors": [],
              "messages": []
            }
            

            Since the manual API call worked without issues, could it be that Cloudron isn't making the correct API request due to my last migration? I'm not entirely sure how it might be connected, but it's worth mentioning.

            For reference, my last request was posted here: https://forum.cloudron.io/topic/13166/can-t-start-cloudron-service-after-default-data-directory-migration/7

            Currently, all services are functioning properly otherwise.

            Please let me know if there are any further steps to resolve this.

            J 1 Reply Last reply
            0
            • J joseph marked this topic as a question on
            • I ivan-petro

              Hi @joseph,

              Yes, I tried the manual API call, and the record was successfully deleted. Here is the result:

              {
                "result": {
                  "id": "9c9e0a4db92748e2dfb0fada09e574fc"
                },
                "success": true,
                "errors": [],
                "messages": []
              }
              

              Since the manual API call worked without issues, could it be that Cloudron isn't making the correct API request due to my last migration? I'm not entirely sure how it might be connected, but it's worth mentioning.

              For reference, my last request was posted here: https://forum.cloudron.io/topic/13166/can-t-start-cloudron-service-after-default-data-directory-migration/7

              Currently, all services are functioning properly otherwise.

              Please let me know if there are any further steps to resolve this.

              J Offline
              J Offline
              joseph
              Staff
              wrote on last edited by
              #6

              @ivan-petro not sure why this fails in code since the equivalent of the curl call is what the code also does. The code works for my cloudflare test domain, so I am trying to think what else is different. When you did the curl call did you happen to check the http response code? It should be 200 (but according to the error it is getting 404)

              1 Reply Last reply
              0
              • I Offline
                I Offline
                ivan-petro
                wrote on last edited by
                #7

                @joseph , may be something wrong with my Cloudlfare account. Can you give me all API requests that Cloudron did when setup new domain with Cloudflare?
                I will check it manually.

                1 Reply Last reply
                1
                • J Offline
                  J Offline
                  joseph
                  Staff
                  wrote on last edited by
                  #8

                  @ivan-petro Per your logs, all the operations succeeded. Only the delete didn't work. The code essentially makes the same call as the curl I posted. It's not clear to me why the curl can work but Cloudron cannot. This issue is always reproducible or was it temporary? If it's always reprooducible, can you drop us a mail to support@cloudron.io . We can debug this further .

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    sarkriss
                    wrote on last edited by
                    #9

                    Hi there, I have the same exact problem. It's weird, I've setup other Cloudron instances in the past, with no problem at all 😕

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

                      @ivan-petro @sarkriss we found the problem. Cloudflare has recently removed a field from their response! They used to have a zone_id field in the list records API. This field has been removed. This field named zone_id is not in the latest docs - https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/list/#(params) default > (param) comment > (schema) . But it was there back when we wrote the code (almost 6-8 years ago):

                      https://web.archive.org/web/20220308033127/https://api.cloudflare.com/#dns-records-for-a-zone-list-dns-records

                      image.png

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

                        The fix is like this:

                        • Edit /home/yellowtent/box/src/dns/cloudflare.js
                        • Locate the line const zoneId = result[0].zone_id;
                        • Replace the above line with const zoneId = zone.id;
                        • systemctl restart box

                        We will make a new patch release next week with this change.

                        C 1 Reply Last reply
                        3
                        • girishG girish

                          The fix is like this:

                          • Edit /home/yellowtent/box/src/dns/cloudflare.js
                          • Locate the line const zoneId = result[0].zone_id;
                          • Replace the above line with const zoneId = zone.id;
                          • systemctl restart box

                          We will make a new patch release next week with this change.

                          C Offline
                          C Offline
                          CodyS
                          wrote on last edited by
                          #12

                          @girish This fixed my issue I was having setting up my new cloudron server.

                          1 Reply Last reply
                          0
                          • I Offline
                            I Offline
                            ivan-petro
                            wrote on last edited by
                            #13

                            Hi @girish,

                            Thank you for the support! Your solution worked perfectly, and now the domain is successfully added to Cloudron.

                            I'll be waiting for the patch release. Should I revert the manual change in the /home/yellowtent/box/src/dns/cloudflare.js file before updating Cloudron with the patch, or will it be handled automatically during the update?

                            Thanks again for your help!

                            girishG 1 Reply Last reply
                            2
                            • J joseph has marked this topic as solved on
                            • I ivan-petro

                              Hi @girish,

                              Thank you for the support! Your solution worked perfectly, and now the domain is successfully added to Cloudron.

                              I'll be waiting for the patch release. Should I revert the manual change in the /home/yellowtent/box/src/dns/cloudflare.js file before updating Cloudron with the patch, or will it be handled automatically during the update?

                              Thanks again for your help!

                              girishG Offline
                              girishG Offline
                              girish
                              Staff
                              wrote on last edited by
                              #14

                              @ivan-petro It will be part of the next update (8.2.4)

                              1 Reply Last reply
                              1
                              • T Offline
                                T Offline
                                tadeas
                                wrote on last edited by
                                #15
                                This post is deleted!
                                1 Reply Last reply
                                0
                                • girishG Offline
                                  girishG Offline
                                  girish
                                  Staff
                                  wrote on last edited by
                                  #16

                                  For those who hit this 8.2.4 is out . It's marked as unstable just to not have everyone update at the same time but it should be stable and has the fix for this issue.

                                  1 Reply Last reply
                                  3
                                  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