# Incorrect linkback from Bitbucket Cloud

**URL:** <https://drone.discourse.group/t/incorrect-linkback-from-bitbucket-cloud/8000>\
**Category:** Drone Support\
**Created:** [December 18, 2017, 8:55pm UTC](https://drone.discourse.group/t/incorrect-linkback-from-bitbucket-cloud/8000 "2017-12-18T20:55:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brettswift](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/brettswift/32/3908_2.png) [@brettswift](https://drone.discourse.group/u/brettswift)\
**Post date:** [December 18, 2017, 8:55pm UTC](https://drone.discourse.group/t/incorrect-linkback-from-bitbucket-cloud/8000/1 "2017-12-18T20:55:51Z")

</div>

I don’t know if this is related to this ticket [Payload URL generation of webhooks ignores DRONE\_HOST](http://discuss.harness.io/t/payload-url-generation-of-webhooks-ignores-drone-host/492)

But that hasn’t been updated in a while.

When I go to bitbucket there is a link to the actual build instance.

IE: should be:

`http://<dns_name>/<account>/<repository_name>/85`

But what I get is:

`https://bitbucket.org/ip-172-17-130-168.domain.ad/<account>/<repo_name>/86`

docker-compose.yml file:

```
version: '2'
services:
  drone-server:
    image: drone/drone:0.8
    ports:
      - 80:8000
      - 9000:9000
    volumes:
      - /var/lib/drone:/var/lib/drone/
      - /etc/drone/key.pem:/etc/drone/key.pem
    restart: always
    environment:
      - DRONE_OPEN=true
      - DRONE_HOST=${DRONE_HOST}
      - DRONE_BITBUCKET=true
      - DRONE_BITBUCKET_CLIENT=${DRONE_BITBUCKET_CLIENT}
      - DRONE_BITBUCKET_SECRET=${DRONE_BITBUCKET_SECRET}
      - DRONE_DATABASE_DRIVER=mysql
      - DRONE_DATABASE_DATASOURCE=${DRONE_DATABASE_DATASOURCE}
      - DRONE_SECRET=${DRONE_SECRET}

```

DRONE\_HOST is part of the problem - as I’m setting it to the ec2 ([ip-172-17-130-168.domain.ad](http://ip-172-17-130-168.domain.ad)).

However it’s also injecting [bitbucket.org](http://bitbucket.org).

I know Bitbucket Cloud may not fully support this feature, but it seems as if I were to change DRONE\_HOST I’d still have an issue.

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [December 18, 2017, 9:20pm UTC](https://drone.discourse.group/t/incorrect-linkback-from-bitbucket-cloud/8000/2 "2017-12-18T21:20:55Z")

</div>

DRONE\_HOST must be `<proto>://<host>` format. The Bitbucket status API is fully supported and there are no known issues with this feature. We do frequently see individuals having issues when this value is misconfigured, which seems to be the case here (missing proto).

---

<div class="post-metadata">

**Author:** ![brettswift](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/brettswift/32/3908_2.png) [@brettswift](https://drone.discourse.group/u/brettswift)\
**Post date:** [December 18, 2017, 10:01pm UTC](https://drone.discourse.group/t/incorrect-linkback-from-bitbucket-cloud/8000/3 "2017-12-18T22:01:42Z")

</div>

Alright. I’ll test that. Thanks.

---

<div class="post-metadata">

**Author:** ![jesselang](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/jesselang/32/3760_2.png) [@jesselang](https://drone.discourse.group/u/jesselang)\
**Post date:** [December 18, 2017, 10:01pm UTC](https://drone.discourse.group/t/incorrect-linkback-from-bitbucket-cloud/8000/4 "2017-12-18T22:01:44Z")

</div>

It doesn’t appear that detail is mentioned in the docs that I was able to find, and the only mentions look like this: `DRONE_HOST=${DRONE_HOST}` which isn’t as helpful as one would like.

---

<div class="post-metadata">

**Author:** ![jesselang](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/jesselang/32/3760_2.png) [@jesselang](https://drone.discourse.group/u/jesselang)\
**Post date:** [December 18, 2017, 10:19pm UTC](https://drone.discourse.group/t/incorrect-linkback-from-bitbucket-cloud/8000/5 "2017-12-18T22:19:24Z")

</div>

Oh, found it here: [https://docs.drone.io/server/overview/](http://docs.drone.io/installation/)

> Drone needs to know its own address. You must therefore provide the address in \<scheme\>://\<hostname\> format. Please omit trailing slashes.

Having a concrete example in the code example below this line would likely help. Perhaps a PR opportunity for me or some other ambitious individual. Thanks all!

---

<div class="post-metadata">

**Author:** ![jesselang](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/jesselang/32/3760_2.png) [@jesselang](https://drone.discourse.group/u/jesselang)\
**Post date:** [December 20, 2017, 2:16am UTC](https://drone.discourse.group/t/incorrect-linkback-from-bitbucket-cloud/8000/6 "2017-12-20T02:16:59Z")

</div>

Perhaps this will help: [https://github.com/drone/drone/pull/2286](https://github.com/drone/drone/pull/2286)
