How can I deploy from CircleCI to Vultr

vps

#1

I use vultr server how i connect circleci and vultr?


#2

Check out this example that I wrote in a blog post. https://bitkumo.com/blog/continuously-deploying-with-jekyll-and-circleci/

In this case we are deploying Jekyll to an Ubuntu VPS. You can replace Jekyll with any random collection of of files for your app, and the Ubuntu VPS with any server that has SSH.

Key Points

  1. Create a User on the Server and allow them to have SSH access
  2. Copy the User’s Private Key to CircleCI
  3. Set up a deployment config using something like rsync as an example.
deployment:
  push_to_server:
    branch: master
    commands:
      - rsync -avz $YOUR_APP/ circleci@$YOUR_SERVER:/var/www/

#3

thank you so much levlaz :sunglasses:


#4

I’ve got a remote server on Digital Ocean and I’m trying to deploy my nodeJS API out there. I followed your example from that blog post. Seems straight forward. Every Time the build happens and it gets to the deploy step, circleci is asking for a password. I created an ssh key on the remote server for the user circleci. That key is added to the authorized_keys dir. I added that key also to my CircleCI project under SSH Permissions and included the IP Address as the hostname. In my deployment section of my circle.yml file I use the rsync command with YOUR_SERVER as the IP Address. What am I missing?


#5

@elrondshep that is very strange, I deploy braindump to Digital Ocean without any issues.

Build: https://circleci.com/gh/levlaz/braindump/619#config
Deploy.sh Script: https://github.com/levlaz/braindump/blob/master/scripts/deploy.sh

Can you share a link to your CircleCI build so I can take a look?


#6