Skip to content

PAM Cloud & Forge

pushinbr/pam-laravel gives you one command surface for remote environments. A target is an environment name such as production or staging; each target has a provider:

Value Provider Supported actions
1 PAM Cloud deploy, rollback, status, logs, top, workers, queues, scheduler, scale
2 Laravel Forge deploy (through the site’s deployment webhook)

Providers are stored as integers in configuration, so they never depend on string spelling.

PAM_CLOUD_URL=https://cloud.example.com
PAM_CLOUD_PROJECT=example-app
PAM_CLOUD_TOKEN=your-api-token
PAM_REMOTE_PRODUCTION_PROVIDER=1

Requests go to:

{PAM_CLOUD_URL}/v1/projects/{project}/environments/{target}/{action}

with a bearer token. Read actions (status, logs, top, workers, queues, scheduler) use GET; deploy, rollback, and scale use POST with a JSON body. The action path segments are deployments, rollbacks, status, logs, top, workers, queues, scheduler, and scale.

Terminal window
pam artisan pam:deploy production
pam artisan pam:deploy production --release=2026.12.02
pam artisan pam:deploy production --rollback
pam artisan pam:remote status production
pam artisan pam:remote logs production --lines=200
pam artisan pam:remote top production
pam artisan pam:remote workers production
pam artisan pam:remote queues production
pam artisan pam:remote scheduler production
pam artisan pam:remote scale production --process=queue --instances=8
pam artisan pam:remote rollback production
  • --lines is clamped to 1..10000 (default 200).
  • scale requires --process (matching ^[a-z][a-z0-9_-]*$) and --instances=1..128.
  • Target names must match ^[a-z][a-z0-9_-]{0,62}$; production and staging are preconfigured, and you can add more in config/pam.php.
  • The response is printed as JSON.
config/pam.php
'remote' => [
// ...
'targets' => [
'production' => [
'provider' => (int) env('PAM_REMOTE_PRODUCTION_PROVIDER', 1),
'webhook' => env('PAM_FORGE_PRODUCTION_WEBHOOK'),
],
'eu-production' => [
'provider' => 1,
'webhook' => null,
],
],
],
Terminal window
pam artisan pam:remote status eu-production

Forge targets trigger the site’s deployment webhook:

PAM_REMOTE_PRODUCTION_PROVIDER=2
PAM_FORGE_PRODUCTION_WEBHOOK=https://forge.laravel.com/servers/123/sites/456/deploy/http?token=...
Terminal window
pam artisan pam:deploy production

Any other action against a Forge target fails with “Forge webhook targets support deploy.” Use Forge’s own dashboard, or PAM Cloud, for rollbacks, logs, and scaling.

Configure the Forge site itself (daemons, Nginx proxy, deploy script) as shown in Deploying Laravel.

  • Remote endpoints must use HTTPS. PAM_REMOTE_ALLOW_HTTP=true exists for local testing only.
  • Requests time out after PAM_REMOTE_TIMEOUT seconds (default 15, max 120).
  • Keep PAM_CLOUD_TOKEN and Forge webhook URLs in a secret store; a Forge webhook URL is itself a credential.
  • Give CI only the token it needs, and keep read-only operations separate from deploy, rollback, and scale.
  • If you expose these operations to AI tools, read MCP Automation first: mutations are disabled there by default.