{"id":51171059,"url":"https://github.com/cebarks/fedora-mirror-container","last_synced_at":"2026-06-27T00:31:40.249Z","repository":{"id":366301901,"uuid":"1275792941","full_name":"cebarks/fedora-mirror-container","owner":"cebarks","description":"Containerized private Fedora mirror — syncs from upstream and serves packages over HTTP","archived":false,"fork":false,"pushed_at":"2026-06-21T07:51:27.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-21T08:16:45.752Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cebarks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-21T06:20:51.000Z","updated_at":"2026-06-21T07:51:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cebarks/fedora-mirror-container","commit_stats":null,"previous_names":["cebarks/fedora-mirror-container"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cebarks/fedora-mirror-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebarks%2Ffedora-mirror-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebarks%2Ffedora-mirror-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebarks%2Ffedora-mirror-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebarks%2Ffedora-mirror-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cebarks","download_url":"https://codeload.github.com/cebarks/fedora-mirror-container/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebarks%2Ffedora-mirror-container/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34837466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-27T00:31:39.697Z","updated_at":"2026-06-27T00:31:40.244Z","avatar_url":"https://github.com/cebarks.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fedora-mirror-container\n\nContainerized private Fedora mirror — syncs from an upstream public mirror and serves packages over HTTP.\n\n## What it does\n\n- Syncs the `fedora-enchilada` module (main Fedora packages) for **x86_64** and **aarch64**\n- Automatically detects and mirrors the **2 most recent stable Fedora releases**\n- Excludes debug packages, source RPMs, and test releases\n- Deduplicates identical files across releases via hardlinking\n- Serves the mirror over HTTP with proper keepalives and cache headers per Fedora's mirroring guidelines\n\n## Quick start\n\n1. **Find an upstream mirror** that exposes the `fedora-buffet` rsync module:\n\n   ```bash\n   # Check the Fedora MirrorManager for mirrors near you:\n   # https://mirrormanager.fedoraproject.org/\n   \n   # Verify a mirror has fedora-buffet:\n   rsync rsync://mirror.example.org/\n   ```\n\n2. **Configure:**\n\n   ```bash\n   cp .env.example .env\n   # Edit .env and set RSYNC_REMOTE to your chosen mirror\n   ```\n\n3. **Create the mirror directory:**\n\n   ```bash\n   sudo mkdir -p /srv/fedora-mirror\n   sudo chown 1000:1000 /srv/fedora-mirror\n   ```\n\n4. **Start:**\n\n   ```bash\n   docker compose up -d\n   ```\n\n   The first sync will take a long time (hours to days depending on bandwidth). The nginx container will start serving once the first sync completes.\n\n5. **Check status:**\n\n   ```bash\n   docker compose logs -f sync\n   ```\n\n## TrueNAS Scale deployment\n\nTo deploy as a custom app on TrueNAS Scale:\n\n1. Clone this repo onto your TrueNAS system or copy the `compose.yaml`, `nginx.conf`, and `.env` files\n2. Set `MIRROR_DIR` to a dataset path (e.g., `/mnt/pool/fedora-mirror`)\n3. Ensure the dataset is owned by UID 1000: `chown 1000:1000 /mnt/pool/fedora-mirror`\n4. Deploy via the Custom App feature using the compose file\n\nThe sync image is pre-built and pulled from `ghcr.io/cebarks/fedora-mirror-sync:latest` — no build step required.\n\n## Configuration\n\n| Variable | Default | Description |\n|---|---|---|\n| `RSYNC_REMOTE` | **(required)** | Upstream rsync mirror URL |\n| `SYNC_INTERVAL` | `21600` (6h) | Seconds between sync runs |\n| `MIRROR_DIR` | `/srv/fedora-mirror` | Host path for mirror data |\n| `MIRROR_PORT` | `8080` | Host port for HTTP access |\n| `CHECKIN_SITE` | *(optional)* | MirrorManager site name (enables automatic check-in) |\n| `CHECKIN_PASSWORD` | *(optional)* | MirrorManager site password |\n| `CHECKIN_HOST` | `$(hostname)` | MirrorManager host name (usually auto-detected) |\n\n## Private mirror with MirrorManager\n\nRegister as a private mirror so dnf on your LAN automatically prefers your mirror — no client-side repo changes needed.\n\n1. Create an account at [Fedora Account System](https://accounts.fedoraproject.org)\n2. Log into [MirrorManager](https://mirrormanager.fedoraproject.org/) and create a **Site** (check the **Private** box)\n3. Create a **Host** under the site, add your HTTP URL, and add a **Site Netblock** with your LAN CIDR\n4. Set `CHECKIN_SITE` and `CHECKIN_PASSWORD` in your `.env` to match the site name and password from MirrorManager\n\nAfter each sync, `quick-fedora-mirror` will automatically report your mirror's content to MirrorManager. Clients on your netblock will be directed to your mirror via dnf's metalink.\n\n## Client setup\n\nPoint your Fedora machines at the mirror by creating `/etc/yum.repos.d/local-mirror.repo`:\n\n```ini\n[fedora-local]\nname=Fedora $releasever - $basearch (local mirror)\nbaseurl=http://\u003cmirror-host\u003e:8080/fedora/linux/releases/$releasever/Everything/$basearch/os/\nenabled=1\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch\npriority=1\n\n[updates-local]\nname=Fedora $releasever - $basearch - Updates (local mirror)\nbaseurl=http://\u003cmirror-host\u003e:8080/fedora/linux/updates/$releasever/Everything/$basearch/\nenabled=1\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch\npriority=1\n```\n\n## ZFS tuning\n\nIf storing mirror data on ZFS, recommended dataset properties:\n\n```bash\nzfs set compression=zstd recordsize=1M atime=off \u003cpool\u003e/fedora-mirror\n```\n\nDo not enable ZFS dedup — `quick-fedora-hardlink` handles deduplication at the file level without the ARC memory overhead.\n\n## Customization\n\n### Include ISOs/images\n\nNon-ISO image files (`.img`, `.qcow2`, `.raw.xz`, `.box`) are excluded by default. ISOs are kept. To also exclude ISOs, add `\\.iso` to the `FILTEREXP` in `quick-fedora-mirror.conf`.\n\n### Mirror additional modules\n\nEdit `MODULES` and `MODULEMAPPING` in `quick-fedora-mirror.conf`. For example, to add EPEL:\n\n```sh\nMODULES=(fedora-enchilada fedora-epel)\nMODULEMAPPING=(fedora-enchilada fedora fedora-epel epel)\n```\n\n### Change sync frequency\n\nSet `SYNC_INTERVAL` in your `.env` file. With quick-fedora-mirror, you can sync as often as every 10 minutes — if there are no changes, it returns almost immediately.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcebarks%2Ffedora-mirror-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcebarks%2Ffedora-mirror-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcebarks%2Ffedora-mirror-container/lists"}