Skip to content
Back

[SOLVED] Console infinite loading behind NginxProxyManager

  • 0
  • Resolved
  • 2
  • Self Hosted
Papycasu
19 Dec, 2025, 14:03

Hi All,

I am trying to get AppWrite to work behind NPM. I've followed the Medium guide to set proper headers, I've added my proxy configuration to NPM, and I can access the console loading page from any where using my domain name and path.

appwrite-traefik is configured to use my npm docker network, like all the other docker containers I proxy with npm.

However, the console is stuck with the red loading icon, and nothing moves further.

In addition, I cannot get a Let's encrypt certificate from NPM, and here's the response from certbot:

TypeScript
{
  "identifier": {
    "type": "dns",
    "value": "appwrite.example.com"
  },
  "status": "invalid",
  "expires": "2025-12-26T13:48:15Z",
  "challenges": [
    {
      "type": "http-01",
      "url": "https://acme-v02.api.letsencrypt.org/acme/chall/1310672856/629846761676/c2hXDQ",
      "status": "invalid",
      "validated": "2025-12-19T13:48:16Z",
      "error": {
        "type": "urn:ietf:params:acme:error:unauthorized",
        "detail": "myIPv6: Invalid response from http://appwrite.example.com/.well-known/acme-challenge/0YDALemzFEKAr40SLC2FMCEi6h1tu3RKoWMRbMnFE7w: 403",
        "status": 403
      },
      "token": "0YDALemzFEKAr40SLC2FMCEi6h1tu3RKoWMRbMnFE7w",
      "validationRecord": [
        {
          "url": "http://appwrite.example.com/.well-known/acme-challenge/0YDALemzFEKAr40SLC2FMCEi6h1tu3RKoWMRbMnFE7w",
          "hostname": "appwrite.example.com",
          "port": "80",
          "addressesResolved": [
            "my IPv4",
            "my IPv6"
          ],
          "addressUsed": "myIPv6"
        }
      ]
    }
  ]
}

appwrite.example.com being of course my proper domain, and Ipv4 and v6 are correct.

Getting a 403 seems to indicate I have a rights issue somewhere.

So my questions are: is the fact that the console does not load linked to the missing ssl certificate? what rights do I need to give to which volume (if any) to solve the 403 issue? Any other points I could be missing?

TL;DR
Issue with console not loading behind NginxProxyManager. No errors in logs, just a SyntaxError on env.js file. Discovered the issue was due to a custom rule in NPM rewriting attempts to get .env files. Updated the NPM custom configuration to fix it. Now console works perfectly fine.
Papycasu
19 Dec, 2025, 14:09

To be clear, accessing Appwrite console from the local network, the issue only exists from outside the local network.

Papycasu
19 Dec, 2025, 14:19

Additional question, which logs could I inspect to find some sort of clues?

19 Dec, 2025, 20:03

what do the browser network logs show?

what do the NPM access logs show?

You can also enable access logs in traefik and check those too

22 Dec, 2025, 09:19

Logs only show 200 code for what is requested by the browser. Browser activity shows only 200 codes. NPM logs, same.

22 Dec, 2025, 09:20

I know the screenshot shows items retrieved from cache, but I tried clearing cache, and it's the same.

22 Dec, 2025, 09:43

And also, to be complete, it works fine from inside the local network. The problem is when I try to access it from outside.

22 Dec, 2025, 13:38

Ok, I solved the SSL issue. It was, of course, a DNS issue... (wrong ipv6 address). Still no progress with the console not loading though.

23 Dec, 2025, 13:57

The only visible error is the console error seen on the screenshot: Uncaught (in promise) SyntaxError: expected expression, got '<' env.js:1:1

The content of env.js is <html><script type="text/javascript">function open_target_blank() {window.open(window.location);}window.onload = open_target_blank();</script><body></body></html>

23 Dec, 2025, 14:37

Ok... Turns out I was the idiot the whole time, who could have guessed? The issue was indeed with env.js. I had implemented a custom rule in NPM a long time ago, to rewrite attempts to get .env files. Because it was a long time ago, it was very primitive, and a bit too generic.

I fixed it in my NPM custom configuration, and now, it works perfectly fine! (well, at least I can get to the console).

23 Dec, 2025, 14:37

So in the end, defo a PEBKAC...

23 Dec, 2025, 14:38

[SOLVED] Console infinite loading behind NginxProxyManager

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