hoarder-app / hoarder

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
https://hoarder.app
GNU Affero General Public License v3.0
4.19k stars 141 forks source link

Hoarder CLI failes to connect using HTTPS, but works for HTTP #340

Open Antebios opened 2 months ago

Antebios commented 2 months ago

I am following instructions to upload my large HTML export. When trying to use the Hoarder CLI using HTTP works, but failes when using HTTPS.

image

The web interface is working great over HTTPS.

kamtschatka commented 2 months ago

Do you have a proper SSL certificate? Since it works via HTTP, it must have something to do with the secure connection, so maybe you have a self signed certificate?

Antebios commented 2 months ago

Yes. Though this is my homelab, I have DNS and home domain's certificate server working perfectly. I was running this command from the machine that is on the domain with the root certificate loaded. And the HTTPS URL works perfectly.

image

I do have a reverse proxy in my homelab, and the routing is working pefectly: image

kamtschatka commented 2 weeks ago

Did you get it to work? My guess would be that the self signed certificate is simply not accepted in node. Your screenshot is showing that The browser accepts the certificate, but node.js seems to have its own certificate store, where it would need to be accepted.

Seems like if you set "NODE_TLS_REJECT_UNAUTHORIZED", you can cause node to ignore self signed certificate errors. https://stackoverflow.com/questions/68592669/how-to-set-value-for-node-tls-reject-unauthorized-0-in-mac