Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is: zvillo.comzvillo.com
I ran this command:
docker-compose up certbot
It produced this output:
[+] Running 1/0
✔ Container certbot Created 0.0s
Attaching to certbot
certbot | Saving debug log to /var/log/letsencrypt/letsencrypt.log
certbot | Requesting a certificate for mail.zvillo.com
certbot |
certbot | Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
certbot | Domain: mail.zvillo.com
certbot | Type: unauthorized
certbot | Detail: 203.161.44.31: Invalid response from http://mail.zvillo.com/.well-known/acme-challenge/UgcqPaGmSP-bXKxs57Y4lBxCMH4724u1Ozf9WJg61Mg: 404
certbot |
certbot | Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
certbot |
certbot | Some challenges have failed.
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.
certbot exited with code 1
My web server is (include version):
Nginx (configured through Webuzo)
The operating system my web server runs on is (include version):
AlmaLinux 8
My hosting provider, if applicable, is:
Namecheap
I can login to a root shell on my machine (yes or no, or I don't know): Yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
Yes, Webuzo (version included in the latest build)
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot):
certbot 1.21.0
Issue: I'm trying to set up Docker Mail Server for the subdomain mail.zvillo.com
with Let's Encrypt using Certbot's webroot authentication. However, I'm encountering a 404
error during the ACME challenge, where the challenge file is not being found at http://mail.zvillo.com/.well-known/acme-challenge/
.
My Nginx is running inside Webuzo, and I have a WordPress site on the main domain (zvillo.com), which is causing conflicts during the webroot challenge for the mail subdomain.
Goal: I want to set up Docker Mail Server using mail.zvillo.com
with proper SSL certificates via Let's Encrypt and ensure the Nginx configuration works properly for both my website and the mail server.
My docker compose.yaml
:
services:
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./docker-data/letsencrypt:/etc/letsencrypt
- /var/www/certbot:/var/www/certbot
command: certonly --webroot -w /var/www/certbot -d mail.zvillo.com
mailserver:
image: ghcr.io/docker-mailserver/docker-mailserver:latest
container_name: mailserver
hostname: mail.zvillo.com
domainname: zvillo.com
env_file: mailserver.env
ports:
- "125:25" # SMTP (explicit TLS => STARTTLS)
- "1143:143" # IMAP4 (explicit TLS => STARTTLS)
- "1465:465" # ESMTP (implicit TLS)
- "1587:587" # ESMTP (explicit TLS => STARTTLS)
- "1993:993" # IMAP4 (implicit TLS)
volumes:
- ./docker-data/mail-data:/var/mail
- ./docker-data/mail-state:/var/mail-state
- ./docker-data/mail-logs:/var/log/mail
- ./docker-data/config:/tmp/docker-mailserver
- ./docker-data/letsencrypt:/etc/letsencrypt:ro # Corrected mapping
- /etc/localtime:/etc/localtime:ro # Ensure time synchronization
restart: always
stop_grace_period: 1m
cap_add:
- NET_ADMIN # Required for Fail2Ban or other network-level operations
environment:
- ENABLE_SPAMASSASSIN=1 # Enable spam filter
- ENABLE_CLAMAV=1 # Enable antivirus
- ENABLE_FAIL2BAN=1 # Enable Fail2Ban for brute-force protection
- SSL_TYPE=letsencrypt # Using Let's Encrypt for SSL certificates
- ONE_DIR=1 # Optional: single directory for mail storage
- ENABLE_MANAGESIEVE=1 # Enable ManageSieve for filtering rules (optional)
- DMS_DEBUG=0 # Debug mode (set to 1 for debugging issues)
healthcheck:
test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
timeout: 3s
retries: 0