
I'm facing an issue with SSL certificate generation in Appwrite (v1.6.1) on my VPS. Here's the error from the logs:
TypeScript
appwrite-worker-certificates | [Error] File: /usr/src/code/src/Appwrite/Certificates/LetsEncrypt.php
appwrite-worker-certificates | [Error] Line: 53
After investigation, I found the issue is in the LetsEncrypt.php file, at the line where the script tries to rename the certificate:
phpif (!@\rename('/etc/letsencrypt/live/' . $certName . '/cert.pem', APP_STORAGE_CERTIFICATES . '/' . $domain . '/cert.pem')) {
throw new Exception('Failed to rename certificate cert.pem. Let\'s Encrypt log: ' . $stderr . ' ; ' . $stdout);
}```
I also noticed a second issue with subdomains configured as A records instead of CNAME:
``Cannot renew domain (www.example.mydomain.com) certificate: Failed to verify domain DNS records.``
Has anyone encountered a similar issue? Any ideas on how to fix this bug?
Thanks in advance for your help! 🙏
TL;DR
Issue with Let's Encrypt certificate generation in Appwrite SSL due to errors in LetsEncrypt.php file causing the domain certificate renewal to fail. The error is related to unexpected characters in the code. Additionally, subdomains configured as A records instead of CNAME are also causing DNS verification failures.
Solution: You need to fix the syntax error in the LetsEncrypt.php file at line 53 where it tries to rename the certificate file. To address the issue with subdomains, ensure they are correctly configured as CNAME records instead of A records for successful DNS verification during certificate renewal.Recommended threads
- Properly contained appwrite main app can...
Hello! We tried to reinstall our main self-hosted appwrite with a new method but the main app 2 mins after launch throw this error: ```2025/06/22 16:16:14 s...
- Broken message
https://github.com/appwrite/appwrite/issues/10081 I just realized that I can just build appwrite myself, was this bug fixed in latest dev release?
- 404 errors after 7 Days
Local hosted Appwrite via docker. Last version and current version. After exactly 7 days Appwrite stops working. I get 404 route not found, cannot access anyth...
