
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
- REQUEST FAILED IN MIGRATION
I was trying to moved my archived project to a self-host database . Though the Project is "read only" but there's a message that I can view and migrate data to...
- migrate storage bucket to external s3
I try to migrate the current s3 storage (docker volume) to an external provider. I copied all files from /var/lib/docker/volumes/appwrite_appwrite-uploads/_data...
- Mock numbers feature not working in self...
Could anyone please guide how to enable mock numbers feature in self hosted??
