Thanks, this was very helpful! I was scanning the prose on the Codeberg website looking to see if Codeberg itself was open source, but all it said was that it was "free" and "non-profit."
Now I see that Gitea is the software (basically a clone of GitHub that is visually almost div-for-div, released with an MIT license, that you can host yourself), and Codeberg is central hosting (a "hub") running Gitea, operated as a non-profit.