- What is illuminate/remote used for in Laravel?
- Illuminate Remote provides SSH-based remote command execution with a fluent API for connecting to servers, running commands, and handling output inside a Laravel application. Typical uses include deployment hooks triggered from a control panel, per-tenant server provisioning, fleet-wide command fan-out, and replacing ad-hoc Symfony Process calls that shell out to ssh. It is part of the Laravel framework and is meant for application-driven remote execution, not general infrastructure automation.
- Should I run composer require illuminate/remote?
- No. illuminate/remote is a read-only subtree split of laravel/framework, published for Composer discoverability and dependency resolution, not for direct installation. Requiring it separately invites version skew between the split package and your framework, which can cause class-not-found or signature-mismatch errors. If a security scanner forces an explicit declaration, pin it to the exact framework version and document why.
- Which Laravel and PHP versions support illuminate/remote?
- It ships with modern Laravel framework releases in the Laravel 11/12 era and requires PHP 8.2 or newer. The split repository has no independent semantic versioning or changelog, so its API follows the framework minor version you run. Check your application's composer.lock and framework version rather than treating it as a separately versioned package.
- How do I install and configure Illuminate Remote?
- There is no separate install step when your Laravel version already includes the component; it is autoloadable through the framework. Configure SSH connections using your application's configuration and secrets store, and keep host, user, and key definitions out of source control. Consult the current framework documentation or source for exact configuration keys because the API moves with framework releases.
- How do I run SSH commands with Illuminate Remote?
- Resolve the component through Laravel's container and use its fluent connection API to define hosts, credentials, and the commands you want to run. Keep command construction in dedicated service classes rather than controllers so it can be tested, reviewed, and audited. Method names and options can change with framework minors, so verify against the source for your installed version.
- Can Illuminate Remote replace Envoy or Deployer for deployments?
- Generally no. Static deploys, repeatable provisioning, rollbacks, inventory, and config drift remediation belong in CI or infrastructure-as-code tools such as Envoy, Deployer, Ansible, or a managed platform like Laravel Forge or Cloud. Illuminate Remote is a better fit for on-demand remote execution driven by the application runtime, such as admin-triggered tasks or tenant operations.
- Is Illuminate Remote safe for production SSH credentials?
- In-process SSH means credentials, host keys, and remote command strings live inside application memory, logs, and exception traces, which is a materially different threat model from a deploy tool running on a bastion. Store per-connection keys in a secrets manager with rotation, grant least-privilege access, and avoid logging command output that may contain secrets. Prefer queue workers over web requests for remote calls, and wrap the component behind an internal interface so usage can be audited and constrained.
- How do I test Illuminate Remote without a real SSH server?
- Because the component is young and has little public testing guidance, isolate remote calls behind your own service interface and mock that interface in unit tests. For integration tests, point a test connection at a disposable SSH host or container and assert on exit codes and output handling. Avoid spreading raw remote calls through controllers, which makes both testing and credential review harder.
- Should remote commands run in web requests or queue workers?
- Queue workers are the safer default because SSH calls are slow, can time out, and should not hold a web request open while touching production servers. Running them in web requests also widens the exposure of credentials and command output in request logs and exception traces. Reserve synchronous execution for low-risk, fast, read-only checks if you use it at all.
- What are alternatives to Illuminate Remote for server automation?
- For deployments and infrastructure automation, use Envoy, Deployer, Ansible, or a managed platform such as Laravel Forge or Cloud. For lower-level SSH from PHP, phpseclib and the ssh2 extension are established alternatives, though they lack Laravel's configuration and testing conventions. Illuminate Remote makes sense when the Laravel application itself must drive SSH and you want framework-native configuration over a parallel stack.