I’m moving my Caddy installation from Windows to a Raspberry Pi. I’ve hit another stumbling block getting Let’s Encrypt working.
This is my Caddy file:
web.mydomain.com:8181 localhost:8181 192.168.1.77:8181 {
root /home/pi/caddywww
tls {
dns cloudflare
}
gzip
fastcgi / /var/run/php/php7.0-fpm.sock {
ext .php
split .php
index index.php
}
}
For privacy reasons, I changed the domain name to mydomain.com to post here on the forum. This is what happens when I attempt to start Caddy:
pi@raspberrypi:~ $ sudo caddy -conf /etc/caddy/Caddyfile &
[1] 1650
pi@raspberrypi:~ $ Activating privacy features…
Your sites will be served over HTTPS automatically using Let’s Encrypt.
By continuing, you agree to the Let’s Encrypt Subscriber Agreement at:
https://acme-v01.api.letsencrypt.org/terms
Please enter your email address so you can recover your account if needed.
You can leave it blank, but you’ll lose the ability to recover your account.
Email address: peter@mydomain.com
-bash: peter@mydomain.com: command not found[1]+ Stopped sudo caddy -conf /etc/caddy/Caddyfile
As soon as I enter my email address, I get an error.
I’m using the Cloudflare DNS challenge (which I have working on Windows). I set the two environmental variables in /etc/profile. Running “printenv CLOUDFLARE_API_KEY” and “printenv CLOUDFLARE_EMAIL” returns the correct values for those variables. I installed Caddy with the Cloudflare plugin using: curl https://getcaddy.com | bash -s personal tls.dns.cloudflare
Any ideas what I am doing wrong? Is there a log where I can see what error is occurring?