@aral I really urge you to try gitea. It's a single executable and a config file, it runs on SQLite and it's using about 100MB of RAM for a single tenant installation. Been using it for years and never had a problem with it. Seriously.😄
And like @humanetech mentions, there are efforts to make it federated.