Skip to content
Back

Functions auto generate invalid ssl on custom domain

  • 0
  • Self Hosted
  • Functions
  • General
𝕯𝖆𝖓
15 Feb, 2025, 08:09

Hello, I have a self hosted instance of appwrite 1.6.1 on a vps. The .env file points to domain1.com, I can access the console and its served with a valid ssl. However when I create a new function from a template the resulting auto generated domain link gives me the error net::ERR_CERT_AUTHORITY_INVALID. I have noticed that the console url domain1.com uses a Let's Encrypt cert and the function url uses the TRAEFIK DEFAULT CERT. Anyways if I access the function from a http link the function works perfectly fine. So it has to be an issue with how I configured the .env or dns setting, right? Any help troubleshooting would be very appreciated.

.env _APP_ENV=production _APP_LOCALE=en _APP_OPTIONS_ABUSE=enabled _APP_OPTIONS_FORCE_HTTPS=enabled _APP_OPTIONS_FUNCTIONS_FORCE_HTTPS=enabled
_APP_OPTIONS_ROUTER_PROTECTION=disabled _APP_OPENSSL_KEY_V1=REDACTEDKEY _APP_DOMAIN= domain1.com
_APP_DOMAIN_FUNCTIONS= domain3.com
_APP_DOMAIN_TARGET= domain1.com

_APP_EMAIL_CERTIFICATES= REDACTED //valid email

My DNS settings A record domain1.com Server ip address //This domain points the the server that appwrite is hosted on and nothing else A record *.domain1.com Server ip address //I assume this is needed for all of the custom subdomains that are auto generated for each function

A record domain2.com Server ip address //this is the server that hosts the static files for the site A record www.domain2.com Server ip address
CNAME api.domain2.com domain1.com //Cname record for accessing appwrite from the front end without Third-party cookies

CNAME *.domain3.com api.domain2.com //domain just for functions

TL;DR
Developers having issues with Appwrite functions generating invalid SSL on custom domain. The issue is likely with .env or DNS settings, as the function URL uses a different cert than the console URL. To troubleshoot, ensure correct configuration in .env file and check DNS settings for proper subdomain setup. Solution: Verify and adjust .env file and ensure DNS settings correctly point to the server IPs.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more