Self-hosted Git service with web interface - perfect for AI agent repositories and collaborative development on ThreeFold Grid.
TFGrid Gitea provides a lightweight, self-hosted Git service with a clean web interface. Ideal for:
- AI Agent repositories - Store code generated by tfgrid-ai-agent
- Private repos - Keep your code secure on your infrastructure
- Team collaboration - Built-in issue tracking and pull requests
- Gateway integration - Access via example.com/gitea
- 🔒 Self-hosted - Your code, your infrastructure
- 🌐 Web Interface - GitHub-like UI for browsing repos
- 🔑 User Management - Multiple users and organizations
- 📝 Issues & PRs - Built-in project management
- 🔗 API Access - RESTful API for automation
- 🪶 Lightweight - Runs on 2 cores, 2GB RAM
# Deploy Gitea on single VM
tfgrid-compose up tfgrid-gitea
# Get the IP address
tfgrid-compose address tfgrid-gitea
# Access at: http://<vm-ip>:3000# Deploy AI + Gateway + Gitea stack
tfgrid-compose up ai-gateway-stack --domain example.com
# Access at: https://example.com/gitea# SSH to Gitea VM
tfgrid-compose ssh tfgrid-gitea
# Check service status
systemctl status gitea
# View logs
journalctl -u gitea -fDefault credentials:
- Username: gitadmin
- Password: changeme123
- Email: admin@localhost
Set environment variables before deployment:
export GITEA_ADMIN_USER=myadmin
export GITEA_ADMIN_PASSWORD=mysecurepassword
export GITEA_ADMIN_EMAIL=admin@example.com
export GITEA_DOMAIN=example.com
tfgrid-compose up tfgrid-giteatfgrid-gitea/
├── tfgrid-compose.yaml # Deployment manifest
├── deployment/ # Deployment hooks
│ ├── setup.sh # Install Gitea
│ ├── configure.sh # Configure service
│ └── healthcheck.sh # Verify deployment
└── README.md # This file
Minimum:
- 2 CPU cores
- 2 GB RAM
- 25 GB disk
Recommended:
- 2 CPU cores
- 4 GB RAM
- 50 GB disk
tfgrid-ai-stack provides seamless integration with automatic Git repository creation:
# Deploy complete AI + Git environment
tfgrid-compose up tfgrid-ai-stack
# Create project (automatically creates Gitea repo)
tfgrid-compose create "my-website"
# View in web interface
# Access: http://your-ip/git/tfgrid-ai-agent/my-website/For manual integration with tfgrid-ai-agent:
# Configure git to use your Gitea
git config --global user.name "AI Agent"
git config --global user.email "ai@example.com"
# Create project and push to Gitea
ai-agent create "my-website"
cd my-website
git remote add origin http://your-gitea-ip/username/my-website.git
git push -u origin mainGitea provides a full RESTful API:
# Create repository via API
curl -X POST "http://example.com/gitea/api/v1/user/repos" \
-H "Authorization: token YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"new-repo","private":false}'
# List repositories
curl "http://example.com/gitea/api/v1/user/repos" \
-H "Authorization: token YOUR_TOKEN"Generate token: Settings → Applications → Generate New Token
When deployed behind tfgrid-gateway, Gitea is automatically proxied:
# Gateway automatically configures:
location /gitea {
proxy_pass http://gitea-vm:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}Access at: https://example.com/gitea
# Check service status
systemctl status gitea
# Check logs
journalctl -u gitea -f
# Restart service
systemctl restart gitea# Check if port is listening
netstat -tuln | grep 3000
# Check firewall
ufw status
# Test local connection
curl http://localhost:3000# Check database file
ls -lh /var/lib/gitea/data/gitea.db
# Check permissions
ls -ld /var/lib/gitea/data- Gitea Docs: https://docs.gitea.com/
- TFGrid Docs: https://docs.tfgrid.studio/
- API Docs: http://your-gitea/api/swagger
- Change default admin password immediately
- Use strong passwords
- Enable 2FA (Settings → Security)
- Regular backups of
/var/lib/gitea/data/ - Keep Gitea updated
# Backup Gitea data
tar -czf gitea-backup.tar.gz /var/lib/gitea/data /etc/gitea
# Restore
tar -xzf gitea-backup.tar.gz -C /
systemctl restart giteaApache 2.0 License - See LICENSE file
Copyright 2025 ThreeFold
- 📚 Documentation: docs.tfgrid.studio
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
- 📧 Contact: tfgrid.studio/contact
- 📖 Gitea Docs: docs.gitea.com