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:
{
"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?
To be clear, accessing Appwrite console from the local network, the issue only exists from outside the local network.
Additional question, which logs could I inspect to find some sort of clues?
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
Logs only show 200 code for what is requested by the browser. Browser activity shows only 200 codes. NPM logs, same.
I know the screenshot shows items retrieved from cache, but I tried clearing cache, and it's the same.
And also, to be complete, it works fine from inside the local network. The problem is when I try to access it from outside.
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.
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>
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).
So in the end, defo a PEBKAC...
[SOLVED] Console infinite loading behind NginxProxyManager
Recommended threads
- hi guys! my site is not accesible in my ...
- MongoDb Database Breaks integer[] & bigi...
I've got a table with the below column created. When I try to insert the value `[-3408048000]` into it, the dart sdk cloud function call is successful (no error...
- Delete on cascade from Cloud Function
I'm writing a Python function that deletes a user's main row from a table in my database. This row has relationships with other tables that use cascade deletion...