Sorry if this has been posted before I’ve searched around the forums and web and have included a manual solution below.
I followed this guide to be able to renew cert while using Cloudflare:
It works! However, will these renew settings be remembered? Or will I have to manually run this command every 6 months? How can I automate using the DNS preferred challenge? Or is there an easier solution challenge method compatible with Cloudflare and can be auto renewed without having to login to server and run the certbot command?
If you use --manual without a script to perform the authentication, then it can’t be used in an unattended renewal. Therefore, with your current setup you could not get automated renewals.
If you can get or write a script that performs the steps necessary to complete the authentication step (in this case making the appropriate DNS changes for you), you can provide that to Certbot as an --auth-hook and then you can perform automated renewals using that script.
Apparently CloudFlare does have an API, which is for example natively supported by the acme.sh client:
There’s only one other authentication method still supported by Let’s Encrypt, called HTTP-01. This method is based on the ability to post specified files on your web site (which are then accessed via HTTP on port 80). In principle this works behind CloudFlare. It’s supported by the --webroot method in versions of Certbot before 0.21, and by either --webroot or --nginx in Certbot 0.21 and later, among other possibilities.
It’s not included in the official package though, and I don’t think it’s included in certbot-auto too… So how to use it on your system is unclear to me. I installed another DNS plugin on Gentoo with a custum ebuild (which works great), but it’s unlikely you can benefit from that.