Bitwarden cli config - cannot set to custom server: unable to get local issuer certificate

Hello

I’m trying to setup the bw cli so that it uses my self hosted server. It fails:

$ bw config server https://vw.foobar.vip
(node:50068) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Unable to fetch ServerConfig: request to https://api.bitwarden.com/config failed, reason: unable to get local issuer certificate
Saved setting `config`.
Unable to fetch ServerConfig: request to https://vw.foobar.vip/api/config failed, reason: unable to get local issuer certificate

The web interface is at https://vw.foobar.vip/. It uses a normal letsencrypt certificate. The desktop app on my mac can reach the site just fine; also browsers work.

Could it be, that the “security” proxy that I’ve got to use while being on the company VPN causes issues?

Solved by setting NODE_TLS_REJECT_UNAUTHORIZED to 0.

$ env NODE_TLS_REJECT_UNAUTHORIZED=0 bw config server "https://vw.foobar.vip"
(node:19698) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:19698) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
Saved setting `config`.