Independent testing Updated April 2026 387 self-hosting guides 5 VPS providers tested

guide

How to Self-Host Drone CI on a VPS (Complete Guide)

Learn how to self-host Drone CI on a VPS with a step-by-step 2026 guide covering install, configuration, and securing Drone CI for reliable daily use.

How to Self-Host Drone CI on a VPS (Complete Guide)

Self-hosting continuous integration and delivery systems can significantly enhance your development workflow. Drone CI is an open-source CI system that integrates seamlessly with your repository and provides an intuitive user interface for managing builds. In this guide, we will walk you through the process of self-hosting Drone CI on a VPS.

Why Use a VPS for Drone CI?

Using a VPS (Virtual Private Server) for hosting Drone CI allows you to have complete control over your environment. This is crucial for developers who want to customize their CI pipelines and keep sensitive data secure. Below is a small comparison of some of the top VPS providers suitable for hosting Drone CI.

ProviderPriceResourcesIdeal For
Contabo VPS5.99 EUR/mo4 GB RAM, 2 vCoresBudget users
Hetzner Cloud4.15 EUR/mo2 GB RAM, 1 vCoreSmall projects
DigitalOcean6 USD/mo1 GB RAM, 1 vCoreStartups
Vultr6 USD/mo1 GB RAM, 1 vCoreFlexibility
Linode5 USD/mo1 GB RAM, 1 vCoreVPS beginners

Prerequisites

Before you begin, ensure you have:

  1. A VPS: Choose one from the options above. For example, Contabo or Hetzner.
  2. Docker: Drone CI runs in a Docker container.
  3. Domain Name (optional): For accessing the CI server visually and securely.
  4. GitHub or equivalent repository access if you want to set up webhooks.

Step 1: Set Up Your VPS

  1. Log in to your VPS: Use SSH to log into your server.

    ssh root@your-server-ip
  2. Update the system:

    apt-get update && apt-get upgrade -y
  3. Install Docker and Docker Compose:

    apt-get install -y docker.io docker-compose
  4. Verify that Docker is installed correctly:

    docker --version

Step 2: Install Drone CI

  1. Create a directory for Drone:

    mkdir -p /opt/drone
    cd /opt/drone
  2. Create a .env file: Create a new file named .env in /opt/drone directory with the following contents:

    DRONE_GITEA_SERVER=https://your-gitea-server.com
    DRONE_RPC_SECRET=your-rpc-secret
    DRONE_SERVER_HOST=your-drone-domain.com
    DRONE_SERVER_PROTO=https
  3. Create docker-compose.yml file:

    version: '3'
    
    services:
      drone-server:
        image: drone/drone:latest
        ports:
          - 80:80
        environment:
          - DRONE_GITEA_SERVER=https://your-gitea-server.com
          - DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
          - DRONE_SERVER_HOST=${DRONE_SERVER_HOST}
          - DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO}
        volumes:
          - drone-data:/data
    
    volumes:
      drone-data:
  4. Launch Drone: Run the following command to start Drone server:

    docker-compose up -d

Step 3: Configure Drone CI

  1. Access Drone: Open your browser and go to http://your-drone-domain.com. You should see the Drone CI login screen.

  2. Log in with your repository account: Connect your Git service.

  3. Set up your repository: Once logged in, you can configure which repositories you want to automate with Drone.

  4. Create a .drone.yml file in your repository: This file contains the pipeline configuration.

Frequently Asked Questions

What are the storage requirements for Drone CI?

Drone CI itself does not require much storage space. The minimum recommendation is 1 GB, which is enough for logs and configuration files. However, depending on the size of your codebase and the number of builds, you may need to consider a larger disk size. Additionally, prolonged usage will generate more data; hence, monitoring storage regularly is essential. Use volume management options within Docker to optimize storage utilization.

Can I integrate Drone CI with GitHub or GitLab?

Yes, Drone CI supports integration with various repository hosting services, including GitHub, GitLab, Bitbucket, and Gitea. To set up, visit the Drone configuration page after logging in and select your desired Git service. Ensure that you have the necessary permissions on your repositories to allow Drone to create webhooks and access the repositories.

How can I scale my Drone CI installation?

To scale your Drone CI installation, you can run multiple instances of the Drone server behind a load balancer. This configuration ensures better performance under heavy usage. Adjust the docker-compose.yml file for scaling and consider using a PostgreSQL database for persistence and clustering. Review the official Drone documentation or community resources like r/selfhosted for advanced scaling strategies.

Conclusion

Self-hosting Drone CI on a VPS is a powerful way to enhance your CI/CD strategy. By following this guide, you have set up a functional environment tailored to your development needs. For more details on selecting the best VPS providers for your project, check out our full VPS comparison.