Skip to content

Obsidian client says it can't connect to self hosted server behind cloudflare tunnel #1214

@Bugsia

Description

@Bugsia

Server

  • Cloud (https://app.khoj.dev)
  • Self-Hosted Docker
  • Self-Hosted Python package
  • Self-Hosted source code

Clients

  • Web browser
  • Desktop/mobile app
  • Obsidian
  • Emacs
  • WhatsApp

OS

  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Khoj version

1.42.10

Describe the bug

When I try to connect the obsidian client to my Khoj server says that it fails to connect, but I seem to be able to use its functionalities like normal.

Current Behavior

In the obsidian developer console this error is printed:

Khoj connection error:

Error: net::ERR_SSL_CLIENT_AUTH_CERT_NEEDED

Even though no client certificate is needed and I can access it over my browser

Expected Behavior

I expected the client to not throw a error when it is working.

Reproduction Steps

  1. Make a fresh install of Khoj on a server
  2. Setup a nginx reverse proxy on that server to route traffic to khoj
  3. Setup cloduflare tunnel and make the server reachable from the internet using a domain
  4. Try to connect the obsidian client to it

Possible Workaround

Weirdly it says it can connect when I enable a Postman Proxy and traffic is being routed through it. Possibly because Postman forces http1.1? Without it cloduflare may force http2, but I am not sure about it.
And even after turning the proxy off, when it already is connected it contiues to work, till I for example restart obsidian

Additional Information

Khoj is running in a container on a proxmox system. The container runs Ubuntu 24.04 and proxmox is on version 8.4.
The obsidian client runs on a windows 11 machine

Link to Discord or Github discussion

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixFix something that isn't working as expectedquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions