There is, but self-signed certs isn't the way to do it. What you want to do is set up an internal CA, trust that CA on any relevant devices, and then issue certs from that CA. Here's one way you can do it:
And of course, it doesn't have to be a Raspberry Pi; the software will run under your Linux flavor of choice. I've been running one of these at home for a while, and it works very well.