
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
- send custom message to anonymous users
Hello AppWriters, hoping you're all well, I'd like to ask the following: If I have a landing page that doesn't require authentication, is it possible to configu...
- appwrite-cli is not working as expected
If I run ```appwrite init project``` in a new directory, I get the following error. > An Appwrite project ( project-name ) is already associated with the curre...
- Invalid document structure : unknown att...
Hi, I migrated from 1.4.9 to 1.5.11 on self hosted instance of appwrite, the migration shows successful. I can verify when I can do the api call, but when I w...
