Deploy to Cloudways
In this article, I’ll walk you through how to easily deploy your site hosted with Cloudways.
Deploying with Launchdeck
Launchdeck is an automated code deployment tool that allows you to easily deploy code to your servers. You can write configuration files, define custom commands and deploy automatically whenever you push.
Our basic plan is free - including all our features and allows you to deploy 1 project unlimited times a day!
Before you get started
When you first start using Launchdeck to deploy code to your server hosted with Cloudways, it’s important that you’re already using Git, and have set up SFTP on Cloudways. The details of the connection can be found in the "Master Credentials" section and instructions on where to find them are available in this guide.
Create a project
Let’s get started by creating a new project and linking your Git account. You can easily connect a Github or Bitbucket account and choose from the list of repositories available within the account. Or if you're using a different Git provider, like Gitlab or a self-hosted server, you can choose the Private/Hosted Git server option.
Setting up Cloudways server
Now let’s tell Launchdeck where to upload the files.
Pick ‘SFTP’ as the server type and give it an easily recognizable name.
Afterwards, input your public IP address as the hostname, followed by your Cloudways username and password, or use a generated key instead. It's worth noting that Cloudways SSH connections operate on port 22 (the default), so you can leave the port field empty.
Enter the upload path to which your files should be uploaded. This is the absolute path on the Cloudways server where your project will be stored, when deploying to Cloudways this path will look something like
To figure out whether the server connection data is correct, run the server connection test and we’ll try to connect to your server and check the provided path(s).
It's also posible to deploy to your Cloudways server using SSH. A major advantage of SSH is that it allows for commands to be executed on your server, including the creation of symlinks. This enabled Launchdeck to publish new versions of your project without any downtime at all. The way this works is by adding an entirely new directory for each new version, to which a symlink from your server’s webroot will be created or updated once you wish to publish this new version. Find out more on how zero downtime atomic deployments work.
How to configure your server using SSH can be found in our SSH server configuration docs.
Deploy for the first time
You’re now ready to start your first deployment. Click ‘create new project’ to confirm the settings and add the project. In the project overview, you can now start the build. The code will be cloned from your repository and prepared for you to publish it. Hit ‘Publish’ and your code is live!
If you then commit changes to your repository, the commit will automatically appear in your project overview where you’ll be able to upload and publish your new version with the push of a button. If anything goes wrong, you can simply roll back to the latest working version.
That’s all! By using Launchdeck to deploy to your Cloudways server, you’ll never have to upload a new version manually. Just hit “publish”, and Launchdeck will deploy your site or app within seconds.
Launchdeck has a variety of useful features to help you deploy your site: