Gitea Mirror hero image

Backup Your GitHub
To Self-Hosted Gitea

Automatic, private, and free. Own your code history forever. Preserve issues, PRs, releases, and wiki in your own Gitea server.

Self-Hosted Backup
Automated Syncing
$0/month
Gitea Mirror - Automated github to gitea repository mirroring & backup | Product Hunt

Everything You Need for Reliable Backups

Powerful features designed to keep your code safe and accessible, no matter what happens.

Automated Mirroring

Set it and forget it. Automatically sync your GitHub repositories to Gitea on a schedule.

Bulk Operations

Mirror entire organizations or user accounts with a single configuration.

Preserve Structure

Maintain your GitHub organization structure or customize how repos are organized.

Real-time Status

Monitor mirror progress with live updates and detailed activity logs.

Secure & Private

Self-hosted solution keeps your code on your infrastructure with full control.

Open Source

Free, transparent, and community-driven development. Contribute and customize.

Use Cases

Proven Ways Teams Depend on Gitea Mirror

Explore real-world workflows where automated mirroring removes risk, accelerates migrations, and keeps engineering teams shipping.

Backup GitHub Repositories

Continuously mirror GitHub repositories into self-hosted Gitea so your side projects stay safe even when GitHub hiccups.

Pain Point
Homelabbers rely on GitHub availability but want local backups that preserve history, metadata, and LFS assets.
Outcome
Automated syncs capture full repository history, metadata, and file storage so you always have an up-to-date local copy.
Redundancy Continuous Sync Homelab
Read the playbook

Deploy with Helm Chart

Install the project on Kubernetes in a few commands using the maintained Helm chart to keep your backup mirror humming.

Pain Point
Self-hosters want reproducible Git backups without hand-rolling manifests for every cluster or upgrade.
Outcome
Versioned Helm values capture backup config, making redeploys and upgrades fast, scriptable, and low-risk.
Kubernetes Helm Homelab
Read the playbook

Spin Up on Proxmox LXC

Run the one-liner Proxmox VE script to launch gitea-mirror inside a tuned LXC container for your lab backups.

Pain Point
Proxmox homelabbers want a repeatable Git backup without manually wiring containers, volumes, and services.
Outcome
The community script provisions the container, installs Bun, and wires persistence so mirroring works minutes after boot.
Proxmox Automation Homelab
Read the playbook

See It In Action

A clean, intuitive interface designed for efficiency and ease of use

Dashboard Overview

Dashboard Overview

Monitor all your mirrored repositories in one place

Swipe left or right to navigate

Get Started in Minutes

Choose your preferred installation method

1

Clone the repository

git clone https://github.com/RayLabsHQ/gitea-mirror.git && cd gitea-mirror
2

Start with Docker Compose

docker compose -f docker-compose.alt.yml up -d
3

Access the application

# Open http://localhost:4321 in your browser

First user becomes admin. After installation, create your account and configure GitHub and Gitea connections through the web interface.

FAQ

Common Questions About GitHub Backups

Everything you need to know about self-hosted repository backups with Gitea Mirror.

What is Gitea Mirror and why do I need it?

Gitea Mirror is a self-hosted tool that automatically backs up your GitHub repositories to your own Gitea server. You need it because GitHub outages, account issues, or policy changes can lock you out of your code. With Gitea Mirror, you own your backups completely—no monthly fees, no third-party storage, just full control over your repository history, issues, pull requests, and releases.

How is this different from BackHub or Rewind?

BackHub and Rewind are cloud services that cost $600-2400/year and store your code on their servers. Gitea Mirror is free, open source, and runs on your own infrastructure. You pay $0/month and have complete data ownership. The tradeoff: you manage the infrastructure yourself, while cloud services are fully managed.

Does Gitea Mirror backup issues, pull requests, and releases?

Yes! Enable 'Mirror metadata' in settings to backup issues with comments, labels, and assignees. Pull requests are mirrored as enriched issues with full metadata, commit history, and file changes (Gitea's API doesn't support creating PRs from external sources). Releases, including binary assets, and wiki pages are also backed up when enabled.

How long does setup take?

15-20 minutes with Docker. Run 'docker compose -f docker-compose.alt.yml up -d', visit localhost:4321, create an account, paste your GitHub and Gitea tokens, select repos to backup—done. The Proxmox LXC one-liner is even faster. No complex configuration files or manual scripting required.

What happens if GitHub goes down or I lose access?

You can immediately clone from your Gitea server instead. Your local backups include full commit history, branches, tags, issues, releases—everything. Recovery time is typically under 2 minutes (just point git to your Gitea URL). This is why it's called disaster recovery, not just mirroring.

How often does it sync with GitHub?

Configurable from every 15 minutes to once per day (or longer). Most users choose 1-8 hours based on how fresh they want backups. The scheduler auto-discovers new repos and respects per-repo intervals, unlike Gitea's built-in mirroring which defaults to 24 hours.

Can I backup starred repositories?

Yes! Gitea Mirror can automatically backup all your GitHub stars into a dedicated Gitea organization. Perfect for preserving important open source projects before they disappear (projects get deleted, renamed, or removed all the time).

What are the system requirements?

Minimal: 2 vCPU, 2GB RAM, 5-10GB storage (grows with repo count). Runs on Docker, Kubernetes, Proxmox LXC, or bare metal. Works on AMD64 and ARM64 (Raspberry Pi compatible). A small homelab server or cheap VPS is plenty for personal use.

Is my GitHub token stored securely?

Yes. All GitHub and Gitea tokens are encrypted at rest using AES-256-GCM. Even if someone gains access to the SQLite database, they can't read your tokens without the encryption key. Use the ENCRYPTION_SECRET environment variable for additional security.

Can I backup private repositories?

Absolutely. Just use a GitHub personal access token (classic) with 'repo' scope enabled. Gitea Mirror will backup all repositories you have access to—public, private, and internal.

What if I have multiple GitHub organizations?

Gitea Mirror supports multiple organizations with flexible destination strategies: preserve GitHub structure in Gitea, consolidate into a single org, or use mixed mode (personal repos in one place, org repos preserve structure). Edit individual organization destinations via the dashboard.

Does it support Git LFS (large files)?

Yes! Enable 'Mirror LFS' in settings. Make sure your Gitea server has LFS enabled (LFS_START_SERVER = true) and Git v2.1.2+. Large assets like videos, datasets, and binaries are backed up alongside your code.

How do I restore from backup?

Simple: 'git clone https://your-gitea-server/owner/repo.git'. Your full history, branches, and tags are there. For issues/PRs/releases, they're already in Gitea's web interface. For complete disaster recovery, restore the data volume to a fresh Gitea Mirror instance—everything (config, sync history) is preserved.

Can I run this alongside a cloud backup service?

Yes! Many users run Gitea Mirror for local/warm backups while using cloud services for offsite redundancy. Best of both worlds: instant local recovery and geographic disaster protection. Totally compatible.

Is this enterprise-ready with SLA guarantees?

No. Gitea Mirror is a community open source project—no 24/7 support, no compliance certifications, no guaranteed uptime. It's perfect for homelabs, indie developers, and small teams comfortable with self-hosting. If you need enterprise SLAs, consider commercial solutions like BackHub or GitHub Enterprise Backup.

Still have questions? Ask in our GitHub Discussions

Start Protecting Your Code Today

Join developers who trust Gitea Mirror to keep their repositories safe and accessible. Free, open source, and ready to deploy.

Loading...

Gitea Mirror is licensed under GPL-3.0.View License