May 22, 2025 âĸ 4 min Read
Gitea Mirror 2.0 - Enhanced GitHub to Gitea Repository Mirroring
A modern web application for automatically mirroring repositories from GitHub to your self-hosted Gitea instance, now with improved performance and deployment options
Gitea Mirror 2.0: Faster, Lighter, More Flexible
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. Today, I'm excited to announce Gitea Mirror 2.0, featuring significant performance improvements and new deployment options.
What's New in 2.0
The latest version of Gitea Mirror brings several major improvements:
- Switched from Node.js to Bun - Dramatically improved performance and reduced memory usage
- Replaced Redis with SQLite - Simplified architecture with Bun's native SQLite driver
- Added LXC container deployment - New deployment options for Proxmox VE and local LXD
- Enhanced event management - Better tracking and notification of mirroring operations
- Improved dashboard layout - Equal width for Repository list and Recent activity sections
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
With version 2.0, I've focused on making the application even more efficient and easier to deploy in various environments.
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
- Detailed event tracking with read/unread status
- First-time user signup experience with secure authentication
đ Flexible Deployment Options
- Docker: Fully Dockerized for easy deployment
- LXC Containers: Deploy on Proxmox VE or local LXD environments
- Native: Run directly with Bun for maximum performance
- Health Check API: Built-in monitoring endpoint for service health
Technology Stack
Gitea Mirror 2.0 is built with modern technologies:
- Frontend: Astro, React, Shadcn UI, Tailwind CSS v4
- Backend: Bun runtime (replacing Node.js)
- Database: SQLite with Bun's native driver and Drizzle ORM
- 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. The switch to Bun and SQLite has significantly improved performance and reduced resource usage.
Getting Started
Getting started with Gitea Mirror is now even easier with multiple deployment options:
Docker (Recommended for most users)
# Clone the repository
git clone https://github.com/arunavo4/gitea-mirror.git
cd gitea-mirror
# Start the application in production mode
docker-compose --profile production up -d
Bun (Native Installation)
# Clone the repository
git clone https://github.com/arunavo4/gitea-mirror.git
cd gitea-mirror
# Setup and run
bun run setup
bun run build
bun run start
LXC Container (Recommended for server deployments)
For Proxmox VE:
# One-command installation
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/arunavo4/gitea-mirror/main/scripts/gitea-mirror-lxc-proxmox.sh)"
After starting the application, you'll be guided through a first-time setup process where you can configure your GitHub and Gitea connections.
Health Monitoring
Gitea Mirror 2.0 includes a built-in health check endpoint at /api/health
that provides:
- System status and uptime
- Database connectivity check
- Memory usage statistics
- Environment information
This makes it easy to monitor your deployment:
# Basic check (returns 200 OK if healthy)
curl -I http://your-server:4321/api/health
# Detailed health information (JSON)
curl http://your-server:4321/api/health
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 2.0 bridges the gap between GitHub collaboration and self-hosted code control with improved performance and flexibility. The transition to Bun and SQLite has made the application faster and more resource-efficient, while the new LXC deployment options provide greater flexibility for different environments.
If you're looking to maintain control of your code while still collaborating on GitHub, give Gitea Mirror 2.0 a try!
Have questions or feedback? Feel free to open an issue on GitHub or reach out to me directly.