Have you tried running gitea? It's very light on resources, has good documentation, and also defualts to a main branch. It's also very easy to control where all the data is stored, and works well w/ sqlite.
Also, the `master` is just an example, it works for `main` as well, don't worry :) The created git repository on your usb-stick works like a regular git repository, you can use whatever branch names you want.
Btw, way to focus on the absolutely least interesting part of my comment, what I chose to name the branch...
I believe new GitHub accounts now have that set to main.