[TLS DNS] "no Gandi API key given" while provided

(Pixys) #1


I installed Caddy on an XU4 Odroid board (armv7) with Archlinux.
I want to solve the DNS challenge (my registrar is Gandi) so in my config file I put :

tls {
        dns gandiv5

I also setup the environment variable in /etc/environment according to the documentation :


the command printenv displays the same value so the variable is correctly setup but caddy complains:

Jun 04 14:06:46 centaure systemd[1]: Started Caddy HTTP/2 web server.
Jun 04 14:06:48 centaure caddy[277]: Activating privacy features... 2018/06/04 14:06:48 Gandi DNS: No Gandi API Key given
Jun 04 14:06:48 centaure systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Jun 04 14:06:48 centaure systemd[1]: caddy.service: Failed with result 'exit-code'.

The weird thing is that I have the same setup in a x86_64 server but it works

I don’t know how to investigate further.
Thanks for your help.


(Matthew Fay) #2

Ahh, systemd, we meet again…

Maybe give Environment=GANDIV5_API_KEY=R4SJ68p56kzhasXXXXXXXX in the unit file a shot, just to see if it’s something wrong with the /etc/environment approach specifically.

(Pixys) #3

Yeaaaahhh \o/
Thanks a lot !

So it’s a systemd bug. Should I fill a bug report here: https://github.com/systemd/systemd ?

(Matthew Fay) #4

Well, we still don’t know for sure it’s not something specific to Caddy or the example unit file in the Caddy repo.

I’m sure if you can replicate the /etc/environment method not working for some other daemon’s unit file, they’d welcome an issue, but if you can’t it probably wouldn’t go awry to open one anyway.