Header

Configuring a shell server

To begin, select Shell as your server's protocol. Note that the server must be able to connect through SSH as a prerequisite for this setup.

Shell server protocol

Configuring a shell server works in the same manner as an SSH/SFTP server in DeployHQ. You need to add your server's connection details, such as the server's hostname, username and password (or upload the given SSH key if needed).

SSH/SFTP settings

Once this is done, add the working repository for this server. Even though your repository files are not uploaded with this server's deployments, you can specify the working folder where your config files will be uploaded, and where your commands will be run in.

Afterwards, add the SSH command(s) you wish to run on this server. These commands will be run each time a deployment to this shell server is triggered.

Additionally, here you can specify the command's behavior, and additional details.

Shell server config

Once all settings are set, save the server, and you're set!

SSH Key authentication

If you choose to use your project's public key to authenticate, you can copy it from the server configuration page, then login to your server as the same user that you're configuring in DeployHQ. The easiest way to do this is via a terminal.

Once you've logged in, you can run the following commands:

cd ~/.ssh/
nano authorized_keys

Then, paste the key into the file as a new line, with no trailing spaces. Then, press Ctrl+X, then y, then hit enter to save your key.

Tree

Proudly powered by Katapult. Running on 100% renewable energy.