How to Install Drone on Elementary OS Latest

Drone is a popular continuous integration and delivery platform that can be used to automate software testing, building, and deployment. In this tutorial, we will show you how to install Drone on Elementary OS Latest.

Step 1: Update System

Before installing Drone, it is always recommended to update your system to the latest version. You can use the following command to update your system:

sudo apt update && sudo apt upgrade

Step 2: Install Docker

Drone requires Docker to be installed on the system. You can install Docker using the following command:

sudo apt install docker.io

Step 3: Install Drone

Now we are ready to install Drone. You can download the latest version of Drone from their official website. In this tutorial, we will download the latest version of Drone using the following command:

curl -L https://github.com/drone/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar xz
sudo install -t /usr/local/bin drone

Step 4: Update Drone Configuration

After installing Drone, you need to create a configuration file for Drone. You can create the configuration file at /etc/drone/drone.toml using the following command:

sudo mkdir /etc/drone
sudo nano /etc/drone/drone.toml

Add the following configuration in the drone.toml file:

[server]
  host = "your.domain.com"
  port = "80"
  proto = "http"

[database]
  driver = "sqlite3"
  datasource = "/var/lib/drone/drone.sqlite"

[session]
  secret = "change-me"

[email]
  enabled = true
  from = "notify@your.domain.com"
  host = "smtp.gmail.com"
  port = "587"
  username = "you@your.domain.com"
  password = "your-password"
  starttls = true
  skip_verify = false
  recipients = ["you@your.domain.com"]

Update the host, from, username, password and recipients field as per your requirements.

Step 5: Start Drone Server

Finally, start the Drone server using the following command:

sudo docker run \
  --volume=/var/lib/drone:/data \
  --env=DRONE_GITHUB_SERVER=https://github.com \
  --env=DRONE_GITHUB_CLIENT_ID=xxxxxxxxxxxxxxxx \
  --env=DRONE_GITHUB_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxx \
  --env=DRONE_RUNNER_CAPACITY=2 \
  --env=DRONE_SERVER_HOST=your.domain.com \
  --env=DRONE_SERVER_PROTO=http \
  --publish=80:80 \
  --publish=443:443 \
  --restart=always \
  --detach=true \
  --name=drone \
  drone/drone:latest

Make sure to replace DRONE_GITHUB_CLIENT_ID and DRONE_GITHUB_CLIENT_SECRET environment variables with your own.

Congratulations! You have successfully installed Drone on your Elementary OS Latest system. You can now access the Drone web interface at http://your.domain.com.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!