Building OSS version from source


I’m trying to build the OSS version of Drone from source (which is the only way to get it as far as I know). I want to test run this version before considering upgrading to the Enterprise version.
I’m following the simple guide here: drone/BUILDING_OSS at master · drone/drone (

I have installed the newest version of Go for Windows, cloned the repository, cd’ed into the repo.
When I run the command

go install -tags "oss nolimit"

I would expect $GOPATH/bin to contain the compiled binary.

Instead, I get this error

        build constraints exclude all Go files in

Go version:

$ go version
go version go1.16.4 windows/amd64

How do I resolve this issue? Does it only work on Linux?

I have never used Go before, any help is greatly appreciated.

I tried to build from source via WSL2 (Windows Subsystem for Linux), but it gave a similar error

$ go version
go version go1.13.8 linux/amd64
cannot load no Go source files

You can use the following to install drone, Overview | Drone you dont need to build it from source. Here are the steps to run drone against a github repoistory with docker GitHub | Drone

Thank for the reply.

I already have followed that guide and successfully set up Drone locally with a Gitea instance. However, I’m quite sure that the installation guide in the docs that you link to is for the Enterprise version. Whereas I want to install the Open Source Edition.

This is from the FAQ (Enterprise | Drone)

Where do I download the Open Source Edition?
There is no official distribution of the Open Source Edition. You can build the Open Source Edition from source using the oss build tags.

There looks to be something up with master, i will look into that. To get you running you can build of the latest released version git reset v2.0.1 --hard then retry the build go install -tags "oss nolimit"

1 Like

Thanks a lot my friend!
I was able to build it now by resetting to v2.0.1. Much appreciated.

Excellent, glad it worked.

there should be a fix going in later today for master.

1 Like