I'm trying to generate a Let's Encrypt wildcard cert for my domain using lego but can't seem to get it to work

Hi Folks,

I've got the following done:

  1. Latest version of lego installed on Ubuntu 22.04
  2. I have an A record for *.mydomain.com
  3. I can successfully use nslookup to query *.mydomain.com
  4. I have a personal token generated from Linode with read/write permissions to domains

And finally I attempt to run the following command:

LINODE_TOKEN=xxxx \
sudo lego --email="myemail@protonmail.com" --dns linode --domains="*.mydomain.com" run

I get the following error:
2023/01/05 08:49:32 unrecognized DNS provider: linode

For some reason it's not liking the dns provider code linode. All documentation I've read so far says that "linode" is the proper DNS provider code. When I change the DNS provider code to namecheap, it recognizes it and give me an error that proper authorization tokens are not in place.

Any idea what is going on here?

6 Replies

For some reason it's not liking the dns provider code linode.

I would try linode.com. Just a hunch…

Also, linode.com is not your registrar.

-- sw

linode.com didn't work. I've also tried linodev4 and linodev5. Still no go.

You are correct, the registrar is not Linode but namecheap. However, Linode is configured to manage the DNS. I did still go ahead and attempted to use the Namecheap API and User keys to try to generate the cert and it errored out complaining it couldn't validate the IP addresses associated with the A record of the domain name. Which does make sense. Still baffled with linode as a DNS resolver code doesn't work but namecheap does.

Trying to bump up this issue.

Based on these two previous GitHub issues, it seems like it may have to do with the version of lego you're using:

I suggest creating a new GitHub issue to see if you get in touch with a member of the Go-Acme organization. If you downloaded lego using apt, I also recommend using a different Installation Method such as Docker or from sources.

Thanks. Definitely appears that the version downloaded using apt is the dev version on Ubuntu. I downloaded the binaries and installed it and now it seems to recognize linode as a legitimate DNS provider. However, now when I try to run the following command from a bash shell, I get this error:

2023/01/18 14:53:40 linode: some credentials information are missing: LINODE_TOKEN

The command I run is:
LINODE_TOKEN=xxxx \
sudo lego --email xxxx@domain.com --dns linode --domains *.domain.com run

Any ideas?

LINODE_TOKEN=xxxx lego ….

I found that I needed to run use a bash trick to set the environment variable. Set the variable on the same line as the lego command. Apparently, LINODE_TOKEN isn't set as an 'Environment Variable' with the first line. It isn't listed when you execute env to list the environment variables.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct