This article is about CodeShip Basic.

Deploy to DigitalOcean

You will need roughly 2 minutes to read this article.

This article is about deploying to DigitalOcean with CodeShip Basic.

If you’d like to learn more about CodeShip Basic, we recommend the getting started guide or the features overview page

You should also be aware of how deployment pipelines work on CodeShip Basic.

Getting Started with DigitalOcean

DigitalOcean offers virtual servers (called Droplets). If you have not yet set up a Droplet, check out DigitalOcean’s tutorial.

While not necessary, selecting the Ubuntu 14.04 image for your Droplet will provide even greater parity between your production and CI/CD environment.

For the ssh key section, be sure that you are including/authorizing your CodeShip project’s ssh key with your Droplet.

With the exception of the Capistrano tool, all the following options would need to be configured as custom scripts in your deployment pipeline.

Option One: Instructing the Droplet to pull changes directly from Github/Bitbucket/Gitlab


If you have a Ruby on Rails application the most common way to deploy to DigitalOcean is with Capistrano. Check out our article on Capistrano Deployments in CodeShip for general guidance on how to run Capistrano commands from CodeShip. Please also take a look at DigitalOcean’s example project for setting up Capistrano within a Droplet.

bundle exec cap production deploy


You can also provide explicit commands on the Droplet shell via ssh.

ssh \
'cd ~/src/repo ; systemctl stop node-sample ; git pull ; systemctl restart node-sample'

Option Two: Copy files directly from CodeShip build to Droplet

Files can be copied directly over from your CodeShip deployment build to your Droplet via ftp, sftp, scp or rsync. Your custom deployment commands would be included in your deployment pipeline as a custom script.


scp -rp ~/clone/*


rsync -avz ~/clone/

Need more help?

Contact our support team or post on Stack Overflow using the tag #codeship. Did you check the status page and changelog?

There are also several code examples and sample projects available for you to get started with.

Article not helpful?

Does this article need improvement? If so, please send feedback or submit a pull request!