
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
- How to pass session from browser to a mo...
I have a self-hosted Appwrite container. I also have a www page (A) which should acts as login page for different www services (B). User click login in B, is re...
- Problems following https://appwrite.io/b...
To me it is unclear what the author means when he writes "Please note that the Appwrite instance should be shut down". I am using docker. What exactly am I supp...
- SDK mismatch
Hi there, The following warning is currently appearing in my console: ``` Warning: The current SDK is built for Appwrite 1.8.0. However, the current Appwrite...
