<p>In my previous guide on dehydrated&comma; <a href&equals;"https&colon;&sol;&sol;www&period;aaflalo&period;me&sol;2016&sol;09&sol;dehydrated-bash-client-lets-encrypt&sol;">the bash client for let&&num;8217&semi;s encrypt<&sol;a>&comma; I&&num;8217&semi;ve only touched on the DNS-01 feature&period; Upon further investigation and usage of said feature I give you this guide&period;<&sol;p>&NewLine;<h1>DNS-01<&sol;h1>&NewLine;<p>DNS-01 is another type of verification of ownership of a domain using TXT DNS records&period; To use this validation you need to set a specific TXT record &lpar;<code class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"null">&lowbar;acme-challenge<&sol;code>&rpar; on your domain to indicate the verification server that you own the domain&period;<&sol;p>&NewLine;<h2>Records<&sol;h2>&NewLine;<p>When generating a certificate for your main domain&comma; you only need to set the TXT record with the given let&&num;8217&semi;s encrypt challenge&period; However&comma; if you want to generate a certificate for a subdomain&comma; you need to set 2 TXT records&colon; one for your main domain and one for your sub-domain since you still need to prove let&&num;8217&semi;s encrypt that you have ownership to the main domain&period;<&sol;p>&NewLine;<h3>Example<&sol;h3>&NewLine;<p><sub>For the sake of the example&comma; I&&num;8217&semi;m using BIND syntax&period;<&sol;sub><&sol;p>&NewLine;<p>I want to verify <code class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"null">example&period;com<&sol;code> I set the correct challenge on the domain with the TXT record where XXXXXXXX is the challenge&period;<&sol;p>&NewLine;<pre class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"null">&lowbar;acme-challenge IN TXT XXXXXXXXXXXXXXXXXX<&sol;pre>&NewLine;<p>Now if I want to do it for <code class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"null">test&period;example&period;com<&sol;code><&sol;p>&NewLine;<pre class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"null">&lowbar;acme-challenge&period;test IN TXT XXXXXXXXXXXXXXX<&sol;pre>&NewLine;<h1>Tutorial<&sol;h1>&NewLine;<p>Now that I&&num;8217&semi;ve covered the base about the DNS-01&comma; we can dive into using <a href&equals;"https&colon;&sol;&sol;github&period;com&sol;lukas2511&sol;dehydrated&sol;">Dehydrated<&sol;a>&comma; <a href&equals;"https&colon;&sol;&sol;www&period;cloudflare&period;com&sol;">Cloudflare<&sol;a> and <a href&equals;"https&colon;&sol;&sol;github&period;com&sol;AnalogJ&sol;lexicon">lexicon<&sol;a> to set DNS-01 as the verification method&period;<&sol;p>&NewLine;<p>If you need more information about Dehydrated&comma; don&&num;8217&semi;t hesitate to read <a href&equals;"https&colon;&sol;&sol;www&period;aaflalo&period;me&sol;2016&sol;09&sol;dehydrated-bash-client-lets-encrypt&sol;">my previous article on it<&sol;a>&period;<&sol;p>&NewLine;<h2>Lexicon<&sol;h2>&NewLine;<p>Lexicon is a great python script that takes care of DNS management for a lot of providers like Namecheap&comma; CloudFlare&comma; DigitalOcean&comma; etc &&num;8230&semi; the list is huge&comma; and the software is easy to uses&period;<&sol;p>&NewLine;<div class&equals;"reposidget">&NewLine; <header class&equals;"fontello">&NewLine; <span class&equals;"fontello info"><a href&equals;"https&colon;&sol;&sol;github&period;com&sol;myst729&sol;wp-reposidget" target&equals;"&lowbar;blank">GitHub Reposidget for WordPress<&sol;a><&sol;span>&NewLine; <h2>&NewLine; <a href&equals;"https&colon;&sol;&sol;github&period;com&sol;AnalogJ">AnalogJ<&sol;a>&NewLine; <span> &sol; <&sol;span>&NewLine; <a href&equals;"https&colon;&sol;&sol;github&period;com&sol;AnalogJ&sol;lexicon"><strong>lexicon<&sol;strong><&sol;a>&NewLine; <&sol;h2>&NewLine; <&sol;header>&NewLine; <section>&NewLine; <p class&equals;"">Manipulate DNS records on various DNS providers in a standardized way&period; <&sol;p>&NewLine; <p class&equals;"hidden homepage"><a href&equals;"https&colon;&sol;&sol;github&period;com&sol;AnalogJ&sol;lexicon"><strong>https&colon;&sol;&sol;github&period;com&sol;AnalogJ&sol;lexicon<&sol;strong><&sol;a><&sol;p>&NewLine; <&sol;section>&NewLine; <footer>&NewLine; <span class&equals;"fontello star">1&comma;511<&sol;span><span class&equals;"fontello fork">304<&sol;span>&NewLine; <a class&equals;"" href&equals;"https&colon;&sol;&sol;github&period;com&sol;AnalogJ&sol;lexicon&sol;archive&sol;master&period;zip">Download ZIP<&sol;a>&NewLine; <&sol;footer>&NewLine;<&sol;div>&NewLine;<h3>Cloudflare<&sol;h3>&NewLine;<p>Since I used CloudFlare for my domain&comma; I&&num;8217&semi;m covering this part&comma; but the lexicon repository has guides for all different providers and how to use their command line&period; You would only need to edit the lexicon command in my hooks&period;sh file to make it work with your desired provider&period;<&sol;p>&NewLine;<p>To start&comma; install lexicon using pip&period;<&sol;p>&NewLine;<p><code class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"null">pip3 install dns-lexicon<&sol;code><&sol;p>&NewLine;<p>For CloudFlare to work&comma; you&&num;8217&semi;ll need to fetch your API key&semi; it&&num;8217&semi;s in the settings of your CloudFlare account&period;<&sol;p>&NewLine;<h4>Command-line example<&sol;h4>&NewLine;<p>Taken from the lexicon repository<&sol;p>&NewLine;<pre class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"shell">&num; setup provider environmental variables&colon; &NewLine;LEXICON&lowbar;CLOUDFLARE&lowbar;USERNAME&equals;"myusername&commat;example&period;com" &NewLine;LEXICON&lowbar;CLOUDFLARE&lowbar;TOKEN&equals;"cloudflare-api-token" &NewLine; &NewLine;&num; list all TXT records on cloudflare &NewLine;lexicon cloudflare list example&period;com TXT &NewLine; &NewLine;&num; create a new TXT record on cloudflare &NewLine;lexicon cloudflare create www&period;example&period;com TXT --name&equals;"&lowbar;acme-challenge&period;www&period;example&period;com&period;" --content&equals;"challenge token" &NewLine; &NewLine;&num; delete a TXT record on cloudflare &NewLine;lexicon cloudflare delete www&period;example&period;com TXT --name&equals;"&lowbar;acme-challenge&period;www&period;example&period;com&period;" --content&equals;"challenge token" &NewLine;lexicon cloudflare delete www&period;example&period;com TXT --identifier&equals;"cloudflare record id"<&sol;pre>&NewLine;<p>As you can see&comma; the commands are straightforward&period;<&sol;p>&NewLine;<h2>Dehydrated<&sol;h2>&NewLine;<p>Now that we covered the commands to use in Lexicon&comma; let&&num;8217&semi;s continue with the configuration of dehydrated&period;<&sol;p>&NewLine;<h3>Hooks<&sol;h3>&NewLine;<p>We&&num;8217&semi;ll create a hooks file to use Lexicon to setup the DNS records and remove them when they aren&&num;8217&semi;t needed anymore&period; I advise creating a <code class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"null">hooks&period;sh<&sol;code> file that you&&num;8217&semi;ll put alongside your configuration file&period;<&sol;p>&NewLine;<pre class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"shell">&num;&excl;&sol;usr&sol;bin&sol;env bash &NewLine; &NewLine;export LEXICON&lowbar;CLOUDFLARE&lowbar;USERNAME&equals;"example&commat;example&period;com" &NewLine;export LEXICON&lowbar;CLOUDFLARE&lowbar;TOKEN&equals;"cloud-flare-token" &NewLine; &NewLine;tld&lowbar;domain&lpar;&rpar; &lbrace; &NewLine; local DOMAIN&equals;"&dollar;&lbrace;1&rcub;" &NewLine; &NewLine; echo &dollar;&lpar;echo "&dollar;DOMAIN" &vert; awk -F'&period;' '&lbrace;gsub&lpar;"http&colon;&sol;&sol;&vert;&sol;&period;&ast;"&comma;""&rpar;&rcub; NF&gt&semi;2&lbrace;&dollar;1&equals;""&semi;&dollar;0&equals;substr&lpar;&dollar;0&comma; 2&rpar;&rcub;1' OFS&equals;'&period;'&rpar; &NewLine;&rcub; &NewLine; &NewLine;deploy&lowbar;challenge&lpar;&rpar; &lbrace; &NewLine; local DOMAIN&equals;"&dollar;&lbrace;1&rcub;" TOKEN&lowbar;FILENAME&equals;"&dollar;&lbrace;2&rcub;" TOKEN&lowbar;VALUE&equals;"&dollar;&lbrace;3&rcub;" &NewLine; &NewLine; &num; This hook is called once for every domain that needs to be &NewLine; &num; validated&comma; including any alternative names you may have listed&period; &NewLine; &num; &NewLine; &num; Parameters&colon; &NewLine; &num; - DOMAIN &NewLine; &num; The domain name &lpar;CN or subject alternative name&rpar; being &NewLine; &num; validated&period; &NewLine; &num; - TOKEN&lowbar;FILENAME &NewLine; &num; The name of the file containing the token to be served for HTTP &NewLine; &num; validation&period; Should be served by your web server as &NewLine; &num; &sol;&period;well-known&sol;acme-challenge&sol;&dollar;&lbrace;TOKEN&lowbar;FILENAME&rcub;&period; &NewLine; &num; - TOKEN&lowbar;VALUE &NewLine; &num; The token value that needs to be served for validation&period; For DNS &NewLine; &num; validation&comma; this is what you want to put in the &lowbar;acme-challenge &NewLine; &num; TXT record&period; For HTTP validation it is the value that is expected &NewLine; &num; be found in the &dollar;TOKEN&lowbar;FILENAME file&period; &NewLine; &NewLine; TLD&lowbar;DOMAIN&equals;&dollar;&lpar;tld&lowbar;domain &dollar;DOMAIN&rpar; &NewLine; &NewLine; lexicon cloudflare create &dollar;&lbrace;TLD&lowbar;DOMAIN&rcub; TXT --name&equals;"&lowbar;acme-challenge&period;&dollar;&lbrace;DOMAIN&rcub;&period;" --content&equals;"&dollar;TOKEN&lowbar;VALUE" &NewLine;&rcub; &NewLine; &NewLine;clean&lowbar;challenge&lpar;&rpar; &lbrace; &NewLine; local DOMAIN&equals;"&dollar;&lbrace;1&rcub;" TOKEN&lowbar;FILENAME&equals;"&dollar;&lbrace;2&rcub;" TOKEN&lowbar;VALUE&equals;"&dollar;&lbrace;3&rcub;" &NewLine; &NewLine; &num; This hook is called after attempting to validate each domain&comma; &NewLine; &num; whether or not validation was successful&period; Here you can delete &NewLine; &num; files or DNS records that are no longer needed&period; &NewLine; &num; &NewLine; &num; The parameters are the same as for deploy&lowbar;challenge&period; &NewLine; &NewLine; TLD&lowbar;DOMAIN&equals;&dollar;&lpar;tld&lowbar;domain &dollar;DOMAIN&rpar; &NewLine; &NewLine; lexicon cloudflare delete &dollar;&lbrace;TLD&lowbar;DOMAIN&rcub; TXT --name&equals;"&lowbar;acme-challenge&period;&dollar;&lbrace;DOMAIN&rcub;&period;" &NewLine;&rcub; &NewLine; &NewLine;deploy&lowbar;cert&lpar;&rpar; &lbrace; &NewLine; local DOMAIN&equals;"&dollar;&lbrace;1&rcub;" KEYFILE&equals;"&dollar;&lbrace;2&rcub;" CERTFILE&equals;"&dollar;&lbrace;3&rcub;" FULLCHAINFILE&equals;"&dollar;&lbrace;4&rcub;" CHAINFILE&equals;"&dollar;&lbrace;5&rcub;" TIMESTAMP&equals;"&dollar;&lbrace;6&rcub;" &NewLine; &NewLine; &num; This hook is called once for each certificate that has been &NewLine; &num; produced&period; Here you might&comma; for instance&comma; copy your new certificates &NewLine; &num; to service-specific locations and reload the service&period; &NewLine; &num; &NewLine; &num; Parameters&colon; &NewLine; &num; - DOMAIN &NewLine; &num; The primary domain name&comma; i&period;e&period; the certificate common &NewLine; &num; name &lpar;CN&rpar;&period; &NewLine; &num; - KEYFILE &NewLine; &num; The path of the file containing the private key&period; &NewLine; &num; - CERTFILE &NewLine; &num; The path of the file containing the signed certificate&period; &NewLine; &num; - FULLCHAINFILE &NewLine; &num; The path of the file containing the full certificate chain&period; &NewLine; &num; - CHAINFILE &NewLine; &num; The path of the file containing the intermediate certificate&lpar;s&rpar;&period; &NewLine; &num; - TIMESTAMP &NewLine; &num; Timestamp when the specified certificate was created&period; &NewLine;&rcub; &NewLine; &NewLine;unchanged&lowbar;cert&lpar;&rpar; &lbrace; &NewLine; local DOMAIN&equals;"&dollar;&lbrace;1&rcub;" KEYFILE&equals;"&dollar;&lbrace;2&rcub;" CERTFILE&equals;"&dollar;&lbrace;3&rcub;" FULLCHAINFILE&equals;"&dollar;&lbrace;4&rcub;" CHAINFILE&equals;"&dollar;&lbrace;5&rcub;" &NewLine; &NewLine; &num; This hook is called once for each certificate that is still &NewLine; &num; valid and therefore wasn't reissued&period; &NewLine; &num; &NewLine; &num; Parameters&colon; &NewLine; &num; - DOMAIN &NewLine; &num; The primary domain name&comma; i&period;e&period; the certificate common &NewLine; &num; name &lpar;CN&rpar;&period; &NewLine; &num; - KEYFILE &NewLine; &num; The path of the file containing the private key&period; &NewLine; &num; - CERTFILE &NewLine; &num; The path of the file containing the signed certificate&period; &NewLine; &num; - FULLCHAINFILE &NewLine; &num; The path of the file containing the full certificate chain&period; &NewLine; &num; - CHAINFILE &NewLine; &num; The path of the file containing the intermediate certificate&lpar;s&rpar;&period; &NewLine;&rcub; &NewLine; &NewLine;invalid&lowbar;challenge&lpar;&rpar; &lbrace; &NewLine; local DOMAIN&equals;"&dollar;&lbrace;1&rcub;" RESPONSE&equals;"&dollar;&lbrace;2&rcub;" &NewLine; &NewLine; &num; This hook is called if the challenge response has failed&comma; so domain &NewLine; &num; owners can be aware and act accordingly&period; &NewLine; &num; &NewLine; &num; Parameters&colon; &NewLine; &num; - DOMAIN &NewLine; &num; The primary domain name&comma; i&period;e&period; the certificate common &NewLine; &num; name &lpar;CN&rpar;&period; &NewLine; &num; - RESPONSE &NewLine; &num; The response that the verification server returned &NewLine;&rcub; &NewLine; &NewLine;request&lowbar;failure&lpar;&rpar; &lbrace; &NewLine; local STATUSCODE&equals;"&dollar;&lbrace;1&rcub;" REASON&equals;"&dollar;&lbrace;2&rcub;" REQTYPE&equals;"&dollar;&lbrace;3&rcub;" &NewLine; &NewLine; &num; This hook is called when a HTTP request fails &lpar;e&period;g&period;&comma; when the ACME &NewLine; &num; server is busy&comma; returns an error&comma; etc&rpar;&period; It will be called upon any &NewLine; &num; response code that does not start with '2'&period; Useful to alert admins &NewLine; &num; about problems with requests&period; &NewLine; &num; &NewLine; &num; Parameters&colon; &NewLine; &num; - STATUSCODE &NewLine; &num; The HTML status code that originated the error&period; &NewLine; &num; - REASON &NewLine; &num; The specified reason for the error&period; &NewLine; &num; - REQTYPE &NewLine; &num; The kind of request that was made &lpar;GET&comma; POST&period;&period;&period;&rpar; &NewLine;&rcub; &NewLine; &NewLine;exit&lowbar;hook&lpar;&rpar; &lbrace; &NewLine; &num; This hook is called at the end of a dehydrated command and can be used &NewLine; &num; to do some final &lpar;cleanup or other&rpar; tasks&period; &NewLine; &NewLine; &colon; &NewLine;&rcub; &NewLine; &NewLine;HANDLER&equals;"&dollar;1"&semi; shift &NewLine;if &lbrack;&lbrack; "&dollar;&lbrace;HANDLER&rcub;" &equals;~ &Hat;&lpar;deploy&lowbar;challenge&vert;clean&lowbar;challenge&vert;deploy&lowbar;cert&vert;unchanged&lowbar;cert&vert;invalid&lowbar;challenge&vert;request&lowbar;failure&vert;exit&lowbar;hook&rpar;&dollar; &rsqb;&rsqb;&semi; then &NewLine; "&dollar;HANDLER" "&dollar;&commat;" &NewLine;fi<&sol;pre>&NewLine;<p>This hooks file will only make the DNS-01 validation possible&period; If you want to make it reload Nginx after deploying the certificate you&&num;8217&semi;ll also need to set the deploy&lowbar;cert function with the method you want to call like&colon;<&sol;p>&NewLine;<p><code class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"null">systemctl reload nginx<&sol;code><&sol;p>&NewLine;<h3>Configuration file<&sol;h3>&NewLine;<p>You need to set your contact email in this configuration file and as previously edit the domains&period;txt file that will be alongside this configuration file&period;<&sol;p>&NewLine;<p>You also need to put the file <code class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"null">hooks&period;sh <&sol;code> next to this configuration file&period;<&sol;p>&NewLine;<pre class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"shell">&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num; &NewLine;&num; This is the main config file for dehydrated &num; &NewLine;&num; &num; &NewLine;&num; This file is looked for in the following locations&colon; &num; &NewLine;&num; &dollar;SCRIPTDIR&sol;config &lpar;next to this script&rpar; &num; &NewLine;&num; &sol;usr&sol;local&sol;etc&sol;dehydrated&sol;config &num; &NewLine;&num; &sol;etc&sol;dehydrated&sol;config &num; &NewLine;&num; &dollar;&lbrace;PWD&rcub;&sol;config &lpar;in current working-directory&rpar; &num; &NewLine;&num; &num; &NewLine;&num; Default values of this config are in comments &num; &NewLine;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num;&num; &NewLine; &NewLine;&num; Resolve names to addresses of IP version only&period; &lpar;curl&rpar; &NewLine;&num; supported values&colon; 4&comma; 6 &NewLine;&num; default&colon; &lt&semi;unset&gt&semi; &NewLine;&num;IP&lowbar;VERSION&equals; &NewLine; &NewLine;&num; Path to certificate authority &lpar;default&colon; https&colon;&sol;&sol;acme-v01&period;api&period;letsencrypt&period;org&sol;directory&rpar; &NewLine;&num;CA&equals;"https&colon;&sol;&sol;acme-v01&period;api&period;letsencrypt&period;org&sol;directory" &NewLine; &NewLine;&num; Path to certificate authority license terms redirect &lpar;default&colon; https&colon;&sol;&sol;acme-v01&period;api&period;letsencrypt&period;org&sol;terms&rpar; &NewLine;&num;CA&lowbar;TERMS&equals;"https&colon;&sol;&sol;acme-v01&period;api&period;letsencrypt&period;org&sol;terms" &NewLine; &NewLine;&num; Path to license agreement &lpar;default&colon; &lt&semi;unset&gt&semi;&rpar; &NewLine;&num;LICENSE&equals;"" &NewLine; &NewLine;&num; Which challenge should be used&quest; Currently http-01 and dns-01 are supported &NewLine;CHALLENGETYPE&equals;"dns-01" &NewLine; &NewLine;&num; Path to a directory containing additional config files&comma; allowing to override &NewLine;&num; the defaults found in the main configuration file&period; Additional config files &NewLine;&num; in this directory needs to be named with a '&period;sh' ending&period; &NewLine;&num; default&colon; &lt&semi;unset&gt&semi; &NewLine;&num;CONFIG&lowbar;D&equals; &NewLine; &NewLine;&num; Base directory for account key&comma; generated certificates and list of domains &lpar;default&colon; &dollar;SCRIPTDIR -- uses config directory if undefined&rpar; &NewLine;&num;BASEDIR&equals;&dollar;SCRIPTDIR &NewLine; &NewLine;&num; File containing the list of domains to request certificates for &lpar;default&colon; &dollar;BASEDIR&sol;domains&period;txt&rpar; &NewLine;&num;DOMAINS&lowbar;TXT&equals;"&dollar;&lbrace;BASEDIR&rcub;&sol;domains&period;txt" &NewLine; &NewLine;&num; Output directory for generated certificates &NewLine;&num;CERTDIR&equals;"&dollar;&lbrace;BASEDIR&rcub;&sol;certs" &NewLine; &NewLine;&num; Directory for account keys and registration information &NewLine;&num;ACCOUNTDIR&equals;"&dollar;&lbrace;BASEDIR&rcub;&sol;accounts" &NewLine; &NewLine;&num; Output directory for challenge-tokens to be served by webserver or deployed in HOOK &lpar;default&colon; &sol;var&sol;www&sol;dehydrated&rpar; &NewLine;&num;WELLKNOWN&equals;"&sol;var&sol;www&sol;dehydrated" &NewLine; &NewLine;&num; Default keysize for private keys &lpar;default&colon; 4096&rpar; &NewLine;&num;KEYSIZE&equals;"4096" &NewLine; &NewLine;&num; Path to openssl config file &lpar;default&colon; &lt&semi;unset&gt&semi; - tries to figure out system default&rpar; &NewLine;&num;OPENSSL&lowbar;CNF&equals; &NewLine; &NewLine;&num; Program or function called in certain situations &NewLine;&num; &NewLine;&num; After generating the challenge-response&comma; or after failed challenge &lpar;in this case altname is empty&rpar; &NewLine;&num; Given arguments&colon; clean&lowbar;challenge&vert;deploy&lowbar;challenge altname token-filename token-content &NewLine;&num; &NewLine;&num; After successfully signing certificate &NewLine;&num; Given arguments&colon; deploy&lowbar;cert domain path&sol;to&sol;privkey&period;pem path&sol;to&sol;cert&period;pem path&sol;to&sol;fullchain&period;pem &NewLine;&num; &NewLine;&num; BASEDIR and WELLKNOWN variables are exported and can be used in an external program &NewLine;&num; default&colon; &lt&semi;unset&gt&semi; &NewLine;HOOK&equals;"&dollar;&lbrace;BASEDIR&rcub;&sol;hooks&period;sh" &NewLine; &NewLine;&num; Chain clean&lowbar;challenge&vert;deploy&lowbar;challenge arguments together into one hook call per certificate &lpar;default&colon; no&rpar; &NewLine;&num;HOOK&lowbar;CHAIN&equals;"no" &NewLine; &NewLine;&num; Minimum days before expiration to automatically renew certificate &lpar;default&colon; 30&rpar; &NewLine;&num;RENEW&lowbar;DAYS&equals;"30" &NewLine; &NewLine;&num; Regenerate private keys instead of just signing new certificates on renewal &lpar;default&colon; yes&rpar; &NewLine;&num;PRIVATE&lowbar;KEY&lowbar;RENEW&equals;"yes" &NewLine; &NewLine;&num; Create an extra private key for rollover &lpar;default&colon; no&rpar; &NewLine;&num;PRIVATE&lowbar;KEY&lowbar;ROLLOVER&equals;"no" &NewLine; &NewLine;&num; Which public key algorithm should be used&quest; Supported&colon; rsa&comma; prime256v1 and secp384r1 &NewLine;&num;KEY&lowbar;ALGO&equals;rsa &NewLine; &NewLine;&num; E-mail to use during the registration &lpar;default&colon; &lt&semi;unset&gt&semi;&rpar; &NewLine;CONTACT&lowbar;EMAIL&equals;YOUR EMAIL &NewLine; &NewLine;&num; Lockfile location&comma; to prevent concurrent access &lpar;default&colon; &dollar;BASEDIR&sol;lock&rpar; &NewLine;&num;LOCKFILE&equals;"&dollar;&lbrace;BASEDIR&rcub;&sol;lock" &NewLine; &NewLine;&num; Option to add CSR-flag indicating OCSP stapling to be mandatory &lpar;default&colon; no&rpar; &NewLine;&num;OCSP&lowbar;MUST&lowbar;STAPLE&equals;"no"<&sol;pre>&NewLine;<p>You still need to edit your domains&period;txt to put the domain you want to generate a certificate for&period;<&sol;p>&NewLine;<h3>Command<&sol;h3>&NewLine;<p>Now you just need to launch dehydrated with the set configuration file to try your DNS-01 setup&period;<&sol;p>&NewLine;<p>If like me you put dehydrated in &sol;usr&sol;local&sol;sbin and your config in &sol;etc&sol;dehydrated&period;<&sol;p>&NewLine;<p><code class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"null">&sol;usr&sol;local&sol;sbin&sol;dehydrated -c -f &sol;etc&sol;dehydrated&sol;config<&sol;code><&sol;p>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;<h1>End words<&sol;h1>&NewLine;<p>Lexicon combined with Dehydrated make the DNS-01 validation easy-peasy&period; With the number of DNS provider Lexicon support&comma; you should be able to adapt it to your needs if you don&&num;8217&semi;t want to use CloudFlare&period;<&sol;p>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;