Back

[SOLVED] Caddy with Appwrite

  • 0
  • Self Hosted
Drake
2 Jan, 2024, 04:22

Whats the appwrite container logs say?

TL;DR
User was having trouble getting Caddy to work with Appwrite. The solution involved adding the correct configuration to the Caddyfile, specifically including the scheme and host headers for the reverse proxy directive. The user confirmed that the update did not solve the issue and the 404 page not found error persisted. Further troubleshooting was done, including checking response headers and examining container logs, but no obvious solution was found.
Drake
2 Jan, 2024, 04:23

And I guess traefik too

Said H
2 Jan, 2024, 04:26

Ok, when I launched the URL, none of these containers log any new entry: appwrite, appwrite-traefik, caddy

Said H
2 Jan, 2024, 04:27

This is from the browser

Drake
2 Jan, 2024, 04:28

What are the response headers?

Said H
2 Jan, 2024, 04:29

here you go

Said H
2 Jan, 2024, 04:29
Drake
2 Jan, 2024, 04:30

Aren't you missing the scheme and host headers for the reverse proxy directive?

https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#https

Said H
2 Jan, 2024, 04:47

hmm... actually my caddyfile works for my other apps

Said H
2 Jan, 2024, 04:48

I just can't get it to work with appwrite. I may be doing something wrongfully

Drake
2 Jan, 2024, 04:48

Try adding what I linked

Said H
2 Jan, 2024, 04:48

ok. I will try that

Said H
2 Jan, 2024, 05:00
TypeScript
appwrite.saidhasyim.com {
   reverse_proxy appwrite-traefik:443 {
     header_up Host 443
   }
}
Said H
2 Jan, 2024, 05:00

Still same result 404 page not found

Said H
2 Jan, 2024, 05:00

i will keep trying

Drake
2 Jan, 2024, 05:04

The thing I linked included the scheme (https://)

Said H
2 Jan, 2024, 05:23

oh, sorry

Said H
2 Jan, 2024, 05:23

let me fix now

Said H
2 Jan, 2024, 05:25

ok updated. but same outcome

Said H
2 Jan, 2024, 05:25
TypeScript
   reverse_proxy appwrite-traefik:443 {
     header_up Host 443
   }
}
Drake
2 Jan, 2024, 05:44

No, as part of the reverse proxy directive. Please look at the link I shared again

Drake
2 Jan, 2024, 05:50

You'll probably also need to disable tls verification:

TypeScript
reverse_proxy https://appwrite-traefik:443 {
    header_up Host {upstream_hostport}
    transport http {
        tls_insecure_skip_verify
    }
}
Said H
2 Jan, 2024, 05:51

Thanks Steven. I will try these all

Said H
2 Jan, 2024, 06:11

Hi Steven, the earlier version works now. Perhaps it took a while to be effected. Thanks so much for bringing up the header_up configuration.

Said H
2 Jan, 2024, 06:13

[SOLVED] Caddy with Appwrite

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