I am trying to renew my SSL certificate from Cloudflare, but when I run caddy -log stderr I get the following warning: “Cloudflare credentials missing”. I have my email and API key but I have not been able to find instructions on where I need to add these items in order for my certificate to renew.
In my caddyfile, I have:
@officialJCReyes, welcome to the Caddy community!
The instructions you’re looking for are here:
[…] You will also need to set environment variables with your account credentials:
Environmental Variables to Set
Hi Matt, thanks for the prompt reply. I should have been more clear, where do I set the environment variables?
That’s highly dependent on the environment you’re deploying Caddy in.
Assuming you’re on one of the common flavours of Linux, the simplest way would be to type
CLOUDFLARE_API_KEY=123xyz in the shell before running Caddy.
If you plan to use an init system to run Caddy for you, you’ll need to make sure it handles setting the variables - again, depends highly on the system you use.
An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer. They are part of the environment in which a process runs. For example, a running process can query the value of the TEMP environment variable to discover a suitable location to store temporary files, or the HOME or USERPROFILE variable to find the directory structure owned by the user running the process.
They were introduced in their modern form in 1979 with Version 7 Unix, s...
I’m running caddy on Windows 10
Check the “Assignment” section of the above linked Wikipedia entry, it has a section for Windows.
I think there’s also a GUI somewhere in the control panel to set environmental variables, but I don’t recall where. You might want to Google it.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.