Microsoft's slowly making the case for hosting a gitea or gitlab on a dedicated server.
I actually recently setup my own instances of Gitea (for source code), Nexus (artefact storage) and Drone (CI/CD): https://blog.kronis.dev/articles/goodbye-gitlab-hello-gitea-...
It wasn't too hard and although in my case I migrated over all of my projects from GitLab, the same should work with GitHub, or most others as well.
That said, while it is pretty cheap, lightweight and not too complicated, all of the sudden you're responsible for the configuration, uptime, updates and security.
Since I've basically nothing of too much value (and have a variety of backups) that's not an issue for me, but others might have different circumstances.
That said, if you like more integrated solutions and can afford a beefier VPS/VM then GitLab is also great, albeit the issues I had with updates on the Omnibus install urged me to move onwards.