Skip to main content
A site’s Commands tab runs a shell command against the live release and streams the output back. php artisan migrate, php artisan cache:clear, a one-off script.

Where it runs

In the live release, in the application directory, as the site’s own account — exactly like a deploy script. A command cannot reach the machine beyond the site it was run against. The same SHIPWAYS_* variables are in the environment, so $SHIPWAYS_PHP gets this site’s PHP version rather than the machine’s CLI default.

It is bounded

A command is stopped after 120 seconds by default. That is short on purpose: this is somebody waiting on a page, and a command that never returns would hold the server’s queue lane for as long as the agent allows. Anything longer belongs in a deploy script or a scheduled job. Self-hosted installations can change the limit with SHIPWAYS_COMMAND_TIMEOUT.

Permission

Running a command needs permission to change the site, because a command can do anything the deploy script could. It is not the same as opening a shell on the server, which is root on the machine. This is the site’s account and nothing more.

History

Every command is kept with who ran it and what it printed. That is the point of using this rather than SSH: the next person wondering what happened to production has somewhere to look.