Error certificat ssl

Hello,
I have been having an error for a long time when renewing my ssl certificate.
Is there a tutorial to delete the certificate properly?
Capture d’écran 2021-12-19 155638

To create another one, normally, it is easy to do it, just go to https://192.168.1.12:4443/?app=letsencrypt

Thanks in advance

To renew the certificate, the server must be reachable from outside and not only from your LAN.

I use a subdomain name
example: data.domain.com

It says to check /var/log/letsencrypt/letsencrypt.log for more details. Normally, they put such information there for a reason, did you check that?

But this will not work because the CA can’t reach your server from outside, and you need port 443 as well open from outside and not 4443.

I have this in the file /var/log/letsencrypt/letsencrypt.log

2021-12-19 05:55:56,052:DEBUG:certbot.main:certbot version: 0.31.0
2021-12-19 05:55:56,053:DEBUG:certbot.main:Arguments: ['-q']
2021-12-19 05:55:56,053:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nul$
2021-12-19 05:55:56,075:DEBUG:certbot.log:Root logging level set at 30
2021-12-19 05:55:56,076:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2021-12-19 05:55:56,098:DEBUG:certbot.plugins.selection:Requested authenticator <certbot.cli._Default object at 0xb533ec70>$
2021-12-19 05:55:56,117:INFO:certbot.renewal:Cert not yet due for renewal
2021-12-19 05:55:56,119:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None
2021-12-19 05:55:56,122:WARNING:certbot.renewal:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/certbot/renewal.py", line 68, in _reconstitute
    renewal_candidate = storage.RenewableCert(full_path, config)
  File "/usr/lib/python3/dist-packages/certbot/storage.py", line 463, in __init__
    self._check_symlinks()
  File "/usr/lib/python3/dist-packages/certbot/storage.py", line 522, in _check_symlinks
    "expected {0} to be a symlink".format(link))
certbot.errors.CertStorageError: expected /etc/letsencrypt/live/data.domaine.com/cert.pem to be a symlink
2021-12-19 05:55:56,127:WARNING:certbot.renewal:Renewal configuration file /etc/letsencrypt/renewal/data.domaine.com$
2021-12-19 05:55:56,128:DEBUG:certbot.renewal:Traceback was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/certbot/renewal.py", line 68, in _reconstitute
    renewal_candidate = storage.RenewableCert(full_path, config)
  File "/usr/lib/python3/dist-packages/certbot/storage.py", line 463, in __init__
    self._check_symlinks()
  File "/usr/lib/python3/dist-packages/certbot/storage.py", line 522, in _check_symlinks
    "expected {0} to be a symlink".format(link))
certbot.errors.CertStorageError: expected /etc/letsencrypt/live/data.domaine.com/cert.pem to be a symlink

2021-12-19 05:55:56,128:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
  File "/usr/bin/certbot", line 11, in <module>
    load_entry_point('certbot==0.31.0', 'console_scripts', 'certbot')()
  File "/usr/lib/python3/dist-packages/certbot/main.py", line 1365, in main
    return config.func(config, plugins)

these are normally symlinks like:
cert.pem → …/…/archive/nextcloud.example.org/cert28.pem

If you have recreated the certificates several times manually, you have perhaps several overlapping configurations?

That’s probably it.
How to remove certificates if there are any?

in /etc/letsencrypt/live/data.domaine.com-0001 the file data.domain.com-0001 is empty

in /etc/letsencrypt/renewal
I have two files
data.domain.com-0001.conf
data.domain.com.conf

please, how to cleanly delete the certificates i have ?

sudo certbot delete

Will present you with a numbered list of all your certificates, select the number(s) you want to remove.

Thank you very much?
Is it better to disable the certificate in the web interface
https://192.168.1.12:4443/?app=letsencrypt ?

I deleted the certificate but now I can’t access the web interface to create the certificate
https://192.168.1.12:4443/?app=letsencrypt
How do I generate a certificate with the terminal in ssl please?

Finally I managed to access the page, I will generate a new certificate to see if I have no more errors

thank you for your help