Back

Functions URL Defaulting to HTTP Instead of HTTPS in Appwrite v1.6

  • 0
  • Self Hosted
  • Functions
s.o
4 Dec, 2024, 08:19

Hi everyone, I’m currently facing an issue with function URLs in my Appwrite setup, and I would appreciate some guidance.

Setup Details: Appwrite Version: 1.6

Hosting Platform: Coolify

DNS Management: Using Cloudflare

I’ve set up wildcard DNS records (*.functions.example.com and functions.example.com) pointing to my Appwrite server as CNAME records. Proxy status is set to Proxied (orange cloud). SSL/TLS is set to Full (Strict), and all required Cloudflare configurations have been applied, including purging cache after updates. Environment Variables:

_APP_DOMAIN: appwrite.example.com _APP_DOMAIN_FUNCTIONS: functions.example.com _APP_DOMAIN_TARGET: appwrite.example.com

Issue: When deploying functions, the generated URLs are still in the format: http://<function-id>.functions.example.com Instead of the expected HTTPS.

Additionally, when testing SSL via tools like SSL Labs, the certificate presented for functions.example.com is Traefik's default self-signed certificate instead of one issued by Cloudflare. This results in SSL errors such as NET::ERR_CERT_AUTHORITY_INVALID.

What I’ve Tried: Verified that _APP_DOMAIN_FUNCTIONS is set to functions.example.com in the environment variables. Restarted Appwrite services after applying changes.

Verified DNS resolution: Subdomains like <function-id>.functions.example.com resolve correctly to the Appwrite server.

Configured Cloudflare: Enabled SSL/TLS with Full (Strict) mode. Proxied DNS records for functions.example.com and *.functions.example.com. Purged Cloudflare cache.

Checked Traefik configuration: Observed that Traefik is presenting its self-signed certificate for the domain.

Request for Help: Is there additional configuration required in Appwrite or Traefik to ensure HTTPS is used for function URLs? Should Appwrite or Traefik be configured differently to work seamlessly with Cloudflare? Any insights or guidance would be greatly appreciated. Thank you in advance!

TL;DR
Issue: Function URLs defaulting to HTTP instead of HTTPS in Appwrite v1.6, using Cloudflare for DNS and SSL. Solution: Update Traefik configuration to ensure it uses Cloudflare's SSL certificate for functions.example.com. Additional configuration in Appwrite or Traefik may be needed for seamless HTTPS support.
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