docker compose logs certbot
certbot | usage:
certbot | certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...
certbot |
certbot | Certbot can obtain and install HTTPS/TLS/SSL certificates. By default,
certbot | it will attempt to use a webserver both for obtaining and installing the
certbot | certificate.
certbot | certbot: error: argument -m/--email: expected one argument
env_file us for passing environment variables to containers, but you are using the variable in the compose file so it is interpreted there where it is empty. You can try two dollar signs to āescapeā the one in the compose file. More info here
certbot | Saving debug log to /var/log/letsencrypt/letsencrypt.log
certbot | There seem to be problems with that address. Enter email address (used for
certbot | urgent renewal and security notices)
certbot |
certbot |
certbot | If you really want to skip this, you can run the client with
certbot | --register-unsafely-without-email but you will then be unable to receive notice
certbot | about impending expiration or revocation of your certificates or problems with
certbot | your Certbot installation that will lead to failure to renew.
certbot |
certbot | An unexpected error occurred:
certbot | EOFError
certbot | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
I realized that the entrypoint of the certbot image is just certbot, so there is no shell. When there is no shell, there is nothing to interpret the variables, so you managed to generate the right command, it just wasnāt interpreted in any shell. So you will indeed need to pass the env variables to compose as described in the docs which I linked the last time.
File: .env
content:
EMAIL=your@email.tld
DOMAIN=domain.tld
Of course with your valid values.
update: The second realization is that you know exactly how an env file works so I didnāt need to share the example actually But the name is important. If you want a different name, the --env-file parameter of compose should help.
That means your .env file is not there or not in the right folder. Changing the entrypoint to run a shell is probably the worst you can do. The shell will not forward stop signals either, so every time you want to stop certbot, it will be forced to be killed in 10 seconds.
If you donāt show the current error message every time compose fails, we canāt help you.