How to Install Drone CI on Ubuntu 18.04

Updated on July 5, 2019
How to Install Drone CI on Ubuntu 18.04 header image


Drone is an automated, continuous testing and delivery platform which runs on your own infrastructure. Drone supports any language, service or database which can run inside a Docker container. The Drone pipeline configuration is written in YAML format in a file named .drone.yml which resides in the root of your project. Drone easily integrates with Github, Gitlab, Bitbucket or Gitea. In this tutorial, we will use Drone with Github.


  • Fresh Vultr Ubuntu 18.04 instance with at least 2 GB RAM.
  • Non-root user with sudo privileges.
  • Github account.

Ensure that your system is up to date.

sudo apt update && sudo apt upgrade -y

Step 1: Install Docker CE

Docker provides an easy to use installation script which can be executed on any supported system. It will configure the Docker official repository along with the installation of the Docker Community Edition.

Install the latest version of Docker.

curl -L | bash

Once you have installed Docker, add the current user into the docker group so that we can run docker commands from the logged in user.

sudo usermod -aG docker $USER

For the above command to take effect, you will need to log out from the terminal and log back in again.

Test the docker version to ensure we can successfully run the docker command.

docker --version

You will see a similar output.

user@vultr:~$ docker --version
Docker version 18.09.5, build e8ff056

Step 2: Get Github Client ID and Secret

Login to Github and navigate to register a new OAuth application. Provide any name of your choice to the OAuth application. Provide Homepage URL as and Authorization callback URL as Be sure to replace with your actual Vultr IP address or any domain name pointed towards your Vultr instance.

Once you click the Register application button, you will be given a Client ID and Client Secret.

Make a note of these, as they will be required further in the tutorial.

Step 3: Install Drone CI

Download the latest available version of Drone.

docker pull drone/drone:1

You can always check for the latest tag on the Drone docker hub page.

Create a new environment file to store the Drone configuration.

sudo nano /var/drone.env

Put the following configuration into the editor. Make sure to replace example values with the actual ones.


Note: DRONE_RUNNER_CAPACITY can be increased according to the RAM available on your instance.

Save the file and exit from the editor.

Start Drone by running the following command.

docker run \
  --volume=/var/run/docker.sock:/var/run/docker.sock \
  --volume=/var/lib/drone:/data \
  --env-file=/var/drone.env \
  --publish=80:80 \
  --publish=443:443 \
  --restart=always \
  --detach=true \
  --name=drone \

That's it. To open the Drone web UI, visit in your browser and log in using your Github account.