Sync GitHub to Your Self-Hosted Gitea

Keep SaaS and self-hosted in lockstep

You may still collaborate on GitHub every day, yet want a LAN Gitea copy you control. Gitea Mirror bridges the two: it tracks owners, auto-discovers repos, mirrors metadata, and keeps a local instance only minutes behind upstream without hand-written cron jobs.

Requirements

Step-by-step

1. Connect accounts in the admin wizard

  1. Sign in at http://<mirror-host>:4321.
  2. Open Configuration → Connections.
  3. Paste the GitHub PAT and choose the owners (user + orgs) you want mirrored.
  4. Add your self-hosted Gitea URL and token; pick the destination org structure (typically Preserve structure).

2. Import the repository inventory

3. Configure sync cadence

Gitea Mirror dashboard showing overall sync status for GitHub organizations and repositories.

Monitor GitHub-to-Gitea sync health from the dashboard while the scheduler keeps repositories aligned automatically.

4. Mirror metadata and LFS

In Configuration → Connections → Content & Data:

5. Validate the local mirror

Monitoring & health checks

Tips for smooth syncing

FAQ

How quickly can the mirror catch up to GitHub?

Intervals of 15–30 minutes keep most orgs near real-time. You can shorten for critical repos, but watch GitHub API rate limits.

Can I mirror multiple GitHub users and organizations?

Yes. Add each owner in Configuration → Connections, then choose a destination strategy (Preserve structure or a specific org) for Gitea.

Is it safe to store tokens in Gitea Mirror?

Tokens saved via the Configuration UI are encrypted at rest. Rotate them regularly and monitor dashboard alerts for expirations.