== demo-hp 2026-11-11T13:26:29Z pve pve-manager/9.2.26/41a0e2e09b9e6f9d (running kernel: 7.0.14-28-pve)
== served certificate (network read, 127.0.0.1:8006)
subject=OU=PVE Cluster Node, O=Proxmox Virtual Environment, CN=demo-hp.local
issuer=CN=Proxmox Virtual Environment, OU=bd229733-676d-4c57-a395-a33de3263545, O=PVE Cluster Manager CA
notBefore=Aug 20 15:44:42 2026 GMT
notAfter=Aug 19 15:44:42 2028 GMT
sha256 Fingerprint=07:B5:72:5D:5E:C1:23:51:4D:58:B9:38:E2:0E:6E:AA:4E:D3:54:10:44:61:0C:27:5E:44:07:83:65:05:07:BB
X509v3 Subject Alternative Name: 
    IP Address:127.0.0.1, IP Address:0:0:0:0:0:0:0:1, DNS:localhost, IP Address:192.168.0.104, DNS:demo-hp, DNS:demo-hp.local
== files
-rw------- 1 root www-data 3272 2026-08-21 17:44:42.000000000 +0200 /etc/pve/priv/pve-root-ca.key
-rw-r----- 1 root www-data 2094 2026-08-21 17:44:42.000000000 +0200 /etc/pve/pve-root-ca.pem

/etc/pve/local/:
total 2
drwxr-xr-x 2 root www-data    0 2026-08-21 17:44:42.000000000 +0200 .
drwxr-xr-x 2 root www-data    0 2026-08-21 17:44:42.000000000 +0200 ..
-rw-r----- 1 root www-data   83 2026-11-11 14:26:26.000000000 +0100 lrm_status
drwxr-xr-x 2 root www-data    0 2026-08-21 17:44:42.000000000 +0200 lxc
drwxr-xr-x 2 root www-data    0 2026-08-21 17:44:42.000000000 +0200 openvz
drwx------ 2 root www-data    0 2026-08-21 17:44:42.000000000 +0200 priv
-rw-r----- 1 root www-data 1704 2026-08-21 17:44:42.000000000 +0200 pve-ssl.key
-rw-r----- 1 root www-data 1785 2026-08-21 17:44:42.000000000 +0200 pve-ssl.pem
drwxr-xr-x 2 root www-data    0 2026-08-21 17:44:42.000000000 +0200 qemu-server
-rw-r----- 1 root www-data  560 2026-11-10 15:43:03.000000000 +0100 ssh_known_hosts
-- /etc/pve/local/pve-ssl.pem
subject=OU=PVE Cluster Node, O=Proxmox Virtual Environment, CN=demo-hp.local
issuer=CN=Proxmox Virtual Environment, OU=bd229733-676d-4c57-a395-a33de3263545, O=PVE Cluster Manager CA
notBefore=Aug 20 15:44:42 2026 GMT
notAfter=Aug 19 15:44:42 2028 GMT
sha256 Fingerprint=07:B5:72:5D:5E:C1:23:51:4D:58:B9:38:E2:0E:6E:AA:4E:D3:54:10:44:61:0C:27:5E:44:07:83:65:05:07:BB
-- /etc/pve/pve-root-ca.pem
subject=CN=Proxmox Virtual Environment, OU=bd229733-676d-4c57-a395-a33de3263545, O=PVE Cluster Manager CA
issuer=CN=Proxmox Virtual Environment, OU=bd229733-676d-4c57-a395-a33de3263545, O=PVE Cluster Manager CA
notBefore=Aug 20 15:44:42 2026 GMT
notAfter=Aug 17 15:44:42 2036 GMT
sha256 Fingerprint=E2:2E:E9:F0:E3:3F:76:4A:11:38:87:E8:EF:67:24:C5:83:3A:9F:68:C1:20:BD:64:F4:40:54:93:22:29:DC:F7
ls: cannot access '/etc/pve/local/pveproxy-ssl.pem': No such file or directory
== agent
felhom-agent 0.173.0
active
Restart=on-failure
NRestarts=0
ActiveEnterTimestamp=Tue 2026-11-10 15:58:17 CET
proxmox keys: ['endpoint', 'node', 'tls', 'token']
endpoint : https://127.0.0.1:8006
node : demo-hp
token : <present>
tls: {'fingerprint': '07:B5:72:5D:5E:C1:23:51:4D:58:B9:38:E2:0E:6E:AA:4E:D3:54:10:44:61:0C:27:5E:44:07:83:65:05:07:BB', 'insecure_skip_verify': False}
total 28
drwxr-xr-x   2 root         root         4096 2026-09-28 16:25:22.412907166 +0200 .
drwxr-xr-x 102 root         root         4096 2026-11-08 02:49:07.920613811 +0100 ..
-rw-------   1 felhom-agent felhom-agent 2454 2026-09-28 16:25:22.443523132 +0200 agent.json
-rw-------   1 felhom-agent felhom-agent 2498 2026-09-24 15:33:45.307471226 +0200 agent.json.night-0925-off
-rw-------   1 felhom-agent felhom-agent 2451 2026-09-24 21:56:34.103084862 +0200 agent.json.pre-a4-retention
-rw-------   1 felhom-agent felhom-agent 2451 2026-09-24 21:57:43.930322856 +0200 agent.json.pre-d44
-rw-------   1 root         root         2451 2026-08-21 18:09:15.470472229 +0200 agent.json.pre-r672
8:# allowlist in /etc/sudoers.d/felhom-agent (configs/felhom-agent.sudoers). The User= here and the
39:User=felhom-agent
41:ExecStart=/usr/local/bin/felhom-agent --config /etc/felhom-agent/agent.json
== agent log, last proxmox lines
4422
pam_unix(sudo:session): session closed for user root
felhom-agent : PWD=/ ; USER=root ; COMMAND=/usr/sbin/pct exec 9201 -- cat /etc/network/interfaces
pam_unix(sudo:session): session opened for user root(uid=0) by (uid=999)
pam_unix(sudo:session): session closed for user root
pam_unix(sudo:session): session closed for user root
felhom-agent : PWD=/ ; USER=root ; COMMAND=/usr/sbin/pct exec 9201 -- pgrep -x dhclient
pam_unix(sudo:session): session opened for user root(uid=0) by (uid=999)
pam_unix(sudo:session): session closed for user root
== who calls port 8006 (pveproxy access log, client addresses, last 2 days)
  75375 ::ffff:127.0.0.1
