Error: self signed certificate in certificate chain

I have Peertube (with yunohost) on an intranet not connected to the outside world where I have videos for my students.

I am of course using a self-signed certificate since I have no possibility to connect to a C.A.

Everything works fine, apart from the peertube-upload tool that doesn’t want to upload new videos via terminal in the presence of a self-signed certificate.
the script tells me:
Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (_tls_wrap.js:1515:34)
at TLSSocket.emit (events.js:400:28)
at TLSSocket._finishInit (_tls_wrap.js:937:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:709:12) {
response: undefined

I have tried to modify nginx hacerdo so that it uses http instead of https… but it doesn’t work and it gives me this other error

TypeError: Cannot read property ‹ 0 › of undefined
at VideosCommand. (/usr/local/bin/PeerTube/dist/shared/server-commands/videos/videos-command.js:154:38)
at ()
at fulfilled (/usr/local/bin/PeerTube/node_modules/tslib/tslib.js:115:62)

I have looked in peertube-upload --help and there is no option to skip the self-signed certificate error.

Any ideas other than using a certificate from lets encrypt or from other providers?


Self signed certificate is not supported in peertube scripts. You can check javascript - Node.js request CERT_HAS_EXPIRED - Stack Overflow for workarounds