forked from AnalogJ/lexicon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lexicon.1
125 lines (121 loc) · 4.33 KB
/
lexicon.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
.TH lexicon "1" "February 2018" "lexicon" "User Commands"
.SH NAME
lexicon \- programmatically manipulate DNS records
.SH DESCRIPTION
This manual documents the
.B lexicon
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="[email protected]"
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.