Documentation bug: link for setting up cloudflare dns api seems to be dead

I recently got a domain using Cloudflare and have Yunohost installed on a Serverica machine. Everything is set up, but the documentation for the DNS API seems to be broken. The link provided, https://yunohost.org/registar_api_cloudflare, returns a 404 error.

Could you please look into this and correct it? I’m encountering errors when setting up DNS. Although I can search for solutions online, it’s important to fix this so no one else misses anything.
Thank you and happy Saturday.

If you could provide the page where the link is, that would help us a lot

Hello Here is the URL given on the DNS section.
I thought I gave it, but maybe I fat fingered in the forum post. Sorry about that.

You already shared that link but I couldn’t find any reference of it in the documentation. How did you get the link?

Go to your domain section, click on your domain, and then select DNS. You’ll see that your registrar is Cloudflare along with a link to the API documentation. Gandi also provides a similar process which worked last year. I hope this helps.
thanks, happy saturday.

1 Like

In Domain section > Click on your domain > Select DNS
The link provided https://yunohost.org/registar_api_cloudflare still returns a 404 error.


Here are the steps I followed to try to make it work.

  1. Went to https://dash.cloudflare.com/
  2. Went to Manage account > Account API tokens
  3. Clicked on Create token
  4. Selected template : Edit zone DNS
  5. Modified template information :
    Permissions : Zone DNS Edit
    Zone Resources : Include Specific zone mydomain.tld
    Start date : Today
    End date : 1 year or more
  6. Clicked on Continue to summary
  7. Verified information
  8. Clicked on Create Token
  9. Copied DNS API token
  10. Pasted it in Authentication token field in Yunohost (Home > Domains > mydomain.tld)
  11. In Cloudflare, clicked on Account home
  12. Next to my domain, there is 3 vertical dots, I clicked on them
  13. Clicked on Copy zone id
  14. Pasted the zone id in Yunohost zone_id field
  15. :double_exclamation_mark: Left Yunohost auth_username field empty ! Super important steps. That’s what made the connection with API possible !
  16. Clicked on Save
  17. Got a new error ! Yey !

The registrar is not yet configured for domain mydomain.tld.

Halfway there, hang on. :sweat_smile:

You need command line access to your server via SSH :
ssh root@mydomain.tld
or
ssh admin@mydomain.tld
or
ssh root@myLocalIP
or
ssh admin@myLocalIP

  1. Created a new file the registrar config for my domain
    sudo mkdir -p /etc/yunohost/dns/registrars
    sudo nano /etc/yunohost/dns/registrars/mydomain.tld.yml
  2. Pasted the following Cloudflare registrar template into it:
    cloudflare:
    auth_token: MY_CLOUDFLARE_API_TOKEN
    zone_id: MY_ZONE_ID
  3. Replaced :
    MY_CLOUDFLARE_API_TOKEN with my actual token
    MY_ZONE_ID with my actual zone ID from Cloudflare
  4. Then saved (Ctrl+O, Enter, Ctrl+X).
  5. Tested the DNS:
    sudo yunohost domain dns suggest mydomain.tld
  6. Saw the DNS config provided by Yunohost. Yey ! :smiling_face_with_sunglasses:
  7. Restarted Yunohost server

I still have the error :face_with_crossed_out_eyes:

The registrar is not yet configured for domain macaques.ca.

Any idea to solve this ?