Yes, you need two things to fully host your own content. A relay and a media server.
The most popular relay code is strfry, here:
https://github.com/hoytech/strfryFor a media server, you simply need a public server that you can upload files and link to. You could use a public cloud server like Dropbox or you can build your own.
If you want to do this in your own home, you can use something like Cloudflare tunnels to expose these to the outside world.