# Frequently asked questions

Source: https://gitea-mirror.raylabs.io/docs/faq/

## The basics

### What is Gitea Mirror?

A self-hosted web app that copies repositories from GitHub, GitLab, Gitea, Forgejo or any git URL into a Gitea or Forgejo server you run, and keeps them in sync on a schedule. From GitHub it also copies issues, pull requests, releases, wikis and LFS objects; other sources carry less, see below. It can also push copies to GitHub or GitLab, in beta.

### Is it free?

Yes. Gitea Mirror is open source under the [AGPL-3.0](https://github.com/RayLabsHQ/gitea-mirror/blob/main/LICENSE) and has no paid tier. You run it, and the Gitea or Forgejo server it mirrors into, on your own hardware.

### What is the support banner in the sidebar?

It asks you to sponsor the project on GitHub, $25 once or any amount you like. Nothing is locked without it. **Not now** hides it for 15 days, and a new account does not see it in its first week. Each account in the app has its own banner.

After sponsoring, click **I've sponsored**. Gitea Mirror asks GitHub, with the GitHub token you saved, whether that account has sponsored the project; private, past and monthly sponsorships all count. If it has, you get a thank-you, the banner is gone for good, and a pink heart sits next to the version; click it to see the thank-you again. Sponsored from another GitHub account? Enter its username instead; for another account only public sponsorships show up. With no github.com token saved, for example with only a GitHub App, GitLab or Gitea source, **I've sponsored** hides the banner without checking.

The first time the banner is due, Gitea Mirror makes this check once by itself, so if you sponsored before, you are thanked instead of asked. Each check is one GitHub request; after that one, the app only asks when you click.

### Do I need a Gitea or Forgejo server already?

Yes. Gitea Mirror creates and manages mirrors on a server you already run; it does not include one. Both can run on the same machine. The server needs to reach your source, because Gitea and Forgejo pull the code themselves.

### Which hosts can it mirror from and to?

Sources: GitHub (including Enterprise Server), GitLab (gitlab.com or self-hosted), and Gitea or Forgejo, which covers Codeberg, plus plain git hosts in beta. Destinations: Gitea and Forgejo as pull mirrors, and GitHub and GitLab as push targets in beta. An account can connect several sources and has one destination. See [Sources](https://gitea-mirror.raylabs.io/docs/sources/) and [Destinations](https://gitea-mirror.raylabs.io/docs/destinations/).

### How is it different from a hosted backup service?

A hosted service keeps your data on its servers and charges a subscription, and in exchange it runs and monitors everything for you. Gitea Mirror is free and keeps the copies on your hardware, but running and updating it is your job. The [comparison page](https://gitea-mirror.raylabs.io/comparison/github-backup-tools/) goes through the options, including a plain script.

### Is it ready for business use?

It is a community project with no support contract, no SLA and no compliance certifications. It suits homelabs, independent developers and small teams who are comfortable running their own services. If you need guaranteed support, choose a commercial service.

## What gets mirrored

### Does it mirror issues, pull requests and releases?

From GitHub, yes: issues with their comments, labels and milestones, pull requests, releases with their files, wikis, security advisories, discussions and container images, each behind a switch in **Mirror Content** on the Mirroring tab. Gitea, Forgejo and Codeberg sources also mirror releases and their files. GitLab sources carry the code, the wiki and LFS objects. Git URL sources carry the code. The [table on the Sources page](https://gitea-mirror.raylabs.io/docs/sources/#what-each-source-can-mirror) lists every combination.

### How do pull requests show up?

As issues. Gitea's API can open new pull requests but can't import existing ones, so each one becomes an issue titled `[PR #n]` and tagged `pull-request` plus its own labels, with `[MERGED]` or `[CLOSED]` added for those states. The issue lists the author, the branches, the commits and the changed files, and its comments, reviews and comments on lines of code follow as comments unless **Copy comments and reviews** is off.

### Can it mirror starred repositories?

Yes. Turn on starred repositories in **Repository Selection**. By default they go into one organization named `starred`; **Starred repository destination** can keep each under its owner instead, or place them like any other repository. See [Mirror strategies](https://gitea-mirror.raylabs.io/docs/configuration/#mirror-strategies).

### What if I have several organizations?

Choose a mirror strategy: keep the source's owners, put everything in one organization, put everything under your user, or mix, with personal repositories in one organization and organizations kept as they are. An organization or a single repository can also get its own destination on the Organizations and Repositories pages.

### Does it support Git LFS?

Yes, on Gitea and Forgejo destinations. Turn on LFS in **Mirror Content**, and turn it on in Gitea or Forgejo itself with `LFS_START_SERVER = true` in the `[server]` section of `app.ini`. LFS objects are not pushed to GitHub or GitLab targets.

### Can it mirror private repositories?

Yes, everything the token can see. Use a GitHub classic token with `repo` and `read:org`, a GitLab token with `read_api` and `read_repository`, or a Gitea or Forgejo token with `read:repository`, `read:user` and `read:organization`. GitLab internal projects are mirrored as private. See [Tokens and permissions](https://gitea-mirror.raylabs.io/docs/tokens/).

### Can it push to GitHub or GitLab?

Yes, in beta. Neither host offers a usable pull mirror, so the app keeps a bare clone of each repository and pushes branches and tags with force and prune. The target is overwritten on every sync, so treat it as read only. Issues, pull requests, releases, wikis and LFS objects are not sent to push targets. The GitHub token needs `repo` and `workflow`; the GitLab token needs `api` and `write_repository`.

## Running it

### How long does setup take?

Installing is one compose file and one command, see the [Quickstart](https://gitea-mirror.raylabs.io/docs/quickstart/). Most of the time goes into creating the tokens for your source and your destination, which [Tokens and permissions](https://gitea-mirror.raylabs.io/docs/tokens/) walks through.

### How often does it sync?

On the schedule you set under **Configuration > Automation**: every hour up to once a day, from a start time you pick. An interval such as `30m`, or a cron expression, can be set with `SCHEDULE_INTERVAL`. Gitea and Forgejo also refresh each pull mirror on their own interval, 8 hours by default.

### What does it need to run?

Docker, Kubernetes, a Proxmox LXC container, Nix or Bun, on amd64 or arm64. Gitea Mirror keeps its settings and job history in SQLite; the mirrors themselves live on your Gitea or Forgejo server. Push targets add a bare clone of each repository to the data directory, so budget roughly their size on top.

### How do I install it with Helm?

The chart is published to the GitHub Container Registry with every release:

```bash
helm upgrade --install gitea-mirror oci://ghcr.io/raylabshq/charts/gitea-mirror \
  --namespace gitea-mirror --create-namespace
```

The chart version equals the application version and its default image tag is that release. See [Kubernetes with Helm](https://gitea-mirror.raylabs.io/docs/deployment/#kubernetes-with-helm).

### Is there an API?

Yes. Create an API key on the **Access** tab of the Configuration page and send it in the `x-api-key` header. A key can list repositories, add them, start mirrors and syncs, run cleanup and reconcile, and check health. Keys can be read only, can expire and can be revoked. See [API and API keys](https://gitea-mirror.raylabs.io/docs/api/), and the [MCP server](https://gitea-mirror.raylabs.io/docs/mcp/) for AI assistants.

### I already have mirrors on Gitea. Can Gitea Mirror take them over?

Yes. **Reconcile with destination**, on the Repository Cleanup card of the Automation tab, compares your server with the database. Mirrors of your configured source that it does not know about can be adopted, and rows whose mirror has gone missing can be reset so the next run recreates them. Regular repositories and mirrors of other hosts are listed but never touched. See [Cleanup and reconcile](https://gitea-mirror.raylabs.io/docs/cleanup-and-reconcile/).

## Security and recovery

### Are my tokens stored securely?

Source, destination and notification tokens are encrypted at rest with AES-256-GCM, using the key in `ENCRYPTION_SECRET`. Someone with only the SQLite file cannot read them. Push targets receive tokens through a git credential helper, never in a URL or on disk.

### What happens if I lose access to GitHub?

Your mirrors keep the history, branches and tags they had at the last sync, and the issues, pull requests and releases you chose to mirror. Clone from your Gitea server with `git clone https://your-gitea-server/owner/repo.git`, and read the issues and releases in Gitea's web interface. Changes made on GitHub after the last sync are not there.

### Can I work in a mirror?

Not directly. Pull mirrors refuse pushes so they cannot drift from the source. To get a copy you can push to, clone the mirror, push it to a new regular repository, and stop mirroring the original. See [Troubleshooting](https://gitea-mirror.raylabs.io/docs/troubleshooting/).

### What should I back up?

The data directory: it holds the database, the generated secrets and any snapshots or push clones. Your mirrors are backed up with your Gitea or Forgejo server. [Backups and upgrades](https://gitea-mirror.raylabs.io/docs/backups-and-upgrades/) has the details for each install method.

### Can I run it alongside a hosted backup service?

Yes. Gitea Mirror only reads from your source, so it does not interfere with other tools that read from it too.
