The receipt of certificates has broken, How to fix it?

I don’t understand what happened, how to fix it now?

2025-05-30 11:20:16 INFO  site=voda <0.1431.0> [z_module_manager:handle_info/2:828] ▸ text="Module mod_ssl_letsencrypt stopped, reason {badarg,
\
                                            [{erlang,hd,\
                                              [[]],\
                                              [{error_info,\
                                                #{module =>\
                                                   erl_erts_errors}}]},\
                                             {zotonic_ssl_certs,\
                                              decode_cert_data,1,\
                                              [{file,\
                                                \"/home/oper/Programs/zotonic/_build/default/lib/zotonic_ssl/src/zotonic_ssl_certs.erl\"},\
                                               {line,174}]},\
                                             {mod_ssl_letsencrypt,\
                                              do_load_cert,1,\
                                              [{file,\
                                                \"/home/oper/Programs/zotonic/_build/default/lib/zotonic_mod_ssl_letsencrypt/src/mod_ssl_letsencrypt.erl\"},\
                                               {line,353}]},\
                                             {mod_ssl_letsencrypt,\
                                              handle_cast,2,\
                                              [{file,\
                                                \"/home/oper/Programs/zotonic/_build/default/lib/zotonic_mod_ssl_letsencrypt/src/mod_ssl_letsencrypt.erl\"},\
                                               {line,257}]},\
                                             {gen_server,try_dispatch,4,\
                                              [{file,\"gen_server.erl\"},\
                                               {line,1123}]},\
                                             {gen_server,handle_msg,6,\
                                              [{file,\"gen_server.erl\"},\
                                               {line,1200}]},\
                                             {proc_lib,init_p_do_apply,3,\
                                              [{file,\"proc_lib.erl\"},\
                                               {line,240}]}]}"
2025-05-30 11:20:16 ERROR <0.1288.0> [supervisor:do_restart/3:757] ▸ report=[{supervisor,{local,'z_module_sup$voda'}},{errorContext,child_terminated},{offender,[{pid,<0.1482.0>},{id,mod_ssl_letsencrypt},{mfargs,{mod_ssl_letsencrypt,start_link,undefined}},{restart_type,temporary},{significant,false},{shutdown,5000},{child_type,worker}]}] label={supervisor,child_terminated}

Could you please provide more information? Based on error logs there some part of configuration is missed. Could you please share config file of your project?

what configuration do you want to see?

Read this documentation Port configurations @ Zotonic, based on logs you have issue with mod_ssl_letsencrypt @ Zotonic module - it looks like that some data is not configured as well, maybe missed certificates configuration or something like that. So, read official documentation, try detect config parts which is missed there - if this is not help, share all configurations of Zotonic project here. Then community will try investigate and detect problem.

%% -*- mode: erlang -*-
[
    {exometer_core, [
        {predefined, [
            {[erlang, memory], {function, erlang, memory, [], value, []}, []},
            {[erlang, system_info], {function, erlang, system_info, ['$dp'], value, [process_count]}, []},
            {[erlang, statistics], {function, erlang, statistics, ['$dp'], value, [run_queue]}, []},
            {[erlang, io], {function, erlang, statistics, [io], match, {{'_', input}, {'_', output}}}, []}
        ]}
    ]},

    {kernel, [
        % Minimum log level for all loggers below.
        {logger_level, info},

        {logger, [

            %% To use logstash:
            %% - Enable the logstasher_h handler
            %% - Configure logstasher (see below the kernel config)
            %%
            % {handler, logstash, logstasher_h,
            %     #{
            %         level => info
            %     }
            % },

            % Log of all information to the terminal/console.
            % The 'logger_level' above defines what is shown on the console.
            {handler, default, z_logger_h,
                #{
                    level => debug,
                    formatter => {z_logger_formatter,
                        #{
                            prettify => true,
                            colored => true,
                            time_designator => $\s,
                            time_offset => "",
                            time_unit => second,
                            strip_tz => true,
                            level_capitalize => true
                        }
                    }
                }
            },

            % Error log on disk.
            % LOG_DIR is replaced with the default Zotonic ZOTONIC_LOG_DIR directory.
            {handler, error_log, z_logger_h,
                #{
                    level => error,
                    config => #{
                        type => file,
                        file => "LOG_DIR/error.log",
                        max_no_files => 10,
                        max_no_bytes => 52428800 % 10 x 5mb
                    },
                    formatter => {z_logger_formatter,
                        #{
                            prettify => true,
                            colored => false,
                            time_designator => $\s,
                            time_offset => "",
                            time_unit => second,
                            strip_tz => true,
                            level_capitalize => true
                        }
                    }
                }
            },

            % Console log on disk.
            % LOG_DIR is replaced with the default Zotonic ZOTONIC_LOG_DIR directory.
            {handler, console_log, z_logger_h,
                #{
                    level => debug,
                    config => #{
                        type => file,
                        file => "LOG_DIR/console.log",
                        max_no_files => 10,
                        max_no_bytes => 52428800 % 10 x 5mb
                    },
                    formatter => {z_logger_formatter,
                        #{
                            prettify => true,
                            colored => false,
                            time_designator => $\s,
                            time_offset => "",
                            time_unit => second,
                            strip_tz => true,
                            level_capitalize => true
                        }
                    }
                }
            }
        ]}
    ]},

    %% Logstash configuration.
    %% If a logger handler with 'logstasher_h' is defined then zotonic_core will start the
    %% logstasher application.
    {logstasher, [
        {transport, console}, % tcp | udp | console
        {host, "localhost"},  % inet:hostname()
        {port, 5000}          % inet:port_number()
    ]},

    %% Emit a disk full warning above this threshold. Use a float between 0.0 and 1.0 (inclusive).
    {os_mon, [
        {disk_almost_full_threshold, 0.9}
    ]},

    %%% The directories below will be set according to the log_dir, data_dir and cache_dir

    % {setup, [
    %     {data_dir, "data"},
    %     {log_dir,  "logs"}
    % ]},

    % {filezcache, [
    %     {data_dir, "data/filezcache/data"},
    %     {journal_dir, "data/filezcache/journal"}
    % ]},

    % {mnesia, [
    %     {dir, setup}  % Use the config from setup -- handled by zotonic_core
    % ]},

    %% SSL application configuration.
    %%
    %% For details see: http://erlang.org/doc/man/ssl_app.html
    {ssl, [
        %% The max number of cached SSL parameters. Increase if you have a lot of clients
        %% connecting to your server.
        {session_cache_server_max, 20000},

        %% The amount of time the parameters are cached. (in seconds).
        {session_lifetime, 300}, % 5 minutes

        %% The time between pem cache cleanups (in milliseconds)
        {ssl_pem_cache_clean, 300000} % 5 minutes
    ]}
].

