I wished I could upload a txt file but it seems that is not possible. I added output of 'ps aux' as attachment. In this I am assuming that snapd is actually the user responsible to run certbot. Snapd is running as root.
Hereby the output of the /var/log/letsencrypt/letsencrypt.log for today:
2025-02-05 12:31:05,328:DEBUG:urllib3.connectionpool:http://localhost:None "GET /v2/connections?snap=certbot&interface=content HTTP/1.1" 200 97
2025-02-05 12:31:05,447:DEBUG:certbot._internal.main:certbot version: 3.1.0
2025-02-05 12:31:05,447:DEBUG:certbot._internal.main:Location of certbot entry point: /snap/certbot/4325/bin/certbot
2025-02-05 12:31:05,447:DEBUG:certbot._internal.main:Arguments: ['--nginx', '-d', 'themusthaves.co.uk', '--preconfigured-renewal']
2025-02-05 12:31:05,447:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2025-02-05 12:31:05,467:DEBUG:certbot._internal.log:Root logging level set at 30
2025-02-05 12:31:05,467:DEBUG:certbot._internal.plugins.selection:Requested authenticator nginx and installer nginx
2025-02-05 12:31:05,475:ERROR:certbot.util:Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: configuration file /etc/nginx/nginx.conf test failed
2025-02-05 12:31:05,475:DEBUG:certbot._internal.plugins.disco:Misconfigured PluginEntryPoint#nginx: Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: configuration file /etc/nginx/nginx.conf test failed
Traceback (most recent call last):
File "/snap/certbot/4325/lib/python3.12/site-packages/certbot_nginx/_internal/configurator.py", line 1008, in config_test
util.run_script([self.conf('ctl'), "-c", self.nginx_conf, "-t"])
File "/snap/certbot/4325/lib/python3.12/site-packages/certbot/util.py", line 199, in run_script
raise errors.SubprocessError(msg)
certbot.errors.SubprocessError: Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: configuration file /etc/nginx/nginx.conf test failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/snap/certbot/4325/lib/python3.12/site-packages/certbot/_internal/plugins/disco.py", line 112, in prepare
self._initialized.prepare()
File "/snap/certbot/4325/lib/python3.12/site-packages/certbot_nginx/_internal/configurator.py", line 204, in prepare
self.config_test()
File "/snap/certbot/4325/lib/python3.12/site-packages/certbot_nginx/_internal/configurator.py", line 1010, in config_test
raise errors.MisconfigurationError(str(err))
certbot.errors.MisconfigurationError: Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: configuration file /etc/nginx/nginx.conf test failed
2025-02-05 12:31:05,476:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * nginx
Description: Nginx Web Server plugin
Interfaces: Authenticator, Installer, Plugin
Entry point: EntryPoint(name='nginx', value='certbot_nginx._internal.configurator:NginxConfigurator', group='certbot.plugins')
Initialized: <certbot_nginx._internal.configurator.NginxConfigurator object at 0x7fcc6493e570>
Prep: Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: configuration file /etc/nginx/nginx.conf test failed