Package: certbot-dns-safedns
SafeDNS Authenticator plugin for Certbotans-group/certbot-dns-safedns- Docker imageAboutThis container uses the SafeDNS Authenticator plugin for Certbot. It utilizes API calls to create and remove DNS TXT records for domain ownership validation.How to use this image1, Create the/etc/letsencryptto house your configuration and your certificatesmkdir-p/etc/letsencrypt2, Create the/etc/letsencrypt/safedns.iniconfiguration file with the below contentdns_safedns_auth_token = <YOUR API KEY HERE>
dns_safedns_propagation_seconds = 603, Set permissions for the newly created configuration filechmod0600/etc/letsencrypt/safedns.ini4, Test run the containerdockerrun-it\-v/etc/letsencrypt:/etc/letsencrypt\ans-group/certbot-dns-safedns:latest\certonly\-dyourdomain.com\--agree-tos\--no-eff-email\--emailemail@yourdomain.com\--test-certUsage examplesVerify current certificatesdockerrun-it\-v/etc/letsencrypt:/etc/letsencrypt\ans-group/certbot-dns-safedns:latest\certificatesDelete a certificatedockerrun-it\-v/etc/letsencrypt:/etc/letsencrypt\ans-group/certbot-dns-safedns:latest\delete--cert-nameyourdomain.comRenew all certificatesdockerrun-it\-v/etc/letsencrypt:/etc/letsencrypt\ans-group/certbot-dns-safedns:latest\renewThecertbot-dns-safednsPluginSetupaptinstallcertbotpython3-pip
pip3install--upgradecertbot-dns-safednsExecutioncertbotcertonly--authenticatordns_safednsWarning: Certbot might tell you that it doesn't have permissions to write to its log file. However, if you runcertbotassudo, you won't have access to the SafeDNS plugin if you didn't install the plugin as sudo.This will result in the following error from Certbot:Couldnotchooseappropriateplugin:Therequesteddns_safednsplugindoesnotappeartobeinstalledTo get around this just do:sudopip3install--upgradecertbot-dns-safedns
sudocertbotcertonly--authenticatordns_safednsIf you get any Pythoncryptographyerrors, such as:ContextualVersionConflict:...Just make sure to upgrade yourpyopenssl.sudopipinstall--upgradepyopensslCredentials and Config OptionsUse of this plugin can be simplified by using a configuration file containing SafeDNS API credentials, obtained from your ANS Portalaccount page. See also theSafeDNS APIdocumentation.An examplesafedns.inifile:dns_safedns_auth_token=0123456789abcdef0123456789abcdef01234567dns_safedns_propagation_seconds=20The path to this file can be provided interactively or using the--dns_safedns-credentialscommand-line argument. Certbot records the path to this file for use during renewal, but does not store the file's contents.CAUTION:You should protect these API credentials as you would the password to your ANS Portal account. Users who can read this file can use these credentials to issue arbitrary API calls on your behalf. Users who can cause Certbot to run using these credentials can complete adns-01challenge to acquire new certificates or revoke existing certificates for associated domains, even if those domains aren't being managed by this server.Certbot will emit a warning if it detects that the credentials file can be accessed by other users on your system. The warning reads "Unsafe permissions on credentials configuration file", followed by the path to the credentials file. This warning will be emitted each time Certbot uses the credentials file, including for renewal, and cannot be silenced except by addressing the issue (e.g., by using a command likechmod 600to restrict access to the file).ExamplesTo acquire a single certificate for bothexample.comand*.example.com, waiting 900 seconds for DNS propagation:certbotcertonly\--authenticatordns_safedns\--dns_safedns-credentials~/.secrets/certbot/safedns.ini\--dns_safedns-propagation-seconds900\-d'example.com'\-d'*.example.com'BuildThe package for the SafeDNS plugin is hosted on PyPI here:https://pypi.org/project/certbot-dns-safedns/To build and upload the package from source, first ensure you've increased the version number insetup.py.Delete thebuild,distand.egg-infodirectories if they are present from a previous build.Then run:python3setup.pysdistbdist_wheelDeploymentpython3-mtwineuploaddist/*Warning: Use the username:__token__, along with the token registered on PyPI.