Portainer SSL not working

Hello,
I installed Portainer via Docker in Truenas and everything works perfectly with the URL https://mylocalIP/31015 except that SSL doesn’t work :

image

I need SSL to use Portainer’s APIs for a custom backup.
How do I enable SSL for Portainer?

You use either nginx to proxy portainer OR you upload a suitable certificate.

Not really a TrueNAS question

Not to mention, you’re never going to get a suitable certificate that covers the IP address.