[{zotonic,
  [

%%% DTAP status of this site
%%% One of: development, test, acceptance, production, education, or backup
   %% {environment, production},

%%% Default timezone (for example: <<"Europe/Berlin">>)
    {timezone, <<"Asia/Yakutsk">>},

%%% PostgreSQL database defaults.
%%% These are the defaults for the equally named options in your site's config file.
    {dbdatabase, "!!!!!!"},
    {dbschema, "public"},
    {dbpassword, "!!!!!!"},
    {dbuser, "postgres"},
    {dbport, 5432},
    {dbhost, "localhost"},

%%% By default, Zotonic will create a postgres database for you if it doesn't
%%% already exist, and install tables in it. Uncomment the options below
%%% to prevent that.
   %% {dbcreate, false},
   %% {dbinstall, false},

%%% Server header returned by Cowboy, defaults to "Zotonic"
    {server_header, "!!!!"},

%%% IP address on which Zotonic will listen for HTTP requests.
%%% Always overridden by the ZOTONIC_IP environment variable.
%%% This can be a tuple, or a (domain) string ("localhost" or "127.0.0.1")
%%% Use 'any' for all IP addresses.
    {listen_ip, any},

%%% IPv6 address on which Zotonic will listen for HTTP requests.
%%% Always overridden by the ZOTONIC_IP6 environment variable.
%%% Defaults to 'listen_ip' (if listen_ip is a hostname or "127.0.0.1")
%%% use 'any' for all IPv6 addresses, 'none' to disable
   %% {listen_ip6, any},

%%% Port on which Zotonic will listen for HTTP requests.
%%% Always overridden by the ZOTONIC_LISTEN_PORT environment variable.
    {listen_port, 8000},

%%% Port on which Zotonic will listen for HTTPS requests.
%%% Always overridden by the ZOTONIC_SSL_LISTEN_PORT environment variable.
%%% Set to the atom 'none' to disable SSL
    {ssl_listen_port, none},

%%% Outside port that clients send HTTP requests to.
%%% Always overridden by the ZOTONIC_PORT environment variable.
%%% Defaults to listen_port.
    {port, 80},

%%% Outside port that clients send HTTPS requests to.
%%% Always overridden by the ZOTONIC_SSL_PORT environment variable.
%%% Defaults to ssl_listen_port.
    {ssl_port, 443},

%% Data dir, used to store files for sites, mnesia files, etc.
%% Defaults to the OS directories:
%%   Linux: $HOME/.local/share/zotonic/
%%   macOS: $HOME/Library/Application Support/zotonic/
   %% {data_dir, "data"},

%% Log dir, used to store log files.
%% Defaults to the OS directories:
%%   Linux: $HOME/.cache/zotonic/log/
%%   macOS: $HOME/Library/Logs/zotonic/
   %% {log_dir, "logs"},

%% Security dir, used to store certificates and other secrets
%% Defaults to the OS directories:
%%   Linux: $HOME/.config/zotonic/security/
%%   macOS: $HOME/Library/Application Support/zotonic/security/
   %% {security_dir, "security"},

%% Cache dir, used to store temporary files and caches.
%% Defaults to the OS directories:
%%   Linux: $HOME/.cache/zotonic/
%%   macOS: $HOME/Library/Caches/zotonic/
   %% {cache_dir, "caches"},

%%% Maximum http connections, the ipv4 and ipv6 connections are counted separately
%%% Use 'infinity' to disable the max connections
   %% {max_connections, 20000},

%%% Maximum https connections, the ipv4 and ipv6 connections are counted separately
%%% Use 'infinity' to disable the max connections
   %% {ssl_max_connections, 20000},

%%% Maximum mqtt connections, the ipv4 and ipv6 connections are counted separately
%%% Use 'infinity' to disable the max connections
   %% {mqtt_max_connections, 10000},

%%% Maximum mqtt ssl connections, the ipv4 and ipv6 connections are counted separately
%%% Use 'infinity' to disable the max connections
   %% {mqtt_ssl_max_connections, 10000},

%%% IP address for MQTT connections - defaults to 'listen_ip'
%%% Use 'none' to disable.
   %% {mqtt_listen_ip, any},

%%% IPv6 address for MQTT connections - defaults to 'listen_ip6'
%%% Use 'none' to disable.
   %% {mqtt_listen_ip6, any},

%%% Port number for MQTT connections
   %% {mqtt_listen_port, 1883},

%%% Port number for MQTT ssl connections
   %% {mqtt_listen_ssl_port, 8883},

%%% If you are running Zotonic behind a proxy then set this to the proxy's internal ip addresses.
%%% The proxy must terminate SSL.
%%% Possible values: none, local, any, ip_allowlist, or string with netmasks: "127.0.0.0/8,10.0.0.0/8"
%%    {proxy_allowlist, local},

%%% SMTP outbound relay configuration.
%%% Zotonic will send email itself, enable a relay if outgoing port 25 traffic is blocked.
   %% {smtp_relay, false},
   %% {smtp_host, "localhost"},
   %% {smtp_port, 25},
   %% {smtp_ssl, false},
   %% {smtp_username, undefined},
   %% {smtp_password, undefined},

%%% SMTP send all email into a blackhole, ideal for testing large mailings
   %% {smtp_is_blackhole, false},

%%% SMTP extra relay options:
%%% some picky/buggy/misconfigured relays might need one of these to be enabled.
   %% {smtp_no_mx_lookups, false},
   %% {smtp_verp_as_from, false},
   %% {smtp_bounce_email_override, "me@example.com"},

%%% SMTP mail queue.
%%% How long to keep sent messages in the mail queue (in minutes).
%%% Leave it long enough to receive any bounce message.
   %% {smtp_delete_sent_after, 240},

%%% SMTP debug options.
%%% Send a copy of outgoing mail to this address:
   %% {smtp_bcc, "bcc@localhost"},
%%% Send all mail to this address instead of the original recipient:
   %% {email_override, "override@localhost"},

%%% SMTP Inbound Server Options.
%%% Always overridden by the environment variables:
%%% ZOTONIC_SMTP_LISTEN_DOMAIN, ZOTONIC_SMTP_LISTEN_IP and ZOTONIC_SMTP_LISTEN_PORT.
   %% {smtp_listen_domain, undefined},
   %% {smtp_listen_ip, "127.0.0.1"},
   %% {smtp_listen_port, 2525},

%%% SMTP Spamassassin options
%%% Enable SMTP incoming message filtering by setting the listening address of spamd
   %% {smtp_spamd_ip, {127,0,0,1}},
   %% {smtp_spamd_port, 783},

%%% SMTP DNSBL Realtime DNS Block Lists and White Lists
%%% These services are checked for DNSBL listings upon receiving email, set to an
%%% empty list to disable the DNSBL checks. The default list is defined in
%%% zotonic_stdlib/src/z_email_dnsbl.erl
   %% {smtp_dns_blocklist, ["zen.spamhaus.org", "dnsbl.sorbs.net"]},
   %% {smtp_dns_allowlist, ["list.dnswl.org", "swl.spamhaus.org"]},

%%% ClamAV settings, used by mod_clamav for virus scanning.
%%% Check your clamd config for the correct values.
%%% The clamav_max_size is the byte value of StreamMaxLength, which defaults to 25M
   %% {clamav_ip, "127.0.0.1"},
   %% {clamav_port, 3310},
   %% {clamav_max_size, 26214400},

%%% IP allowlist, used for accessing sites with a default "admin" password
%%% The allowlist is one or more of the following values, separated with a comma:
%%%   - local
%%%   - any
%%%   - none
%%%   - an ip4 address: 1.2.3.4
%%%   - an ip6 address: ::1
%%%   - an ip address with mask: 192.168.0.0/16
%%% The value 'local' is using an optimized matching method and equals to:
%%%   - "127.0.0.0/8,10.0.0.0/8,192.168.0.0/16,172.16.0.0/12,169.254.0.0/16,::1,fd00::/8,fe80::/10,100.64.0.0/10"
   %% {ip_allowlist, local},

%%% Zotonic Status IP allowlist, used for restricting access to system management screens. Default no restriction.
   %% {ip_allowlist_system_management, any},

%%% Inet request backlog, increase when requests are being dropped.
   %% {inet_backlog, 500},

%%% Inet acceptor pool size. Configure the number of processes waiting for incoming requests. Increase when
%%% request take long to be accepted and you hit the backlog.
   %% {inet_acceptor_pool_size, 75},

%%% SSL request backlog, increase when requests are being dropped.
%%% When this value is not set, the inet_backlog setting is used.
   %% {ssl_backlog, 500},

%%% SSL acceptor pool size. Configure the number of processes waiting for incoming ssl requests. Increase when
%%% request take long to be accepted and you hit the backlog. Note that the ssl acceptor pool is bigger. The
%%% reason for this is that accepting ssl requests is much slower than normal request. Especially if you have
%%% slow clients.
%%% When this value is not set, the inet_acceptor_pool_size setting is used.
   %% {ssl_acceptor_pool_size, 75},

%%% The access log is sent to syslog. The collection of access logs to files must be configured
%%% by configuring syslog on the system. See syslogd(8) on Linux, or the appropriate documentation
%%% of your host system.
   %% {syslog_ident, "zotonic"},
   %% {syslog_opts, [ndelay]},
   %% {syslog_facility, local0},
   %% {syslog_level, info}, % OSX shows messages from level notice and higer.

%%% Default ImageMagick color space. Some ImageMagick versions (like 6.7.0 and above)
%%% use the RGB colorspace, so all images are darker than the original.
%%% Possible Values:
%%% CMY, CMYK, Grey, HCL, HSB, HSL, HWB, Lab, LCH, LMS, Log, Luv, OHTA,
%%% Rec601Luma, Rec601YCbCr, Rec709Luma, Rec709YCbCr, RGB, sRGB, Transparent,
%%% XYZ, YCbCr, YCC, YIQ, YCbCr, YUV.
   %% {default_colorspace, "sRGB"},

%%% Automatically compile and load changed files. You must have inotify or fswatch installed.
   %% {filewatcher_enabled, true},

%%% Scan for changed files beam files if inotify and fswatch are not enabled
%%% Enabling this will make the system slower, it is advised to use inotify and/or fswatch
   %% {filewatcher_scanner_enabled, true},

%% Interval the manual directory scan for changes is made (if inotify and fswatch are not present).
%% In milliseconds, lower values makes your system slower. With higher values updates to the source
%% code will take longer to be detected.
   %% {filewatcher_scanner_interval, 10000},

%%% Maximum number of entries in the metrics log buffer. There are two buffers, one for 1/2/3xx
%%% results and one for 4/5xx results. All metrics are buffered so that the loggers can easily
%%% handle spikes.
   %% {log_http_metrics_buffer_size, 10000},

%%% Maximum number of concurrent sidejob processes. Every client request sent over
%%% Websocket is executed in a sidejob process. Default is 10% of the process_limit
   %% {sessionjobs_limit, 20000},

%%% Maximum number of concurrent spawned sidejobs. This includes processes spawned and linked
%%% to the session and page-sessions. Default is 50% of the process_limit.
   %% {sidejobs_limit, 100000},

%%% Password for the sites administration site (zotonic_status). Will be generated on
%%% first Zotonic startup, if the zotonic.config file does not yet exist.
%%% The corresponding account name is 'wwwadmin'
   {password, "HCPtcb3YW"}

  ]
 }
].