gitea: A self-hosted Git service
Gitea is a painless self-hosted all-in-one software development service.
It includes Git hosting, code review, team collaboration, package
registry, and CI/CD. Written in Go, lightweight and easy to deploy.
This package installs the pre-built binary from the official Gitea
website. Only x86_64 architecture is supported.
The package automatically creates a "git" user and group for the
Gitea service. The git user shell is set to /bin/bash, which is
required for SSH passthrough mode.
Post-installation steps:
1. Enable the init script:
chmod +x /etc/rc.d/rc.gitea
2. Add to /etc/rc.d/rc.local:
if [ -x /etc/rc.d/rc.gitea ]; then
/etc/rc.d/rc.gitea start
fi
3. Add to /etc/rc.d/rc.local_shutdown:
if [ -x /etc/rc.d/rc.gitea ]; then
/etc/rc.d/rc.gitea stop
fi
4. Start the service:
/etc/rc.d/rc.gitea start
5. Open http://localhost:3000/ in your browser to run the
web installer and create your admin account.
6. After the web installer completes, restrict config permissions:
chmod 640 /etc/gitea/app.ini
chmod 750 /etc/gitea
Files installed:
/usr/bin/gitea - Gitea binary
/etc/gitea/app.ini - Configuration file
/etc/rc.d/rc.gitea - Init script
/var/lib/gitea/ - Working directory
/var/lib/gitea/custom/public/assets/img/ - Custom logo/favicon
/var/lib/gitea/data/ - Database and repositories
/var/lib/gitea/log/ - Log files
/usr/doc/gitea-1.25.5/ - Documentation
Uninstalling:
removepkg gitea
This removes the binary, init script, config directory, custom
files, and logs. It does NOT remove:
- The git user and group
- User repositories (under /var/lib/gitea/data/gitea-repositories/)
To completely remove all data after uninstall:
rm -rf /var/lib/gitea
userdel git
groupdel git
For more information, see https://docs.gitea.com/