Hello,
My domain is: supabase.etourne.xyz
I ran this command: docker compose run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ -d supabase.etourne.xyz
It produced this output:
Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: supabase.etourne.xyz
Type: connection
Detail: 140.238.67.63: Fetching http://supabase.etourne.xyz/.well-known/acme-challenge/DSSdnMndAXLPvshkbLGHcTiULQZnPJT-2zAePijzWyg: Error getting validation data
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.
Some challenges have failed.
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.
My web server is (include version): nginx:stable-alpine (dockerized)
The operating system my web server runs on is (include version): Canonical-Ubuntu-20.04-aarch64-2023.01.31-0
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): I don't know
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot:arm64v8-v2.3.0 (dockerized)
I have dockerized both certbot and Nginx. Here is how my docker compose looks like:
reverse_proxy:
image: nginx:stable-alpine
volumes:
- ./reverse_proxy/nginx.conf:/etc/nginx/conf.d/default.conf/:ro
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
restart: always
ports:
- 80:80
certbot:
image: certbot/certbot:arm64v8-v2.3.0
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
My code in Nginx:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;gzip on;
listen [::]:80;
server_name supabase.etourne.xyz www.supabase.etourne.xyz;
server_tokens off;
gzip_proxied any;
gzip_comp_level 4;
gzip_types text/css application/javascript image/svg+xml;
# REST API
location ~ ^/rest/v1/(.*)$ {
proxy_set_header Host $host;
proxy_pass http://kong:8000;
proxy_redirect off;
}
# Authentication
location ~ ^/auth/v1/(.*)$ {
proxy_set_header Host $host;
proxy_pass http://kong:8000;
proxy_redirect off;
}
# Realtime
location ~ ^/realtime/v1/(.*)$ {
proxy_redirect off;
proxy_pass http://kong:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
proxy_pass http://studio:3000/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
}
}
server {
listen 443 default_server ssl http2;
listen [::]:443 ssl http2;
server_name supabase.etourne.xyz;
ssl_certificate /etc/nginx/ssl/live/supabase.etourne.xyz/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/supabase.etourne.xyz/privkey.pem;
location / {
# ...
}
}