It’s possible.

Install gitea and sqlite

apt install gitea sqlite 

Run gitea by simply executing gitea and navigate to port 3000 on your phone’s IP (or on localhost).

Select Sqlite3 as Database Type, change Site Title to whatever you feel like and leave everything as is (or change some stuff if you know what you are doing). Click in InstallGitea to apply your config.

Next, you will be presented to the login page. Create an account and start working as normal.

End result

Screenshot of Gitea homepage

You can also use port forwarding