Automatically mirror repositories from GitHub to your self-hosted Gitea instance.
# Using Docker (recommended)
docker compose up -d
# Access at http://localhost:4321
First user signup becomes admin. No configuration needed to get started!
- 🔁 Mirror public, private, and starred GitHub repos to Gitea
- 🏢 Mirror entire organizations with flexible strategies
- 🎯 Custom destination control for repos and organizations
- 🔐 Multiple auth methods with UI setup: Local, OIDC/SSO, Forward Auth
- 📊 Real-time dashboard with activity logs
- ⏱️ Scheduled automatic mirroring
- 🐳 Dockerized with multi-arch support (AMD64/ARM64)
# Clone repository
git clone https://github.com/arunavo4/gitea-mirror.git
cd gitea-mirror
# Start with Docker Compose
docker compose up -d
# Access at http://localhost:4321
Authentication can be configured through the UI during initial setup! You can also pre-configure using environment variables:
# Create a .env file for custom settings (optional)
# Pre-configure authentication method (or use UI setup wizard)
AUTH_METHOD=local # Options: local, oidc, forward
# OIDC/SSO Configuration (can be set via UI)
AUTH_OIDC_ISSUER_URL=https://your-provider.com/application/o/gitea-mirror/
AUTH_OIDC_CLIENT_ID=gitea-mirror
AUTH_OIDC_CLIENT_SECRET=your-secret
# Forward Auth (can be set via UI)
AUTH_FORWARD_TRUSTED_PROXIES=10.0.0.1,10.0.0.2
See Authentication Guide for detailed SSO setup with Authentik, Keycloak, etc.
# One-line install on Proxmox VE
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/gitea-mirror.sh)"
See the Proxmox VE Community Scripts for more details.
# Install Bun
curl -fsSL https://bun.sh/install | bash
# Setup and run
bun run setup
bun run dev
-
First Time Setup
- Navigate to http://localhost:4321
- Choose authentication method via setup wizard
- Create admin account (first user)
- Configure GitHub and Gitea connections
-
Mirror Strategies
- Preserve Structure: Maintains GitHub organization structure
- Single Organization: All repos go to one Gitea organization
- Flat User: All repos under your Gitea user account
- Mixed Mode: Personal repos in one org, organization repos preserve structure
-
Customization
- Click edit buttons on organization cards to set custom destinations
- Override individual repository destinations in the table view
- Starred repositories automatically go to a dedicated organization
# Install dependencies
bun install
# Run development server
bun run dev
# Run tests
bun test
# Build for production
bun run build
- Frontend: Astro, React, Shadcn UI, Tailwind CSS v4
- Backend: Bun runtime, SQLite, Drizzle ORM
- APIs: GitHub (Octokit), Gitea REST API
- Auth: JWT, OIDC/OAuth2, Forward Auth headers
Contributions are welcome! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.
MIT License - see LICENSE file for details.