Filippo Valsorda, from the Go security team, created mkcert some time ago →
https://github.com/FiloSottile/mkcert which makes this process much easier. I setup a home laboratory for several HTTPS websites and it all works as expected without too much hassle.