Hello Bostan, I don't know if you found an answer to your question in the meantime...
By the way, if you are still wondering, or for those interested, let's try to clarify this : the error you get when you first enable HTTPS is probably something like "SEC_ERROR_UNKNOWN_ISSUER". This is because YaCy provides a default certificate which is a self-signed
This is not really a problem is you want to test HTTPS mode or only make personnal use of your remote YaCy peer and need encryption but no host identity certification.
But it is a good idea to at least self-sign your own certificate, thus not sharing the same private key as every YaCy peer who still use the default one. It is even better to use a certificate signed by a Certificate Authority
, but it may be too expensive for you... Alternatively you can try to get a free and valid automatically signed certificate with a project such as Let's Encrypt
For technical details of how to integrate your own certificate with YaCy, you can read the yacy.init related section
I hope it was clear enough...