Custom SSL Certificat non fonctionnel

Bonjour à tous,

J’essaie de déployer Bunkerweb pour le lab de mon boulot mais je rencontre un probleme avec les certificats SSL.

En effet, je cherche à générer une wildcard via let’s encrypt avec un challenge DNS sur Gandi.

Gandi n’étant pas référencé j’ai deployé certbot-dns-gandi pour pouvoir utiliser le Personal Authentication Token

 pip install certbot-dns-gandi>=1.6.0

j’ai ensuite generé mon certificat

sudo certbot certonly   --authenticator dns-gandi   --dns-gandi-credentials /etc/letsencrypt/gandi.ini   --dns-gandi-propagation-seconds 120   --server https://acme-v02.api.letsencrypt.org/directory   --agree-tos   --email anonymous@anonymous.fr   -d lab.anonymous.fr   -d "*.lab.anonymous.fr"   --debug-challenges

j’ai donc bien mon certificat et ma clé privé.

je les déclare dans global config:

MULTISITE=yes
DNS_RESOLVERS=9.9.9.9 149.112.112.112 8.8.8.8 8.8.4.4
API_LISTEN_IP=127.0.0.1
LISTEN_STREAM=no
USE_TCP=no
SECURITY_MODE=detect
HTTP_PORT=80
HTTPS_PORT=443
USE_CUSTOM_SSL=yes
CUSTOM_SSL_CERT=/etc/letsencrypt/live/lab.anonymous.fr/fullchain.pem
CUSTOM_SSL_KEY=/etc/letsencrypt/live/lab.anonymous.fr/privkey.pem
USE_REVERSE_PROXY=yes
REDIRECT_HTTP_TO_HTTPS=yes
SECURITYTXT_PREFERRED_LANG=fr
UI_HOST=http://127.0.0.1:7000
WHITELIST_IP=192.168.1.0/24 192.168.2.0/24

Le certificat qui est servi est celui par défaut (example.org)

ci dessous les logs:

[2025-12-10 18:29:14 +0100] [CUSTOM-CERT] [446] [❌] - Error processing cert for``fr``: [Errno 13] Permission denied: ‘/etc/letsencrypt/live/lab.anonymous.fr/fullchain.pem’

pourtant les droit semble bon:

root@bunkerweb:~# ls -l /etc/letsencrypt/live/lab.anonymous.fr/
total 4
lrwxrwxrwx 1 nginx nginx  42 Dec 10 16:54 cert.pem -> ../../archive/lab.anonymous.fr/cert1.pem
lrwxrwxrwx 1 nginx nginx  43 Dec 10 16:54 chain.pem -> ../../archive/lab.anonymous.fr/chain1.pem
lrwxrwxrwx 1 nginx nginx  47 Dec 10 16:54 fullchain.pem -> ../../archive/lab.anonymous.fr/fullchain1.pem
lrwxrwxrwx 1 nginx nginx  45 Dec 10 16:54 privkey.pem -> ../../archive/lab.anonymous.fr/privkey1.pem
-rw-r--r-- 1 nginx nginx 692 Dec 10 16:54 README
root@bunkerweb:~#

Auriez vous une idée du probleme ?

Merci par avance.

Bonjour @Shaclaheso,

le problème vient soit du fait que le fichier référencé est un lien symbolique soit que le Scheduler n’ai pas la permission de lire les fichiers (nginx:nginx).

Cordialement,

Théophile

Bonjour Théophile,

Merci pour ce retour.

J’ai modifié le lien vers le certificat et la clé originel.

Maintenant je n’ai plus d’erreur de droit mais un simple message dans les logs:

[2025-12-11 15:04:50 +0100] [SCHEDULER] [463] [❌] - Error while executing job 'custom-cert' from plugin 'customcert'
[2025-12-11 15:04:50 +0100] [SCHEDULER] [463] [ℹ️ ] - Successfully added job run for the job 'realip-download'
[2025-12-11 15:04:50 +0100] [SCHEDULER] [463] [ℹ️ ] - Successfully added job run for the job 'api-server-cert'
[2025-12-11 15:04:51 +0100] [SCHEDULER] [463] [ℹ️ ] - Successfully added job run for the job 'backup-data'
[2025-12-11 15:04:51 +0100] [SCHEDULER] [463] [ℹ️ ] - Successfully added job run for the job 'update-check'
[2025-12-11 15:04:51 +0100] [SCHEDULER] [463] [ℹ️ ] - Successfully added job run for the job 'bunkernet-register'
[2025-12-11 15:04:51 +0100] [SCHEDULER] [463] [ℹ️ ] - Successfully added job run for the job 'bunkernet-data'
[2025-12-11 15:04:51 +0100] [SCHEDULER] [463] [ℹ️ ] - Successfully added job run for the job 'self-signed'
[2025-12-11 15:04:51 +0100] [SCHEDULER] [463] [ℹ️ ] - Updating /var/cache/bunkerweb permissions...
[2025-12-11 15:04:51 +0100] [SCHEDULER] [463] [❌] - At least one job in run_once() failed

edit: erreur de ma part, le niveau de log avait été changé.

Par contre je constate que j’ai un service example.org genéré par le scheduler que je ne peux pas supprimer.

Ce certificat est celui du serveur par défaut (example.org)