awaisjameel / laravel-cpanel-hosting
A robust, secure, and production-ready Laravel package that makes deploying Laravel applications on **cPanel / shared hosting** painless and professional.
Fund package maintenance!
awaisjameel
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/awaisjameel/laravel-cpanel-hosting
Requires
- php: ^8.2
- illuminate/contracts: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^8.0||^9.0||^10.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
README
Laravel package for secure shared-hosting deployment endpoints and cPanel-friendly root hosting setup.
Features
- Secure deploy endpoints with token or webhook signature validation
- Configurable deployment pipeline (
/deploy) .envsync with optional backup and required-key validation- Storage link fallback (
symlink-> recursive copy) - Installer command for config + root
index.phpand.htaccessstubs - Dedicated deploy logging channel
- Optional MySQL legacy index-length compatibility
Installation
composer require awaisjameel/laravel-cpanel-hosting
Run installer:
php artisan cpanel-hosting:install
Configuration
Publish config manually if needed:
php artisan vendor:publish --tag="cpanel-hosting-config"
Key env values:
CPANEL_DEPLOY_ENABLED=false CPANEL_DEPLOY_TOKEN= CPANEL_DEPLOY_WEBHOOK_SECRET= CPANEL_DEPLOY_PREFIX=deploy CPANEL_DEPLOY_ALLOWED_IPS= CPANEL_DEPLOY_LOG_CHANNEL=deploy
Endpoints
When enabled, routes are exposed under CPANEL_DEPLOY_PREFIX (default deploy):
GET /deployfull pipelineGET /deploy/sync-envGET /deploy/clearGET /deploy/migrateGET /deploy/migrate-freshGET /deploy/cacheGET /deploy/queue-restartGET /deploy/storage-linkGET /deploy/maintenance-downGET /deploy/maintenance-upGET /deploy/optimizeGET /deploy/health
Authentication:
X-Deploy-Token: {token}header (preferred)?token={token}query parameterX-Hub-Signature-256/X-Gitlab-Tokenwebhook verification when configured
Security Notes
- Keep
CPANEL_DEPLOY_TOKENsecret and rotate on exposure. - Prefer header token over query token.
- Restrict with
CPANEL_DEPLOY_ALLOWED_IPSwhen possible. - Do not expose deploy routes with
APP_DEBUG=true. migrate-freshis destructive.
Testing
composer test