-- users seen
  75374 ::ffff:127.0.0.1 felhom-agent@pve!agent
      1 ::ffff:127.0.0.1 -
== listening / other TLS users of this cert
LISTEN 0      4096       127.0.0.1:85        0.0.0.0:*    users:(("pvedaemon worke",pid=235161,fd=6),("pvedaemon worke",pid=168847,fd=6),("pvedaemon w
LISTEN 0      4096               *:8006            *:*    users:(("pveproxy worker",pid=316496,fd=6),("pveproxy worker",pid=308404,fd=6),("pveproxy wo
LISTEN 0      4096               *:3128            *:*    users:(("spiceproxy work",pid=1733482,fd=6),("spiceproxy",pid=1399,fd=6))                   
== in flight
running tasks: []
      VMID NAME                 STATUS     MEM(MB)    BOOTDISK(GB) PID       
       341 night1004-tester1    running    8192             200.00 1950      
      9384 golden1111-box       running    10240             64.00 313884    
VMID       Status     Lock         Name                
9201       running                 demo-hp             
9202       running                 demo-hp-scratch     
9401       stopped                 upgrade-harness     
== tools' own help
USAGE: pvecm updatecerts  [OPTIONS]

  Update node certificates (and generate all needed files/directories).

  --force    <boolean>
	     Force generation of new SSL certificate.

  --silent   <boolean>
	     Ignore errors (i.e. when cluster has no quorum).

  --unmerge-known-hosts <boolean>   (default=0)
	     Unmerge legacy SSH known hosts.


USAGE: pvenode cert delete [<restart>]

  DELETE custom certificate chain and key.

  <restart>  <boolean>	 (default=0)
	     Restart pveproxy.

USAGE: pvenode cert info  [FORMAT_OPTIONS]

  Get information about node's certificates.

USAGE: pvenode cert set <certificates> [<key>] [OPTIONS] [FORMAT_OPTIONS]

  Upload or update custom certificate chain and key.

  <certificates> <string>
	     PEM encoded certificate (chain).

  <key>      <string>
	     PEM encoded private key.

  --force    <boolean>	 (default=0)
	     Overwrite existing custom or ACME certificate files.

  --restart  <boolean>	 (default=0)
	     Restart pveproxy.


== renew rule in code
83:my $pveca_cert_days = 3650;
85:my $pvessl_cert_max_days = 2 * 365;
86:my $pvessl_cert_days_before_ca = 2;
438:            '-days',
439:            $pveca_cert_days,
478:# certificate chain up to the renewed one, and clients trusting the previous one accept new node
479:# certificates until it expires. Returns the expiry of the previous one if it got renewed.
480:sub renew_pveca_cert {
483:    my $renewal_reason = sub {
484:        my $min_days = $pvessl_cert_max_days + $pvessl_cert_days_before_ca;
485:        if (PVE::Certificate::check_expiry($pveca_cert_fn, time() + $min_days * 24 * 60 * 60)) {
486:            return 'expires within two years';
501:    my $reason = $renewal_reason->() or return undef;
503:    my $old_expiry = PVE::Cluster::cfs_lock_domain(
507:            return undef if !$renewal_reason->(); # another node renewed it in the meantime
519:                    '-days', $pveca_cert_days,
528:                    die "subject of renewed certificate differs\n";
535:                die "renewing pve root certificate failed:\n$err";
543:    if ($old_expiry) {
544:        my $deadline = localtime($old_expiry);
545:        print "Renewed cluster CA certificate, as the previous one $reason. Clients that trust"
546:            . " the previous one must import the renewed $pveca_cert_fn before $deadline\n";
549:    return $old_expiry;
579:# and its expiry. A certificate from another issuer was placed there by an admin and must be kept.
685:            # get ca expiry
687:            my $daysleft = int(($cainfo->{notafter} - time()) / (24 * 60 * 60));
689:            if ($daysleft < 14) {
690:                die "CA expires in less than 2 weeks, unable to generate certificate.\n";
693:            $daysleft -= $pvessl_cert_days_before_ca;
695:            if ($daysleft >= $pvessl_cert_max_days) {
/usr/bin/pveupdate:86:            my $lead_time = PVE::Certificate::get_cert_renew_lead_time($cert);
/usr/bin/pveupdate:88:            if (PVE::Certificate::check_expiry($cert, time() + $lead_time)) {
/usr/bin/pveupdate:89:                PVE::API2::ACME->renew_certificate({ node => $nodename });
/usr/bin/pveupdate:93:                    'Custom certificate does not expire soon, skipping ACME renewal.',
/usr/bin/pveupdate:99:                'ACME config found for node, but no custom certificate exists. Skipping ACME renewal until initial certificate has been deployed.',
/usr/bin/pveupdate:104:syslog('err', "Renewing ACME certificate failed: $@") if $@;
/usr/bin/pveupdate:106:eval { PVE::Cluster::Setup::renew_pveca_cert() };
/usr/bin/pveupdate:107:syslog('err', "Renewing cluster CA certificate failed: $@") if $@;
/usr/bin/pveupdate:131:    my $renew = sub {
/usr/bin/pveupdate:142:        print "Renewed PVE certificate is valid until $expiry\n";
/usr/bin/pveupdate:144:        print "Restarting pveproxy after renewing certificate\n";
/usr/bin/pveupdate:152:        $renew->("was issued by a replaced cluster CA, renewing...", 1);
/usr/bin/pveupdate:153:    } elsif (PVE::Certificate::check_expiry($certpath)) {
/usr/bin/pveupdate:155:        $renew->("expired, renewing...");
/usr/bin/pveupdate:156:    } elsif (PVE::Certificate::check_expiry($certpath, time() + 14 * 24 * 60 * 60)) {
/usr/bin/pveupdate:158:        $renew->("expires soon, renewing...");
/usr/bin/pveupdate:159:    } elsif (!PVE::Certificate::check_expiry($certpath, time() + 2 * 365 * 24 * 60 * 60)) {
/usr/bin/pveupdate:161:        $renew->(
/usr/bin/pveupdate:162:            "expires in more than 2 years, renewing to reduce certificate life-span for client compatibility..."
/usr/bin/pveupdate:166:syslog('err', "Checking/Renewing SSL certificate failed: $@") if $@;
uid=999(felhom-agent) gid=990(felhom-agent) groups=990(felhom-agent),999(systemd-journal)
agent CANNOT read the root CA file
agent CANNOT read the leaf file
755 root:www-data /etc/pve
640 root:www-data /etc/pve/pve-root-ca.pem
