How to deploy from GitLab CE with CI to DigitalOcean?

I am trying to build a basic auto-deployment with GitLab Continous Integration. We are using GitLab Community Edition.

GitLab CI lets us define ‘environments’ where our code gets deployed to, however I don’t know if it is possible to define a remote server as target environment and if yes (as it sounds logical to me) how to grant GitLab access to that address?

I have found tutorials on how to install GitLab on our droplet, but my question is that is it possible to keep our repo on GitLab CE and pushing our code to our droplet using these CI pipelines?

Thanks for the help in advance :)


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Should use the docker.

This post might help. You can deploy to a remote server over ssh with rsync but you have to specify the user and the keyfile so it’s available when rsync runs. With this in place, GitLab will be able to deploy to the remote location on your server that you specified using an ssh-key.