WebDAV, snap installation and certificate problem

Hi
As stated in header. I have installed nextcloud via snap for 2 days ago and everything went well, even data directory change. I use self-signed certificate and to get that I ran the following command:
sudo nextcloud.enable-https self-signed

But heres the problem. When trying to connect I get the following error:
Server certificate was missing CommonName attribute in Subject name.

So it seems that it is a certificate error, but how do I correct this?
I run this server on a local network with dns so I use FQDN names for all my servers. But none of these server will not be accessible from the outside.

So I cant use Letsencrypt or certbot. OpenSSL seems to be a alternative but how will I use that to create a self-signed certificate that corrects my problem.?