Most of us never think much about where our code actually lives. We push to GitHub, close the laptop, and move on. It only takes one bad moment to realize how much we rely on it. A deleted repo, a locked account, or an outage can change everything. I wanted a simple way to keep a second copy of everything I write, and that is how I found Gitea Mirror.
What is Gitea Mirror?
Gitea Mirror is a self-hosted tool that keeps your GitHub repositories backed up and in sync with your own Gitea instance. It’s open source, simple to run, and made for developers who like having their own copy of everything they build.


Gitea Mirror Core Features
Automatic Sync
Gitea Mirror connects to your GitHub account and mirrors your repositories on a schedule you choose. Once configured, it quietly keeps your Gitea instance up to date without any manual steps.
Private Repository Support
With a GitHub token that includes the right permissions, you can mirror private repositories just as easily as public ones.
Bulk Mirroring and Filtering
You can mirror every repository from a user or organization, or filter which ones to include or skip. There’s even support for mirroring the repositories you’ve starred on GitHub.
Preserve Organization Structure
When copying repositories, Gitea Mirror can keep your GitHub organization and project structure intact so everything stays in familiar places.
Dashboard and Logs
The dashboard shows which repositories have synced, when they were last updated, and whether any failed. It’s easy to check if everything is running as expected.
Dry Run Option
You can run it once in dry mode to test your setup before mirroring anything. It logs what would happen without making real changes.
Open Source and Self-Hosted
Gitea Mirror is open source under GPL-3.0, and because you host it yourself, you stay in full control of your data and environment.
Gitea Mirror Configuration Highlights
The Gitea Mirror docs explain several useful options you can set through environment variables:
GITHUB_TOKEN– required for access to your repositories, including private ones.GITEA_URL– where to mirror your repositories.SYNC_INTERVAL– how often mirrors run (for example, every few hours or daily).MIRROR_TYPE– choose between user, organization, or starred repositories.PRESERVE_STRUCTURE– keeps your organization and repo layout consistent.DRY_RUN– preview changes before syncing for the first time.
These small options make Gitea Mirror flexible enough for both simple personal setups and larger teams.
How Gitea Mirror Works
Setting up Gitea Mirror takes only a few steps. You pull the repository, tweak a couple of settings, and bring it up with Docker Compose. After that, you connect your GitHub token, add your Gitea URL, choose how often it should sync, and you’re done. It also has a one line installer for Proxmox LXC!

It runs well on a small home server and handles bigger setups without trouble. Gitea Mirror doesn’t try to replace anything. It just keeps your GitHub and Gitea in sync so your code is always backed up and easy to reach.
Final Notes and Thoughts
What I like about Gitea Mirror is that it just takes one more worry off the list. Once it’s set up, you know your code is backed up and safe no matter what happens with GitHub. There’s something reassuring about knowing every project you’ve built lives on your own server, not someone else’s.
If you end up trying it out, stop by the Gitea Mirror GitHub page and give the project a star. It’s a small way to support the developer for building something this useful.
Discussion