logto: bug: Connection to SSL DB: Error: self signed certificate in certificate chain
Describe the bug
I use a DigitalOcean Managed Postgres database for the deployment, but get the following error when starting the logto container:
Error while initializing app Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (node:_tls_wrap:1535:34)
at TLSSocket.emit (node:events:513:28)
at TLSSocket._finishInit (node:_tls_wrap:949:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:730:12) {
code: 'SELF_SIGNED_CERT_IN_CHAIN'
Expected behavior
Logto should be able to connect to SSL only databases.
How to reproduce?
- Get a hosted DB at DigitalOcean
- Configure the Logto Docker Container like this
Alright tried
I tried to use the following env vars to circumvent the problem:
- NODE_TLS_REJECT_UNAUTHORIZED='0'
- PGSSLMODE=no-verify
Context
OS: Linux Docker: ghcr.io/logto-io/logto:1.0.0-beta.6
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (7 by maintainers)
Thanks, @akoenig. I saw the discussion between you and Gao on Discord yesterday. This looks promising and we will document it on our docs site if that also works for @flobaader
@charIeszhao Alright thank you, looking forward to your results!