SSH commands are commands that you can configure to run on a server before or after a deployment. These can be anything your server supports, such as starting or stopping services related to your app, or running a database migration.
To configure an SSH Command, head to the SSH Commands on the left hand side of the page within your project, then click New SSH Commmand to start:
Enter a descirption for your command which will be displayed in the deployment log, then the exact command you want to execute below. If you're executing multiple commands on different lines, you may need to terminate each line with a
Next, you can choose how long the command can run for, and the option to stop the deployment completely if the command fails, which may be particularly useful if you're running commands before the file upload process is started.
After that, choose when the command should be executed; before or after the file upload process, then for all deployments, the first deployment, or every deployment after the first one.
Finally, you can choose if you want the SSH command to run on all servers in your project, or for only specific ones. If you want to set specific servers, first uncheck the Run this command on all current and future servers? option then you'll be able to select individual servers in the Choose a server dropdown.