Migration from Private Packagist™
This guide will help you migrate from Private Packagist™ to PACKAGE.broker.
Private Packagist™ is a trademark of its respective owner. This guide is provided for informational purposes only. PACKAGE.broker is not affiliated with, endorsed by, or sponsored by Private Packagist™. See Legal Notice for details.
Overview
Private Packagist™ is a commercial SaaS solution for hosting private Composer packages. PACKAGE.broker is a self-hosted, open-source Composer repository proxy and cache that provides similar functionality.
Prerequisites
- Access to your Private Packagist account
- Access to your PACKAGE.broker instance (Cloudflare Workers or Docker)
- Basic knowledge of Composer configuration
Migration Steps
Step 1: Export Your Current Configuration
-
List all repositories in Private Packagist:
- Log into your Private Packagist dashboard
- Navigate to "Repositories" section
- Document all repository URLs and authentication tokens
-
Export package list:
- Note all private packages currently hosted
- Document any custom package filters or access rules
-
Export credentials:
- Save your Private Packagist authentication tokens
- Note any webhook configurations
Step 2: Set Up PACKAGE.broker
-
Deploy PACKAGE.broker:
- Follow the Cloudflare Workers Quickstart or
- Follow the Docker installation guide
-
Create access tokens:
- Log into your PACKAGE.broker dashboard
- Navigate to "Access Tokens"
- Create tokens for each environment (development, staging, production)
Step 3: Add Repositories to PACKAGE.broker
For each repository in Private Packagist:
-
Add repository source:
- In PACKAGE.broker dashboard, go to "Sources"
- Click "Add Source"
- Enter the repository URL (GitHub, GitLab, Bitbucket, etc.)
- Configure authentication if needed
-
Configure webhooks (optional but recommended):
- Set up webhooks in your Git provider
- Point webhooks to your PACKAGE.broker instance
- This enables automatic package updates
Step 4: Update Composer Configuration
Update your composer.json files to use PACKAGE.broker:
Before (Private Packagist):
{
"repositories": [
{
"type": "composer",
"url": "https://repo.packagist.com/your-org/"
}
],
"require": {
"your-org/private-package": "^1.0"
}
}
After (PACKAGE.broker):
{
"repositories": [
{
"type": "composer",
"url": "https://package-broker.your-domain.com"
}
],
"require": {
"your-org/private-package": "^1.0"
}
}
Step 5: Update Authentication
Before (Private Packagist):
composer config --global http-basic.repo.packagist.com username password
After (PACKAGE.broker):
composer config --global http-basic.package-broker.your-domain.com token-name your-token
Or use auth.json:
{
"http-basic": {
"package-broker.your-domain.com": {
"username": "token-name",
"password": "your-token"
}
}
}
Step 6: Parallel Testing (Recommended)
Run both systems in parallel for a transition period:
- Keep Private Packagist active during migration
- Test PACKAGE.broker with a subset of packages
- Verify package downloads work correctly
- Monitor for any issues before full cutover
Step 7: Cutover Strategy
Once testing is complete:
- Update all
composer.jsonfiles to use PACKAGE.broker - Update CI/CD pipelines with new authentication
- Update team documentation with new repository URL
- Monitor for 24-48 hours to ensure smooth transition
- Cancel Private Packagist subscription after successful migration
Deployment Comparison
| Item | Private Packagist™ | PACKAGE.broker |
|---|---|---|
| Deployment Model | SaaS (hosted) | Self-hosted (Cloudflare Workers or Docker) |
| Setup Time | Instant | 10-15 minutes |
| Maintenance | Managed by vendor | Self-managed |
| Data Control | Vendor-managed | Full control |
Troubleshooting
Packages Not Found
If packages aren't found after migration:
- Verify repository sources are added in PACKAGE.broker dashboard
- Check webhook configuration is correct
- Manually trigger package sync if needed
- Verify authentication tokens are correct
Authentication Issues
If authentication fails:
- Verify token is created in PACKAGE.broker dashboard
- Check token has correct permissions
- Verify
auth.jsonor global config is correct - Test with
composer config --listto see current settings
Performance Issues
If downloads are slow:
- Check your PACKAGE.broker deployment location
- Consider using Cloudflare Workers for edge caching
- Verify network connectivity
- Check for any rate limiting
Support
If you encounter issues during migration:
- Open an issue on GitHub
- Join GitHub Discussions
Next Steps
After successful migration:
- Review compliance settings
- Check the getting started guide