
Yes, I know what NPM is. But is Cloudflare pointing directly at the Appwrite port, or at NPM’s port?

Ok in cloudflare it points to the VPS IP

@s.o You can follow this guide to use Nginx as proxy server. 👇 https://medium.com/@zia-ch/how-to-run-appwrite-with-nginx-professionally-5ba420789ef0

And to port 80, I presume? Could you switch Cloudflare to point to the Appwrite port?

I don’t really see the relevance of NGINX here

Because all the subdomains are managed by cloudflare?

I checked the resource but had two questions.
- How do handle SSL certificates from cloudflare?
- Do I install NGINX as a docker container or directory on OS

For option 2: you just have to install Nginx as described in the guide not as a container.
For 1: i think every request from cloud flare will already be an https request so you can easily redirect it to your appwritw instance.
You just need to follow the guide as such and if in case you face any issues, do contact.

👍

Kindly check my configuration. I have an A record in cloudflare that points to the VPS IP

I believe CF will be intercepting the request and therefore the ACME challenge is never reaching NGINX

But if you’re using CF as a proxy, CF issues a cert which terminates with them, and they’ll provide you with a certificate you can use locally that’ll only be accepted by CF

Although probably the simplest and most secure way to get it working is with Cloudflare Tunnels and cloudflared
.

You don't havd to write certboot commands because we use it to generate ssl and you already have your ssl from cloud flare so you don't need it just use all Nginx related commands.

And your configuration is okey. Just run it and try to access your appwrite console. Also do check you have allowed Full Nginx.

Still not reachable.

May you show the error log or any errors that are showing up

On browser or on appwrite instance?

On browser and Nginx error log as well.

Nothing being logged for nginx error log in the location /var/log/nginx/clinkod.access.log

neither error.log

This is the best route for me. This question should be marked as resolved

You can add [SOLVED] to the beginning of the title

[Solved] Getway time out Selfhost Configuration with Nginx (NPM) and Cloudflare.

For NPM as a docker container, you can refer to https://medium.com/@stnguyen90/how-to-run-appwrite-behind-nginx-19348ed34243
Recommended threads
- Unexpected File Persistence Across Appwr...
I'm encountering an issue where files created during an Appwrite Function execution persist across subsequent executions. Specifically, when a function writes a...
- Cannot connect to SMTP in AppWrite - set...
This used to work and then at some point it stopped. One thing that happened in that time was moving my application to Vercel. I have read on another thread t...
- [Self Hosted]
fresh instance of Appwrite - cant deploy function from local to instance ✗ Error • func2 (68134cd9002358f96e4a) • Invalid `specification` p...
