Back

Appwrite Function's URL cannot be reached

  • 1
  • Self Hosted
  • Functions
afunworm
21 Dec, 2024, 06:41

Hello, guys.

I am running Appwrite on my domain appwrite.example.com. It is listening to 2780 and 27443 for HTTP & HTTPS respectively. On the same server, I have Nginx Proxy Manager running on 80/443, forwarding every request to appwrite.example.com and *.appwrite.example.com to the Appwrite instance on port 2780 (e.g. http://ip:2780). SSL certificates are valid from NPM.

Below are the configs in the .env:

TypeScript
_APP_DOMAIN=appwrite.byh.uy
_APP_DOMAIN_FUNCTIONS=appwrite.example.com
_APP_DOMAIN_TARGET=appwrite.example.com

I then publish a Function from local via appwrite publish. It was assigned the URL 67665f63720fb17ef7f9.appwrite.example.com. However, the URL doesn't work. I tried all sorts of HTTP methods, such as GET, POST, PUT, etc., but it always timed out. The code was very simple too:

TypeScript
export default async ({ res }) => {
    return res.json({
        motto: "Build like a team of hundreds_",
    });
};

So now I'm stuck. Any advice is highly appreciated!

TL;DR
Developers are having trouble reaching an Appwrite Function's URL set up with Nginx Proxy Manager. The Function URL times out despite having valid SSL certificates. Solution: Ensure the Function domain is correctly configured in the Appwrite `.env` file, including `_APP_DOMAIN`, `_APP_DOMAIN_FUNCTIONS`, and `_APP_DOMAIN_TARGET`. Additionally, double-check the Nginx Proxy Manager settings to ensure proper forwarding to the Appwrite instance.
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