Drone is a popular open-source Continuous Integration and Continuous Deployment (CI/CD) platform utilized for automating the software delivery workflows. In this tutorial, you will learn how to install Drone on Debian latest version.
Before starting the installation process, you will need the following prerequisites:
Before installing the Drone, ensure that the system packages are up to date by running the following command:
sudo apt update && sudo apt upgrade -y
Drone requires Docker to be installed on the host machine. Follow these steps to install Docker on your system:
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce -y
sudo systemctl start docker && sudo systemctl enable docker
You can verify the installation and enablement of Docker using the command:
sudo systemctl status docker
Drone requires Docker Compose to be installed on the host machine. Follow these steps to install Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Verify the Docker Compose version using the command:
docker-compose --version
Now that you have Docker and Docker Compose installed on your system, it's time to install Drone. Follow these steps to install Drone:
sudo mkdir /opt/drone && sudo chown -R $USER:$USER /opt/drone
nano /opt/drone/docker-compose.yml
version: '3'
services:
drone-server:
image: drone/drone:latest
ports:
- 80:80
- 443:443
volumes:
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock
restart: always
environment:
- DRONE_SERVER_HOST=<YOUR_SERVER_IP>
- DRONE_SERVER_PROTO=http
- DRONE_RPC_SECRET=<YOUR_RPC_SECRET>
drone-runner:
image: drone/drone-runner-docker:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
environment:
- DRONE_RPC_HOST=<YOUR_SERVER_IP>
- DRONE_RPC_PROTO=http
- DRONE_RPC_SECRET=<YOUR_RPC_SECRET>
Note: Replace
docker-compose up -d
You can verify the installation of Drone by accessing the Drone Web Interface via a web browser by typing:
http://<YOUR_SERVER_IP>
In this tutorial, you learned how to install Drone on Debian latest version. With Drone installed, you can now start automating the testing and deployment of your software. Happy coding!
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!