I’m running self-hosted Appwrite (Docker) behind Traefik with Cloudflare proxy (Full/Strict).
Main domain works: https://app.printa4.in
Function subdomains fail TLS completely, e.g. https://<functionId>.functions.printa4.in
openssl result:
SSL alert number 40: handshake failure no peer certificate available
This means the origin doesn’t present any cert for function subdomains.
Setup:
Cloudflare terminates TLS
Traefik + Appwrite are HTTP-only
Env vars:
_APP_DOMAIN=app.printa4.in _APP_DOMAIN_FUNCTIONS=functions.printa4.in
Suspected cause: Function subdomains (*.functions.<domain>) don’t inherit routing automatically and require an explicit wildcard HostRegexp router in the reverse proxy.
Question: What is the official / recommended reverse-proxy configuration for Appwrite function subdomains when using Cloudflare + Traefik? Should TLS be handled at the proxy or by Appwrite itself for functions?
Any guidance or docs would be really helpful 🙏
<:Auth:1389993762654130246>
Have you find a solution to this yet? I am having the exact same setup and issue right now
if your using free proxied, iirc it don't support 2nd layer sub domains
i also ping you since you also have the issue
Yes, that is correct. But doesn't traefik generate SSL for the function subdomain? Or am I mistaken?
yes, but you need to disable the proxy, as cloudflare with proxy basicly request itself from the server, then sends it to you with it's own server and ssl cert (if you check the ssl certificate, it's not let's encrypt)
I see. Alright, thanks for the clarification
I think I'll just ditch the first subdomain
my setup with cloudflare is like this :
*.appwrite.example.com > functions/sites > not proxied
appwrite.example.com > console/api > proxied
so console shows cloudflare certificate and sites shows let's encrypt
also be carful, if you upload big files (iirc over 100mb) you cannot do it with proxied because of the free limitation (entreprise is 500mb)
Yeah, I prefer to have the proxy on and I know about the size limitation. I wish appwrite would use a different approach to handle file upload via S3 compatible API so that we can use pre-signed url to do the upload directly to R2. But that's a separate matter
So I have tried to use my method and it still fails with SSL error (Code 526)
I feel like it has something to do with the config of my domain
seams like it's bettween your server and cloudflare
Recommended threads
- Bulk API limitations in self-hosted serv...
Environment: Appwrite Selfhost SDK: node-appwrite 28.0 Calling `upsertRows` (also applies to `createRows`/`updateRows`/`deleteRows`) with more than 100 rows fa...
- Self Hosted GitHub connection not adding...
After upgrading to 1.9.6 i noticed that i cannot search for new repositories when trying to add new functions. I removed the existing github connection via Set...
- Unable to init function via cli
Hello! I have created a new self hosted instance of appwrite 1.9.6 and have connected to that insatnce with the cli 27.2.0 that was released a few hours ago. Wh...