[Owncast](https://owncast.online/) is a lightweight program to set up your own livestreaming website as an alternative to streaming on twitch or youtube.
It is fully free and open source licensed under the [MIT license](https://mit-license.org/) and can even be linked with the [fediverse!](https://en.wikipedia.org/wiki/Fediverse)
Which to me is perfect! I really wanted to get back into livestreaming (I used to do this on twitch allot) but I wanted a platform without adds or corporate influence and thus owncast.
## As for NixOS
I use NixOS to selfhost everything I can (including this website!) but I couldn't find any wiki pages or concrete owncast configurations online, I did eventually get it working and will share my configuration here.
This part is the easiest it is simply enabling it setting an unused port (the default and recommended is 8080) and then let owncast open that part of the firewall.
We are not done yet however there is one more this that is required on the nixos side of things and quite a few things in your owncast webpage.
While we did setup nginx for this owncast we didn't do a full nginx setup, this is because in my homeserver nginx is used for many things and I want to avoid duplicate nix code so I have a separate nginx config which can be found [here](https://git.saragerretsen.nl/Hertog/HermitCollective.nix/src/branch/main/services/nginx.nix).
Now that that is done we can go into our owncast web page at https://yourdomain.net/admin.
Here it will ask you to log in the default for this is Username: Admin and Password: abc123 you want to replace this as soon as possible!
Luckely there is the owncast admin page you just logged into for that, either hit view next to streaming keys in the home page or head to Stream Keys in Server Setup under the Configuration tab.
When you are done with that open your favourite streaming application set the livestreaming service to custom and use this link rtmp://yourdomain.net:1935/live with the streamkey you just set!
If you need extra configuring (and know what you are doing) more owncast options can be found [here](https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=owncast) and the owncast documentation can be found [here](https://owncast.online/docs/).
Is your version not up to date with Nix pkgs? run ``` nix-channel --update ```.
Lastely if this guide gets out of date my current owncast config can be found [here](https://git.saragerretsen.nl/Hertog/HermitCollective.nix/src/branch/main/services/owncast.nix).