Problem with Cryptpad Letsencrypt certificate

What app is this about, and its version: 2026.29.0~ynh1
What YunoHost version are you running: YunoHost 12.1.39 (stable)
What type of hardware are you using: VPS bought online

Describe your issue

I’m using Cryptpad since a while.
In the last weeks I see an certificate error in my logs:

It says:

ERROR - Wrote file to /var/www/.well-known/acme-challenge-public/dP6pyEsgwPYNoTkszvMg0trbAEWk68zAsnLV1u98gLM, but couldn't download http://sandbox.cryptpad.maindomain.tld/.well-known/acme-challenge/dP6pyEsgwPYNoTkszvMg0trbAEWk68zAsnLV1u98gLM

and this is the file:

sudo ls -al /var/www/.well-known/acme-challenge-public/dP6pyEsgwPYNoTkszvMg0trbAEWk68zAsnLV1u98gLM
-rw-rw-rw- 1 root root 87 May  3 06:26 /var/www/.well-known/acme-challenge-public/dP6pyEsgwPYNoTkszvMg0trbAEWk68zAsnLV1u98gLM

All other domains (= a lot) work as expected.
So my guess is: it’s a cryptpad problem and not a generic YNH problem.

I also tried a solution found in the forum archive:

yunohost domain cert install yourdomain.tld --force

but it also failed.

Is there a way to handle this?

Share relevant logs or error messages

https://paste.yunohost.org/raw/omonuwuqiz

Hi @chmeyer

what gives

curl http://sandbox.cryptpad.maindomain.tld/.well-known/acme-challenge/dP6pyEsgwPYNoTkszvMg0trbAEWk68zAsnLV1u98gLM

assuming you replace sandbox.cryptpad.maindomain.tld with your real sandbox cryptad domain.

i take note that there are two domains for cryptad, this is the sandbox one only that is failing. i don’t now much about cryptad installation…

It might happen that locally from yunohost you don’t have access to itself, this is only a verification done by yunohost letsencrypt client script.
This check can be deactivated with --no-check and there is a checkbox in web admin to disable it too.

yunohost domain cert renew   sandbox.cryptpad.maindomain.tld  --no-checks

There has been a change recently with timeouts and letsencrypt, so depending on your network latency it can be affected too, see related discussion Letsencrypt certificates not renewing after upgrading yunohost from older version

English

It took a while to fully track down this bug.

The problem itself is easy to explain — the YunoHost package never deploys the nginx configuration for the sandbox domain automatically. What made the fix complicated is that there are three situations that trigger the issue:

  1. Directly after installation — the config is never created
  2. After every reboot — the config is missing at system startup
  3. After domain actions in YunoHost (adding, removing domains, certificate renewal) — YunoHost runs regen-conf and reloads nginx multiple times

Each of these situations needed its own fix. The complete step-by-step guide is documented here:

ENDE

I hope this helps.


Deutsch

Es hat eine Weile gedauert, den Fehler vollständig zu lokalisieren.

Das Problem selbst ist schnell erklärt – das YunoHost-Paket deployed die nginx-Konfiguration für die Sandbox-Domain nicht automatisch. Was die Lösung kompliziert hat: Es gibt drei Situationen die den Fehler auslösen:

  1. Direkt nach der Installation – die Config wird nie erstellt
  2. Nach jedem Reboot – die Config fehlt beim Systemstart
  3. Nach Domain-Aktionen in YunoHost (Domain anlegen, löschen, Zertifikat erneuern) – YunoHost führt dabei regen-conf aus und lädt nginx mehrfach neu

Jede dieser Situationen brauchte eine eigene Lösung. Die vollständige Anleitung mit allen Schritten ist hier dokumentiert:

ENDE

Ich hoffe das hilft weiter.

1 Like

Thanks a lot, your solution allowed to renew the let’s-encrypt certificate!
That’s really great.

There is one small improvement / suggestion for your ‘Step 9: Create a Timer’ for other users:
Maybe you could give a hint (like that in step 3 and 7) that the user should adjust the pathname to their own settings / domainname.

And then there still is a second problem with my cryptpad instance (‘TypeError: Utils.Util.decodeUTF8 is not a function’) , maybe you also have a suggestion there?

Anyway. Thanks a lot for solving this certificate issue with Cryptpad!

Thank you for the hint, I have updated the documentation.

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