May 19, 2025 • 3 min Read
Introducing Gitea Mirror - Seamless GitHub to Gitea Repository Mirroring
A modern web application for automatically mirroring repositories from GitHub to your self-hosted Gitea instance
Introducing Gitea Mirror
As developers, we often find ourselves in situations where we need to collaborate on GitHub while maintaining control over our code. Whether it's for backup purposes, compliance requirements, or simply having a self-hosted copy of your repositories, mirroring GitHub repositories to a self-hosted Gitea instance can be invaluable.
That's why I built Gitea Mirror - a modern web application that automates the entire mirroring process with a clean, user-friendly interface.
Why I Built This
Before creating Gitea Mirror, the process of mirroring repositories from GitHub to Gitea involved manual configuration, editing files, and running Docker commands. This was time-consuming and error-prone, especially when dealing with multiple repositories or entire organizations.
I wanted a solution that would:
- Provide a user-friendly interface for managing mirroring operations
- Support mirroring entire organizations with structure preservation
- Automate the process with scheduling capabilities
- Offer detailed logging and status monitoring
Key Features
🔁 Comprehensive Mirroring Options
Gitea Mirror supports mirroring:
- Public and private GitHub repositories
- Entire organizations with structure preservation
- Your starred repositories
- Optional mirroring of issues and labels
🕹️ Modern User Experience
The application features:
- A clean, responsive dashboard with real-time status updates
- Repository management interface with filtering and search
- Organization management for mirroring entire GitHub orgs
- Toast notifications for better user feedback
- Light/dark mode toggle
🧠 Smart Automation
- Scheduled automatic mirroring with configurable intervals
- Smart filtering to include/exclude repositories based on patterns
- Job queue with detailed logs and error handling
- First-time user signup experience with secure authentication
🐳 Easy Deployment
- Fully Dockerized for easy deployment
- Multi-architecture support (ARM64 and x86_64)
- Minimal configuration required to get started
Technology Stack
Gitea Mirror is built with modern technologies:
- Frontend: Astro, React, Shadcn UI, Tailwind CSS v4
- Backend: Node.js
- Database: SQLite (default) or PostgreSQL
- Caching/Queue: Redis
- API Integration: GitHub API (Octokit), Gitea API
The application uses Astro's server-side rendering capabilities combined with React for interactive components, providing a fast and responsive user experience.
Getting Started
Getting started with Gitea Mirror is straightforward:
# Pull the latest multi-architecture image
docker pull ghcr.io/arunavo4/gitea-mirror:latest
# Run the application with Redis
docker run -d -p 4321:4321 --link gitea-mirror-redis:redis \
-e REDIS_URL=redis://redis:6379 \
ghcr.io/arunavo4/gitea-mirror:latest
After starting the application, you'll be guided through a first-time setup process where you can configure your GitHub and Gitea connections.
Future Ideas
I have several ideas for enhancing Gitea Mirror in the future:
- Enhanced authentication options (OAuth, LDAP)
- More granular mirroring controls
- Webhook support for triggering mirroring operations
- Advanced scheduling options
- Performance optimizations for large organizations
Open Source
Gitea Mirror is fully open source and contributions are welcome! Whether you want to fix a bug, add a feature, or improve documentation, your help is appreciated.
Check out the GitHub repository to get started.
Conclusion
Gitea Mirror bridges the gap between GitHub collaboration and self-hosted code control. It provides a seamless, automated solution for mirroring repositories without the hassle of manual configuration.
If you're looking to maintain control of your code while still collaborating on GitHub, give Gitea Mirror a try!
Have questions or feedback? Feel free to open an issue on GitHub or reach out to me directly.