Sudden UTF-8 parsing error with Certbot


I host multiple domains on a server.
I successfully had certbot running with certbot renew for years.

Suddenly I get

Attempting to renew cert ( from /etc/letsencrypt/renewal/ produced an unexpected error: 'utf-8' codec can't decode byte 0xf6 in position 1: invalid start byte. Skipping.

Errors for some domains, but not all.

I have not touched those files and UTF-8 0xf6 (German ö) does not appear in the files:

# renew_before_expiry = 30 days
version = 0.40.0
archive_dir = /etc/letsencrypt/archive/
cert = /etc/letsencrypt/live/
privkey = /etc/letsencrypt/live/
chain = /etc/letsencrypt/live/
fullchain = /etc/letsencrypt/live/

# Options used in the renewal process
account = c9cbf332e7fa4987867262a1cee515ad
authenticator = apache
installer = apache
server =

Log is:

2023-08-15 16:24:31,372:INFO:certbot.renewal:Cert not yet due for renewal
2023-08-15 16:24:31,373:DEBUG:certbot.plugins.selection:Requested authenticator standalone and installer None
2023-08-15 16:24:31, renew, less than 30 days before certificate expiry 2023-09-08 07:23:08 UTC.
2023-08-15 16:24:31,379:INFO:certbot.renewal:Cert is due for renewal, auto-renewing...
2023-08-15 16:24:31,379:DEBUG:certbot.plugins.selection:Requested authenticator apache and installer apache
2023-08-15 16:24:31,469:DEBUG:certbot_apache.configurator:Apache version is 2.4.41
2023-08-15 16:24:31,766:WARNING:certbot.renewal:Attempting to renew cert ( from /etc/letsencrypt/renewal/ produced an unexpected error: 'utf-8' codec can't decode byte 0xf6 in position 1: invalid start byte. Skipping.
2023-08-15 16:24:31,767:DEBUG:certbot.renewal:Traceback was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/certbot/", line 462, in handle_renewal_request
    main.renew_cert(lineage_config, plugins, renewal_candidate)
  File "/usr/lib/python3/dist-packages/certbot/", line 1202, in renew_cert
    installer, auth = plug_sel.choose_configurator_plugins(config, plugins, "certonly")
  File "/usr/lib/python3/dist-packages/certbot/plugins/", line 226, in choose_configurator_plugins
    installer = pick_installer(config, req_inst, plugins, installer_question)
  File "/usr/lib/python3/dist-packages/certbot/plugins/", line 30, in pick_installer
    return pick_plugin(
  File "/usr/lib/python3/dist-packages/certbot/plugins/", line 105, in pick_plugin
  File "/usr/lib/python3/dist-packages/certbot/plugins/", line 252, in prepare
    return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
  File "/usr/lib/python3/dist-packages/certbot/plugins/", line 252, in <listcomp>
    return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
  File "/usr/lib/python3/dist-packages/certbot/plugins/", line 130, in prepare
  File "/usr/lib/python3/dist-packages/certbot_apache/", line 260, in prepare
    self.vhosts = self.get_virtual_hosts()
  File "/usr/lib/python3/dist-packages/certbot_apache/", line 895, in get_virtual_hosts
    new_vhost = self._create_vhost(path)
  File "/usr/lib/python3/dist-packages/certbot_apache/", line 871, in _create_vhost
  File "/usr/lib/python3/dist-packages/certbot_apache/", line 821, in _add_servernames
    servername, serveraliases = self._get_vhost_names(host.path)
  File "/usr/lib/python3/dist-packages/certbot_apache/", line 803, in _get_vhost_names
    serveralias = self.parser.get_arg(alias)
  File "/usr/lib/python3/dist-packages/certbot_apache/", line 660, in get_arg
    value = self.aug.get(match)
  File "/usr/lib/python3/dist-packages/", line 147, in get
    return dec(value.value)
  File "/usr/lib/python3/dist-packages/", line 65, in dec
    return st.decode(AUGENC)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 1: invalid start byte

Apache 2.4.41 @ Ubuntu 20.04.6; Certbot 0.40.0

Thanks for your time!

1 Like

Hi @ThomasBarth, and welcome to the LE community forum :slight_smile:

I would replace the file:

with the clean contents shown:

And also test against the staging environment until this is resolved.


One of your Apache configuration files contains a non-valid, non-UTF character. Most likely the first character of one of the files looking at the error message.

Maybe grep can help:

grep -RP "\xf6" /etc/apache2/

(Not sure if your Apache dir is called apache2 tho, please change the directory if applicable.)


Yep, that was the issue. Grep did not show me the file but knowing what I had to look for I found the apache config file with the 0xf6 a.k. ö in it.



This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.