Updated 2 years ago by Admin

This article explains how to install the Drone server for Gitea. The server is packaged as a minimal Docker image distributed on DockerHub.

Please note we strongly recommend installing Drone on a dedicated instance. We do not recommend installing Drone and Gitea on the same machine due to network complications, and we definitely do not recommend installing Drone and Gitea on the same machine using docker-compose.

Step 1 : Preparation

Create an OAuth Application

Create a Gitea OAuth application. The Consumer Key and Consumer Secret are used to authorize access to Gitea resources.

The authorization callback URL must match the below format and path, and must use your exact server scheme and host.
Application Create
Application View
Create a Shared Secret

Create a shared secret to authenticate communication between runners and your central Drone server.

You can use openssl to generate a shared secret:

$ openssl rand -hex 16

Step 2 : Download

The Drone server is distributed as a lightweight Docker image. The image is self-contained and does not have any external dependencies.

$ docker pull drone/drone:1

Step 3 : Configuration

The Drone server is configured using environment variables. This article references a subset of configuration options, defined below. See Configuration for a complete list of configuration options.


  • Required string value provides your Gitea oauth Client ID.
    Required string value provides your Gitea oauth Client Secret.
    Required string value provides your Gitea server address. For example, note the http(s) otherwise you’ll see an error with “unsupported protocol scheme” from Gitea.
    Optional boolean value configures Drone to authenticate when cloning public repositories.
    Required string value provides the shared secret generated in the previous step. This is used to authenticate the rpc connection between the server and runners. The server and runner must be provided the same secret value.
    Required string value provides your external hostname or IP address. If using an IP address you may include the port. For example
    Required string value provides your external protocol scheme. This value should be set to http or https. This field defaults to https if you configure ssl or acme.

Step 4 : Start the Server

The server container can be started with the below command. The container is configured through environment variables. For a full list of configuration parameters, please see the configuration reference.

1  docker run \
2 --volume=/var/lib/drone:/data \
9 --publish=80:80 \
10 --publish=443:443 \
11 --restart=always \
12 --detach=true \
13 --name=drone \
14 drone/drone:1

Step 5 : Install Runners

Once your server is up and running you will need to install runners to execute your build pipelines. See our runner installation documentation for detailed installation instructions.

How did we do?