PAM Cloud and Forge
PAM uses one remote operations contract for deployment and day-two tasks. A
target names an environment such as production or staging; the provider is
an integer-backed enum in configuration.
PAM Cloud target
Section titled “PAM Cloud target”PAM_CLOUD_URL=https://cloud.example.comPAM_CLOUD_PROJECT=paymentsPAM_CLOUD_TOKEN=...PAM_REMOTE_PRODUCTION_PROVIDER=1Provider values are stable sequential integers:
| Value | Provider |
|---|---|
1 |
PAM Cloud |
2 |
Laravel Forge |
PAM Cloud uses:
/v1/projects/{project}/environments/{target}/{action}Read operations use GET. Deploy, rollback, and scale use POST with bearer
authentication.
Operate an environment
Section titled “Operate an environment”pam deploy productionpam status productionpam logs production --lines=200pam top productionpam workers productionpam queues productionpam scheduler productionpam scale production --process=queue --instances=8pam rollback productionThe equivalent generic form is:
pam remote <action> productionScale accepts 1..128 instances. Keep deploy and rollback authorization
separate from read-only status and log access.
Laravel Forge
Section titled “Laravel Forge”Forge deployment webhooks support deploy:
PAM_REMOTE_PRODUCTION_PROVIDER=2PAM_FORGE_PRODUCTION_WEBHOOK=https://forge.laravel.com/servers/.../deploy/httpGenerate a zero-downtime deployment script:
pam forge-script --output=deploy/forge-deploy.shThe generated script uses Forge’s release creation and activation macros, installs authoritative production dependencies, runs PAM’s production audit, migrations, and optimization, then restarts queues and the PAM HTTP cluster. Review it with your migration and rollback policy before first use.
Local atomic releases
Section titled “Local atomic releases”For infrastructure without a remote provider:
pam deploy /srv/app/releases/20260725-1900 --localThe active release changes atomically. PAM starts a fresh worker generation, waits for readiness, and drains the old one. Keep the prior release until the rollback window closes.
An edge may retry an idempotent request during turnover. Never replay a write unless the endpoint has a domain-safe idempotency contract.
Security boundaries
Section titled “Security boundaries”- Remote endpoints require HTTPS by default.
PAM_REMOTE_ALLOW_HTTP=trueis for deliberate local testing only.- Keep Cloud tokens and Forge webhooks in a secret manager.
- Bind the PAM admin listener to loopback or a protected network.
- Give CI the smallest set of remote operations it requires.
- Keep MCP mutations disabled unless a trusted automation path needs them.