The Bitbucket add-on allows you to manage your environments directly from your Bitbucket repository.


  • Create a new environment when creating a branch or opening a pull request on Bitbucket.
  • Rebuild the environment when pushing new code to Bitbucket.
  • Delete the environment when merging a pull request.

Install the add-on

On your Bitbucket account, click on your avatar, select Manage Account, and simply install the add-on by selecting Find new add-ons from the left menu. The add-on is under the Deployment category.


The Bitbucket Integration can only be connected by the account owner.


We recommend you install the add-on at the team level (select Manage Team instead) so that every repository that belongs to the team can use the add-on.


If you have created your account using the bitbucket oAuth Login in order to use the Platform CLI you will need to setup a password which you can do by visiting this page

Get started

To connect your Bitbucket repository to, go to the repository page as an administrator on Bitbucket and click on the Settings icon. Then Click on integration under PLATFORM.SH.

You can then Create a new project or even connect to an existing project on if you are the owner of it.

The add-on needs access to some information on your repository. Click on Grant access. Choose the region where you want your project to be hosted and click Create free project.

That's it! The bot will build your project and connect it to your Bitbucket repository.

You can already start pushing code (branch, pull request, ...) to your Bitbucket repository and see those changes automatically deployed on

Types of environments

Environments based on Bitbucket pull requests will have the correct 'parent' environment on and will be activated automatically with a copy of the parent's data.

However, environments based on (non-pull-request) branches cannot have parents and will inherit directly from master and start inactive by default.

Validate the integration

You can verify that your integration is functioning properly using the CLI command

$ platform integration:validate