Entering email for Lets Encrypt fails

Using Caddy 0.11.0 every time I try to input my email it fails. The Caddyfile is like this:

https://www.example.com {
redir http://example.com{uri}
}

https://example.com {
gzip
tls example@gmail.com
root /var/www/html/gabo
expires {
match .js$ 180m
match .css$ 35m
match .html$ 35m
match .jpg$ 35m
match .png$ 35m
match .svg$ 35m
match .woff$ 35m
match .gif$ 35m
match .ico$ 35m
match .woff2$ 35m
}
ext .html .htm
}

And the error I get is this:

example@example:~# caddy &
[5] 23381
example@example:~# 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://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
Please enter your email address to signify agreement and to be notified
in case of issues. You can leave it blank, but we don’t recommend it.
Email address: example@gmail.com
example@gmail.com: command not found

[5]+ Stopped caddy

[5]+ Stopped caddy

It simply fails when putting the email. I am using Ubuntu 18.04 in Digital Ocean.

Hi @luisalvarado,

This has nothing to do with Caddy and everything to do with job control in your Linux shell.

You launched Caddy with &, which sends the process to the background. You haven’t redirected its output, though, so anything it prints is still going to your shell, despite the fact that it’s no longer interactive.

So Caddy is running in the background and you’ve effectively just tried to issue the nonexistent command, example@gmail.com, to your shell.

To keep Caddy interactive, simply don’t launch it into the background (by using caddy instead of caddy &), or bring it back to the foreground with the fg command. Then once you’ve put your email in, you can move it back with CTRL+Z (which will pause it in the background) and then using the bg command (which will resume it in the background).


man bash - specifically the Job Control and Shell Grammar sections
man bg
man fg

2 Likes

That moment when I feel like an ass. Thank you buddy. That’s logical.

1 Like

You’re most welcome! Hope my post didn’t unduly provoke your ass-feeling :stuck_out_tongue:

1 Like
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.