How do I setup SSH deployments?

Setting up the Server

SSH deployments allow you to trigger shell commands on your remote server when you commit or push to Beanstalk, or directly from your Beanstalk account manually. To use SSH deployments you’ll need to specify a server name, server address (URL or IP), port, credentials and the shell commands you want Beanstalk to execute during deploy.

In the commands section, you’ll specify all of the shell commands that you would like to run on your remote server, each command on a separate line.

There are two variables that you can use in your commands:

  • %REVISION% variable will be replaced with the revision that is being deployed.
  • %FROM_SCRATCH% will be replaced with 1 or 0, depending whether deployment is from scratch or not.

See our full list of available  variables and commands.

Please be careful when using shell commands, SSH deployments are powerful but also dangerous. Please double check the commands before finishing setup.

SSH authentication

If you prefer, you can use SSH key authentication instead of a password to connect to your remote server.

Use SSH key for authentication

If you decided to use SSH key authentication, make sure to download Beanstalk’s public key (which we provide on the server setup page) and install it on your remote server. You are ready to go after that.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us