Closed oanhcuongdo closed 8 months ago
What is the domain that your Khoj server is running on?
You can set the KHOJ_DOMAIN
environment variable to the domain your Khoj server is running on (in your docker-compose.yml or shell from where you start khoj via docker)
hello, i config as you suggest: - POSTGRES_DB=postgres
Hi @oanhcuongdo , are you using Safari? Which browser are you on? Can you try setting KHOJ_DEBUG=True
in your docker-compose
and loading from Firefox to see if that helps?
I started docker-compose and got the same problem.
And it really doesn't work in Safari, but it works in Google Chrome
Ah yeah, the admin page completely doesn't work in Safari. This is also in the documentation!. Safari is really finnicky with storing cookies, which are necessary for storing the authentication credentials.
Seeing as it's working in Chrome and the Safari error is expected, I'll close this ticket. Let me know if y'all run into additional errors.
I am also getting this very same error as in the screenshot, on a mac, on windows, using chromium, firefox and edge.
it wasn't loading the page at all, but by adding KHOJ_DOMAIN I got to a login screen at least. The error happens afterwards. I have tried private tabs as well.
Not sure what else to try. I am running it on linux, unraid, with the sample docker compose
@Jayddo
I'd tested this a while ago, but we'll go through some additional testing again + improve the documentation.
my case is a bit different I suppose due to installing it on unraid. I tried following the instructions and using the sample docker compose, changing volumes to what my actual volumes are.
update: by using the localsetupwithmanynumbers.myunraid.net and adding myunraid.net as the domain, I get the same error. It still loads the auth, however, without the khoj_domain variable it does not. I have tried both the actual subdomain.myunraid.net as well as just unraid.net, in both cases the error is the same, on multiple browsers.
Is your custom domain behind https? Otherwise this maybe triggered to the CSRF token only being allowed for KHOJ_DOMAIN
behind an https endpoint. See the CSRF_TRUSTED_ORIGINS
being set in settings.py
Custom domain has a letsencrypt certificate, but it is also available on normal http. I see what you mean, but what can I do about that? Would it be possible to just... disable this admin login? Khoj sits behind a closed network I can only access via vpn anyway, in my specific case.
anything I can try or do @sabaimran ?
from the look of things it seems like ssl the unraid ssl doesn't work for that particular port/khoj, so I seem to have this issue because of the CSRF token only allowed behind the https endpoint, as surmised by debanjum.
I would rather disable the backend auth altogether if it's not an easy fix, but I'd be happy to try some more things.
While my setup is non-standard, unraid is very popular so it's probably not going to be uncommon as khoj gets more popular.
I use docker build. I can not access admin because django error domain not in allow_host. Please guide me fix it