Skip to content

How to use lego in Microsoft Windows #1934

Answered by ldez
plethora9 asked this question in Q&A
Discussion options

You must be logged in to vote

You have to set the environment variables (they are not CLI flags) with your credentials.
Then you cannot do -CLOUDFLARE_DNS_API_TOKEN=xxx.

You have to remove \ at the end of the lines.

CLOUDFLARE_DNS_API_TOKEN=1234567890abcdefghijklmnopqrstuvwxyz lego --email [email protected] --dns cloudflare --domains my.example.org run

another way:

setx CLOUDFLARE_DNS_API_TOKEN "1234567890abcdefghijklmnopqrstuvwxyz"
lego --email [email protected] --dns cloudflare --domains my.example.org run

NOTE: I recommend using something better than the default Windows terminal (like Git BASH or WSL)

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@plethora9
Comment options

@ldez
Comment options

ldez Jun 11, 2023
Maintainer

@plethora9
Comment options

@ldez
Comment options

ldez Jun 11, 2023
Maintainer

Answer selected by plethora9
@plethora9
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants