PHPackages                             webysther/packagist-mirror - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webysther/packagist-mirror

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

webysther/packagist-mirror
==========================

Build mirror of packagist

1.1.1(6y ago)20015369MITPHPPHP &gt;=7.2

Since Jan 1Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Webysther/packagist-mirror)[ Packagist](https://packagist.org/packages/webysther/packagist-mirror)[ RSS](/packages/webysther-packagist-mirror/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (6)Dependencies (11)Versions (11)Used By (0)

DEPRECATED
==========

[](#deprecated)

The project has been frozen since the announcement of [composer 2](https://blog.packagist.com/composer-2-0-is-now-available/), which solved several problems, but still did not cover all users, especially in China. A few weeks ago, it adopted a [global CDN model](https://bunny.net/network/) and will [shutdown all legacy version 1](https://blog.packagist.com/shutting-down-packagist-org-support-for-composer-1-x/), which makes this mirror unnecessary. This includes Brazil, China and other countries where performance was still not good enough. This is a good move and I recommend that all existing mirrors start shutting down their domains. I will open a PR to remove the Packagist mirror page. Thank you to the community and everyone who helped the project.

📦 Packagist Mirror
==================

[](#-packagist-mirror)

[![docker pulls](https://camo.githubusercontent.com/8b752b9a863a919a698aea43864f00474d924e947633660786e453a179dd7348/68747470733a2f2f676f6f2e676c2f4a6235437134)](https://hub.docker.com/r/webysther/packagist-mirror)[![Minimum PHP Version](https://camo.githubusercontent.com/02fa1d88c767f10aef5ec90b8277633e7c7dacb401539aba1f8f431ebf641b6a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e322d3838393242462e7376673f7374796c653d666c61742d737175617265266d61784167653d33363030)](https://php.net/)[![Packagist](https://camo.githubusercontent.com/24fece6a392652f696150d05f3229ee537a268a961eb617367e621fd6277e60b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7765627973746865722f7061636b61676973742d6d6972726f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webysther/packagist-mirror)[![Codecov](https://camo.githubusercontent.com/e1b1d46d551c21a2d14fb772f988f7fd89ccd52f030930a6e5c675f9b3bc0e4f/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f5765627973746865722f7061636b61676973742d6d6972726f722e7376673f7374796c653d666c61742d737175617265)](https://github.com/Webysther/packagist-mirror)[![Quality Score](https://camo.githubusercontent.com/fb8437a5bdaffcf6fd7b5d0e7f8d47ba32791a323b65ac7ecacd4e0c468bc03d/68747470733a2f2f676f6f2e676c2f334c77624131)](https://scrutinizer-ci.com/g/Webysther/packagist-mirror)[![Mentioned in Awesome composer](https://camo.githubusercontent.com/0010400e0426dc3b36feec0a3380bbb7902177a6163d8cd39ad660d527a778d5/68747470733a2f2f617765736f6d652e72652f6d656e74696f6e65642d62616467652e7376673f7374796c653d666c61742d737175617265)](https://github.com/jakoch/awesome-composer#packagist-mirrors)

❤️ [Recommended by packagist.org](https://packagist.org/mirrors) ❤️

Announcement: [Composer 2 is now available!](https://blog.packagist.com/composer-2-0-is-now-available/)
-------------------------------------------------------------------------------------------------------

[](#announcement-composer-2-is-now-available)

**This mirror is for Composer 1; Composer 2 is very fast on its own. We will update to support the version 2 for those need solve the slow internet access or availability problem with the main repository.**

A mirror for [packagist.org](packagist.org) that regularly caches packages from one or more main mirrors to add to a distributed package repository.

[![Mirror creation](/resources/public/logo.svg)](/resources/public/logo.svg)

If you're using [PHP Composer](https://getcomposer.org/), commands like *create-project*, *require*, *update*, *remove* are often used. When those commands are executed, Composer will download information from the packages that are needed also from dependent packages. The number of json files downloaded depends on the complexity of the packages which are going to be used. The further you are from the location of the [packagist.org](packagist.org) server, the more time is needed to download json files. By using a mirror, it will save you time when downloading json because the server location is closer.

⚙️ How it works?
----------------

[](#️-how-it-works)

This project aims to create a local mirror with ease, allowing greater availability for companies/countries that want to use composer without depending on the infrastructure of third parties. It is also possible to create a public mirror to reduce the load on the main repository and better distribute requests around the world, helping make the packagist ecosystem faster as a whole!

When creating a mirror, you add a list of other mirrors to use for initial sync, which pulls all packages to your local machine. After the mirror is created and synced, the next runs will only pull updates. If any mirror fails to deliver a metadata file, the client will fallback to its configured main mirror, whether that be packagist.org or otherwise. If the client encounters an installation problem or loses connection to a mirror, it can return from where it stopped running.

[![Mirror creation](/resources/public/mirror-creation.gif)](/resources/public/mirror-creation.gif)

🌎 Packagist public metadata mirrors observatory around the world
----------------------------------------------------------------

[](#-packagist-public-metadata-mirrors-observatory-around-the-world)

🛫 Amazing data mirrors used to download repositories metadata built using this [recommended repository](https://packagist.org/mirrors) or another:

> Lists are ordered by country and sync frequency.

LocationMirrorMaintainerGithubSyncSinceBrazil[packagist.com.br](https://packagist.com.br)[Webysther](https://github.com/Webysther)[main](https://github.com/Webysther/packagist-mirror)Continuously[Q3'17](https://github.com/Webysther/packagist-mirror/commits/master?after=7230e201b4542b7db33e2b19517352653f751759+419)China[php.cnpkg.org](https://php.cnpkg.org)[Eagle Wu](https://github.com/wudi)[fork](https://github.com/cnpkg/packagist-mirror)Every minute[Q3'18](https://github.com/cnpkg/packagist-mirror/commits/master)China[packagist.mirrors.sjtug.sjtu.edu.cn](https://packagist.mirrors.sjtug.sjtu.edu.cn)[Shanghai Jiao Tong University](https://github.com/sjtug)[fork](https://github.com/sjtug/packagist-mirror)Every hour[Q2'19](https://github.com/sjtug/packagist-mirror/commits/master)Czech Republic[packagist.hostuj.to](https://packagist.hostuj.to)[HOSTUJ TO](https://hostuj.to)forkEvery 5 minutes🆕Q1'20Finland[packagist.fi](https://packagist.fi)[Niko Granö](https://xn--gran-8qa.fi)forkContinuously🆕Q2'20Germany[packagist.hesse.im](https://packagist.hesse.im)[Benjamin Hesse](https://hesse.im)[fork](https://github.com/42656e/packagist-mirror)Every minute🆕Q3'20Germany[composer.mg100.net](https://composer.mg100.net)[Alex Gummenscheimer](https://github.com/MG-100)[fork](https://github.com/MG-100/packagist-mirror)Every minute🆕Q1'21India[packagist.in](https://packagist.in)[Varun Sridharan](https://github.com/varunsridharan)forkEvery minute[Q2'19](https://www.registry.in/whois)India[packagist.vrkansagara.in](https://packagist.vrkansagara.in/packages.json)[Vallabh Kansagara](https://github.com/vrkansagara)[fork](https://github.com/vrkansagara/packagist-mirror)Every 5 minutes[Q4'19](https://packagist.vrkansagara.in/packages.json)Indonesia[packagist.phpindonesia.id](https://packagist.phpindonesia.id)[Indra Gunawan](https://github.com/IndraGunawan)forkEvery 30 seconds[Q3'18](https://github.com/IndraGunawan/packagist-mirror/commits/master)Indonesia[packagist.ianmustafa.com](https://packagist.ianmustafa.com)[Ian Mustafa](https://github.com/ianmustafa)[fork](https://github.com/ianmustafa/packagist-mirror)Every 30 seconds[Q3'19](https://github.com/ianmustafa/packagist-mirror/commits/master)Indonesia[packagist.telkomuniversity.ac.id](http://packagist.telkomuniversity.ac.id)[Telkom University](https://mirror.telkomuniversity.ac.id)forkEvery 5 minutes🆕Q1'20Japan[packagist.dev.studio-umi.jp](https://packagist.dev.studio-umi.jp/)[Studio Umi](https://github.com/studioumi)forkEvery minute🆕Q1'20Russia[packagist.org.ru](https://packagist.org.ru)[Konstantin Tarasov](https://github.com/ktarasov/)forkEvery 15 minutesQ3'22South Africa[packagist.co.za](https://packagist.co.za)[SolidWorx](https://github.com/SolidWorx)forkEvery 5 minutes[Q3'18](http://co.za/cgi-bin/whois.sh?Domain=packagist.co.za&Enter=Enter)South Korea[packagist.kr](https://packagist.kr)[PackagistKR](https://github.com/packagistkr)[fork](https://github.com/packagistkr/packagist-mirror)Every minute[Q3'18](https://github.com/packagistkr/packagist-mirror/issues)Thailand[packagist.mycools.in.th](https://packagist.mycools.in.th)[Jarak Kritkiattisak](https://github.com/mycools)[fork](https://github.com/mycools/packagist-mirror)Every 5 minutes[Q4'19](https://github.com/mycools/packagist-mirror/commits/master)USA[packagist-mirror.wmcloud.org](https://packagist-mirror.wmcloud.org)[Wikimedia](https://www.wikimedia.org/)forkEvery 5 minutes[Q3'18](https://phabricator.wikimedia.org/T203529)Taiwan[packagist.tw](https://packagist.tw)[Peter](https://github.com/peter279k)[fork](https://github.com/open-source-contributions/packagist-mirror)Every 5 minutes🆕Q2'20Vietnam[packagist.ondinh.net](https://packagist.ondinh.net/)[Long Nguyen](https://github.com/olragon)[main](https://github.com/Webysther/packagist-mirror)Every 5 minutes🆕Q3'20⚠️ Not based on this [source code](https://github.com/Webysther/packagist-mirror):

LocationMirrorMaintainerGithubSyncSinceChina[mirrors.aliyun.com](https://mirrors.aliyun.com/composer)[Aliyun](https://mirrors.aliyun.com)Every 5 minutesChina[mirrors.cloud.tencent.com](https://mirrors.cloud.tencent.com/help/composer.html)[Tecent Cloud](https://mirrors.cloud.tencent.com)Every dayJapan[packagist.jp](https://packagist.jp)[Hiraku](https://github.com/hirak)[forked](https://github.com/hirak/packagist-crawler)Every 2 minutes[Q4'14](https://github.com/hirak/packagist-crawler/graphs/contributors)Japan[packagist.kawax.biz](https://packagist.kawax.biz)[Kawax](https://github.com/kawax)[another](https://github.com/kawax/packagist-bot)Every hour[Q4'18](https://github.com/kawax/packagist-bot/graphs/contributors)🛑 Not working as a mirror of packagist.org (checked at Q1'20):

LocationMirrorMaintainerGithubReasonAt leastChina[mirrors.huaweicloud.com](https://mirrors.huaweicloud.com/repository/php)[Huawei Cloud](https://mirrors.huaweicloud.com)Outdated[Q3'19](https://mirrors.huaweicloud.com/repository/php/packages.json)China[packagist.phpcomposer.com](https://pkg.phpcomposer.com)Outdated[Q4'19](https://packagist.phpcomposer.com/packages.json)If you know any new mirror based or not on this one, please create a issue or a pull request with the new data.

Check [status page](https://status.packagist.com.br) for health mirror's.

[![World Map](/resources/public/world_map.svg)](https://packagist.com.br/world_map.svg)

This map shows working mirrors from above at the country level. The colors represent the topology drawn below.

🚀 Create your own mirror
------------------------

[](#-create-your-own-mirror)

[![Topology](/resources/public/network.svg)](https://packagist.com.br/network.svg)

> 💡Tip: use a machine with at least 2GB of RAM to avoid using the disk or swap space during sync.

> ⚠️ When syncing from `DATA_MIRROR` or `MAIN_MIRROR`, your server encodes and decodes all packages as `.gz` files to save disk space. You may need to enable server-side decoding for legacy composer clients that ask for decompressed packages.

There are currently three supported methods for creating your own mirror.

- [Docker Compose](#docker-compose) - Fully automated solution using Docker Compose.
- [Docker + Nginx + PHP](#docker-nginx-php) - Docker for cron jobs, Nginx + PHP on the host.
- [Nginx + PHP](#nginx-php) - Cron + Nginx + PHP all running on the host.

In all three methods, you need to clone the repository and copy `.env.example` to `.env` and modify to include your values instead of the defaults.

```
# Clone this repository
$ git clone https://github.com/websyther/packagist-mirror.git

# Setup environment variables
$ cd packagist-mirror
$ cp .env.example .env
$ nano .env
```

### Docker Compose

[](#docker-compose)

Run the following commands to start a container for Nginx, PHP-FPM, and a worker that runs cron jobs.

```
# Start all Docker containers
$ docker-compose up -d

# Follow log output
$ docker-compose logs -f
```

Once the initial sync has finished, open  to see your site.

> 💡Tip: Add `-f docker-compose.prod.yml` between `docker-compose` and `up` or `down` while running the above commands. If you are using [traefik](https://traefik.io), the services in this docker-compose file contain labels used by a running traefik container to automatically route traffic matching those labels to that container. It even auto-renews LetsEncrypt certificates for you.

### Docker Nginx PHP

[](#docker-nginx-php)

First, add the following line to `/etc/crontab` to tell the host to start a container for the `packagist-mirror` image on boot, replacing the values for each `-e` flag with your own. This will start the initial sync and generate the website files to be served by nginx.

> Learn about more the available options for this docker image [here](https://github.com/Webysther/packagist-mirror-docker).

```
* * * * * root docker run --name mirror --rm -v /var/www:/public \
-e MAINTAINER_REPO='packagist.com.br' \
-e APP_COUNTRY_NAME='Brazil' \
-e APP_COUNTRY_CODE='br' \
-e MAINTAINER_MIRROR='Webysther' \
-e MAINTAINER_PROFILE='https://github.com/Webysther' \
-e MAINTAINER_REPO='https://github.com/Webysther/packagist-mirror' \
-e URL='packagist.com.br' \
webysther/packagist-mirror
```

Next, add the following to `/etc/nginx/sites-available/packagist.com.br.conf` to host the website files:

```
server {
    index.html;

    server_name packagist.com.br www.packagist.com.br;

    location / {
        try_files $uri $uri/ =404;
        gzip_static on;
        gunzip on;
    }
}
```

To monitor sync progress, run the following command:

```
docker logs --follow --timestamps --tail 10 mirror
```

Nginx PHP
---------

[](#nginx-php)

After cloning the repository, run the following commands to configure for your host.

```
$ cd packagist-mirror && composer install
$ cp .env.example .env
```

Then, schedule the command to create and update the mirror:

```
$ php bin/mirror create -vvv
```

Nginx will now serve your mirror at the configured URL.

🐧 Development &amp; Contributing
--------------------------------

[](#-development--contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

📋 Requirements
--------------

[](#-requirements)

The following versions of PHP are supported by this version.

- PHP &gt;=7.2

🧪 Testing
---------

[](#-testing)

```
$ vendor/bin/phpunit
```

🥂 Credits
---------

[](#-credits)

- [Webysther Nunes](https://github.com/Webysther)
- [Hiraku NAKANO](https://github.com/hirak)
- [IndraGunawan](https://github.com/IndraGunawan)
- [All Contributors](https://github.com/Webysther/packagist-mirror/contributors)

💙 Other correlated projects
---------------------------

[](#-other-correlated-projects)

- [composer/mirror](https://github.com/composer/mirror) The official composer mirrorring script (used for official packagist.org mirrors)
- [composer-mirror](https://github.com/zencodex/composer-mirror) Create a mirror (open sourced code but not maintained)
- [composer-registry-manager](https://github.com/slince/composer-registry-manager) Easily switch to the composer repository you want
- [packagist-bot](https://github.com/kawax/packagist-bot) Yet Another Packagist Mirror
- [twity](https://github.com/julienj/twity) Provide a web based management of private and public composer packages.
- [velocita-proxy](https://github.com/isaaceindhoven/velocita-proxy) Composer caching reverse proxy

☮️ License
----------

[](#️-license)

MIT License. Please see [License File](LICENSE) for more information.

[![FOSSA Status](https://camo.githubusercontent.com/b0e2e8dfbe7dd1377f4f5ae669d56dfa20011b12f8791c757acfc460a83079a3/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532465765627973746865722532467061636b61676973742d6d6972726f722e7376673f747970653d6c61726765)](https://app.fossa.io/projects/git%2Bgithub.com%2FWebysther%2Fpackagist-mirror?ref=badge_large)

###  Health Score

39

↑

LowBetter than 86% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~295 days

Recently: every ~129 days

Total

7

Last Release

2376d ago

Major Versions

0.0.1 → 1.0.02018-06-10

PHP version history (3 changes)0.0.1PHP &gt;=5.3

1.0.0PHP &gt;=7.1

1.1.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a508e4c846549c2b55bf4f5ceb2d762ce6365c5ada4f94d21921e19b8b4af89?d=identicon)[Webysther](/maintainers/Webysther)

---

Tags

composercomposer-packagescrawlermirrorpackagistpackagist-mirrorphppackagistmirror

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webysther-packagist-mirror/health.svg)

```
[![Health](https://phpackages.com/badges/webysther-packagist-mirror/health.svg)](https://phpackages.com/packages/webysther-packagist-mirror)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[laravel/vapor-cli

The Laravel Vapor CLI

31310.7M8](/packages/laravel-vapor-cli)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
