.TH lexicon "1" "February 2018" "lexicon" "User Commands" .SH NAME lexicon \- programmatically manipulate DNS records .SH DESCRIPTION This manual documents the .B tldextract command. .SH SYNOPSIS .TP usage: lexicon [\-h] [\-\-version] [\-\-delegated DELEGATED] PROVIDER .SH OPTIONS .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-\-version\fR show the current version of lexicon .TP \fB\-\-delegated\fR DELEGATED specify the delegated domain .TP PROVIDER specifies the domain provider to create, update, delete or list DNS entries for, from {cloudflare, cloudxns, digitalocean, dnsimple, dnsmadeeasy, dnspark, dnspod, easydns, luadns, namesilo, nsone, pointhq, rage4, route53, vultr, yandex, zonomi} .SH PROVIDER USAGE .SH SYNOPSIS .TP lexicon PROVIDER [\-h] [\-\-name NAME] [\-\-content CONTENT] [\-\-ttl TTL] [\-\-priority PRIORITY] [\-\-identifier IDENTIFIER] [\-\-auth\-username AUTH_USERNAME] [\-\-auth\-token AUTH_TOKEN] ACTION DOMAIN TYPE .SH OPTIONS .TP PROVIDER specifies the domain provider to create, update, delete or list DNS entries for, from {cloudflare, cloudxns, digitalocean, dnsimple, dnsmadeeasy, dnspark, dnspod, easydns, luadns, namesilo, nsone, pointhq, rage4, route53, vultr, yandex, zonomi} .TP ACTION specify the action to take, from {create, list, update, delete} .TP DOMAIN specify the domain to use, supports subdomains as well .TP TYPE specify the entry type, from {A, AAAA, CNAME, MX, NS, SPF, SOA, TXT, SRV, LOC} .TP \fB\-h\fR, \fB\-\-help\fR print provider-specific help message and exit .TP \fB\-\-name\fR NAME specify the record name .TP \fB\-\-content\fR CONTENT specify the record content .TP \fB\-\-ttl\fR TTL specify the record time\-to\-live .TP \fB\-\-priority\fR PRIORITY specify the record priority .TP \fB\-\-identifier\fR IDENTIFIER specify the record for update or delete actions .TP \fB\-\-auth\-username\fR AUTH_USERNAME specify email address used to authenticate .TP \fB\-\-auth\-token\fR AUTH_TOKEN specify token used authenticate .SH EXAMPLES .TP setup provider environmental variables: .IP LEXICON_CLOUDFLARE_USERNAME="myusername@example.com" LEXICON_CLOUDFLARE_TOKEN="cloudflare\-api\-token" .TP list all TXT records on cloudflare .IP lexicon cloudflare list example.com TXT .TP create a new TXT record on cloudflare .IP lexicon cloudflare create www.example.com TXT \-\-name=\fR"_acme\-challenge.www.example.com." \-\-content=\fR"challenge token" .TP delete a TXT record on cloudflare .IP lexicon cloudflare delete www.example.com TXT \-\-name=\fR"_acme\-challenge.www.example.com." \-\-content=\fR"challenge token" .IP lexicon cloudflare delete www.example.com TXT \-\-identifier=\fR"cloudflare record id" .SH AUTHENTICATION Most supported DNS services provide an API token, however each service implements authentication differently. Lexicon attempts to standardize authentication around the following CLI flags: .TP \-\-auth-username .IP For DNS services that require it, this is usually the account id or email address .TP \-\-auth-password .IP For DNS services that do not provide an API token, this is usually the account password .TP \-\-auth-token .IP This is the most common auth method, the API token provided by the DNS service .PP You can see all the \-\-auth-* flags for a specific service by reading the DNS service specific help: .IP lexicon cloudflare -h .PP Instead of providing Authentication information via the CLI, you can also specify them via Environmental Variables. Every DNS service and auth flag maps to an Environmental Variable as follows: .IP LEXICON\_{DNS Provider Name}\_{Auth Type} .PP So instead of specifying \-\-auth-username and \-\-auth-token flags when calling the cli, you could instead set the LEXICON_CLOUDFLARE_USERNAME and LEXICON_CLOUDFLARE_TOKEN environmental variables. .SH LETSENCRYPT INSTRUCTIONS Lexicon has an example [dehydrated hook file](examples/dehydrated.default.sh) that you can use for any supported provider. All you need to do is set the PROVIDER env variable. .IP PROVIDER=cloudflare dehydrated \fB\-\-cron\fR \fB\-\-hook\fR dehydrated.default.sh \fB\-\-challenge\fR dns\-01 .PP Lexicon can also be used with [Certbot](https://certbot.eff.org/) and the included [Certbot hook file](examples/certbot.default.sh) (requires configuration). .SH "SEE ALSO" For more information about lexicon see https://github.com/AnalogJ/lexicon. This manpage was created by Ana Custura for the Debian project.