https://smarthomescene.com/reviews/aqara-fp2-human-presence-sensor-review/
UPDATE 24.04.2023: Aqara has released a new firmware update 1.1.6_0005.0025 which enables local control. The FP2 can now be used without an internet connection, hub, or app dependence in Home Assistant after it’s initial setup.
So, yes, after the initial setup (you may need an internet connection to download and install the newer firmware) no internet connection is needed at all.
If you want a way to self host git (not github) repositories you can check this list https://www.slant.co/topics/1440/~best-self-hosted-web-based-git-repository-managers