# Renew(?) Expired Certificate

**URL:** <https://dietpi.com/forum/t/renew-expired-certificate/25409>\
**Category:** General Discussion\
**Created:** [14 August 2026 00:46 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409 "2026-08-14T00:46:57Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torgo](https://dietpi.com/forum/user_avatar/dietpi.com/torgo/32/8988_2.png) [@Torgo](https://dietpi.com/forum/u/Torgo)\
**Post date:** [14 August 2026 00:46 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409/1 "2026-08-14T00:46:57Z")

</div>

A couple months ago I set up an RPi as a test web server. A week ago, my Let’s Encrypt certificate expired and wasn’t renewed. This is my first time dealing with such things, and I’m not sure where to go from here. E.g., can the certificate be ‘fixed’, or do I need a new one?

I verified that the actual website works, and can be accessed via http.

My hardware and software:

```auto
 - Device model : RPi 3 Model B+ (aarch64)
 - Let's Encrypt Cert : Valid until 2026-Aug-5 01:47:56
 - systemd status : No services failed
 
  [] 0 OpenSSH Client: Feature-rich SSH, SFTP and SCP client
  [] 1 Samba Client: access SMB/CIFS/Samba network shares
  [] 84 Lighttpd: Extremely lightweight webserver
  [] 88 MariaDB: Persistent cached file-per-table database server
  [] 89 PHP: Hypertext Preprocessor for dynamic web content
  [] 92 Certbot: Obtain and renew Let's Encrypt SSL certs for HTTPS
  [] 96 Samba Server: Feature-rich SMB/CIFS server
  [] 103 DietPi-RAMlog: Makes /var/log a RAM disk, preserves file structure on reboot
  [] 105 OpenSSH Server: Feature-rich SSH server with SFTP and SCP support

```

My services:

```auto
       ●─ Single Service Options -------------●
nmbd : enabled | included | Affinity 0-3
smbd : enabled | included | Affinity 0-3
mariadb : enabled | included | Affinity 0-3
php8.4-fpm : enabled | included | Affinity 0-3
lighttpd : enabled | included | Affinity 0-3
cron : enabled | included | Affinity 0-3
ssh : enabled | included | Affinity 0-3
dietpi-vpn : disabled | included | Affinity 0-3
dietpi-cloudshell : disabled | included | Affinity 0-3
noip-duc : enabled | included | Affinity 0-3
Add : Add missing service to DietPi-Services

```

Running certbot:

```auto
sudo certbot renew --dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/MY_SITE.net.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Account registered.
Simulating renewal of an existing certificate for MY_SITE.net

Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
  Domain: MY_SITE.net
  Type: unauthorized
  Detail: 73.128.102.145: Invalid response from http://MY_SITE.net/.well-known/acme-challenge/8dtxEOrVkqLiIz9eLAsILqfjgaH-KYeGYrqxWibkmig: 404

Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.

Failed to renew certificate MY_SITE.net with error: Some challenges have failed.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
All simulated renewals failed. The following certificates could not be renewed:
  /etc/letsencrypt/live/MY_SITE.net/fullchain.pem (failure)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 renew failure(s), 0 parse failure(s)
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

```

I do not have a “.well-known/” directory.

TIA for any push in the right direction.

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [14 August 2026 07:51 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409/2 "2026-08-14T07:51:22Z")

</div>

Hello Torgo,  
is the server publicly accessible?

It’s normal that you don’t see `.well-known` directory, it’s only created temporarily when the renewal happens.

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [14 August 2026 10:50 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409/3 "2026-08-14T10:50:46Z")

</div>

If the webserver is generally accessible from outside your local network:

- Create the ACME challenge file manually, and try to access that from browser:

```sh
mkdir -p /var/www/.well-known/acme-challenge
touch /var/www/.well-known/acme-challenge/8dtxEOrVkqLiIz9eLAsILqfjgaH-KYeGYrqxWibkmig

```

- Then try to access the following URL:

```auto
http://MY_SITE.net/.well-known/acme-challenge/8dtxEOrVkqLiIz9eLAsILqfjgaH-KYeGYrqxWibkmig

```

- If that works, verify that the certbot config uses `/var/www` as webroot:

```sh
grep webroot /etc/letsencrypt/renewal/MY_SITE.net.conf

```

---

<div class="post-metadata">

**Author:** ![Torgo](https://dietpi.com/forum/user_avatar/dietpi.com/torgo/32/8988_2.png) [@Torgo](https://dietpi.com/forum/u/Torgo)\
**Post date:** [14 August 2026 14:56 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409/4 "2026-08-14T14:56:06Z")

</div>

> [@MichaIng](#):
>
> - If that works, verify that the certbot config uses `/var/www` as webroot:

Aha! I’ve actually got it set up to use www/html as webroot. I guess that’s not normal, but the only other web server I’ve set up configured it that way.

Fixed the .conf file, reran certbot, and it’s good to go. I’m guessing the automatic renewal will work now?

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [14 August 2026 14:59 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409/5 "2026-08-14T14:59:59Z")

</div>

When installed via `dietpi-software`, the web root is set to `/var/www`.

---

<div class="post-metadata">

**Author:** ![Torgo](https://dietpi.com/forum/user_avatar/dietpi.com/torgo/32/8988_2.png) [@Torgo](https://dietpi.com/forum/u/Torgo)\
**Post date:** [14 August 2026 15:36 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409/6 "2026-08-14T15:36:16Z")

</div>

I see that. I’ve changed the `MY_SITE.net.conf` entries for `webroot_path = ` and `MY_SITE.net =` to `/var/www/html` which made certbot happy. I’m assuming the next renewal will just invoke certbot again.

---

<div class="post-metadata">

**Author:** ![Torgo](https://dietpi.com/forum/user_avatar/dietpi.com/torgo/32/8988_2.png) [@Torgo](https://dietpi.com/forum/u/Torgo)\
**Post date:** [14 August 2026 15:54 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409/7 "2026-08-14T15:54:51Z")

</div>

> [@MichaIng](#):
>
> When installed via `dietpi-software`, the web root is set to `/var/www`.

I just realized that you meant that the web server itself is set up to use `/var/www` as web root, and indeed it was; I had changed to be consistent with the way my LAN web server is set up.

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [14 August 2026 16:49 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409/8 "2026-08-14T16:49:51Z")

</div>

Yes, changing it to `/var/www/html` in the certbot config broke it, not made it happy.

Of course you can change the webroot to `/var/www/html` in both ends. But software which use a webserver are installed to `/var/www` direct subdirs, not `/var/www/html`, hence they wouldn’t work until manually moved. Also `dietpi-letsencrypt` expects `/var/www` for Lighttpd.

---

<div class="post-metadata">

**Author:** ![Torgo](https://dietpi.com/forum/user_avatar/dietpi.com/torgo/32/8988_2.png) [@Torgo](https://dietpi.com/forum/u/Torgo)\
**Post date:** [14 August 2026 18:48 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409/9 "2026-08-14T18:48:56Z")

</div>

> [@MichaIng](#):
>
> Yes, changing it to `/var/www/html` in the certbot config broke it, not made it happy.

Well, it worked this time around. I’m a little confused about how it worked when I first set it up. I _thought_ I did all the configuration before I added the certificate, but perhaps I’m misremembering.

> [@MichaIng](#):
>
> But software which use a webserver are installed to `/var/www` direct subdirs, not `/var/www/html`, hence they wouldn’t work until manually moved. Also `dietpi-letsencrypt` expects `/var/www` for Lighttpd.

So, I’d be better off re-configuring everything to use `/var/www` as root?

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [14 August 2026 19:00 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409/10 "2026-08-14T19:00:31Z")

</div>

> [@Torgo](#):
>
> So, I’d be better off re-configuring everything to use `/var/www` as root?

I don’t know which software you have installed, and where it is located now. Just keep in mind that everything installed via `dietpi-software` (which uses the system webserver) gets installed to `/var/www`. But you are free to choose depending on your needs.

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [12 November 2026 19:00 UTC](https://dietpi.com/forum/t/renew-expired-certificate/25409/11 "2026-11-12T19:00:44Z")

</div>

Closed on 12 November 2026 19:00 UTC

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