laravel-cpanel-hosting maintained by awaisjameel
Description
A robust, secure, and production-ready Laravel package that makes deploying Laravel applications on **cPanel / shared hosting** painless and professional.
Author
Last update
2026/04/21 23:15
(dev-dependabot/github_actions/dependabot/fetch-metadata-3.1.0)
License
Downloads
0
Tags
Laravel cPanel Hosting
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