Heroku

read time 3 mins

Doppler's Heroku integration is a great way for Heroku users to sync a config's secrets with a Heroku app's config vars. Syncing with Heroku also adds another layer of high availability for your service, as now Heroku will also have the latest copy of your secrets. Our Heroku integration is a standalone service, that does not require the use of the Doppler CLI. Setup is quick and takes less than 3 minutes.

Prerequisites

  • You have an account setup at Heroku and have deployed some code

🚧

Empty Secret Values

Heroku currently doesn't allow environment variables with no value set for CI and Preview applications. If you have a secret with an empty value in Doppler at the time you enable syncing with Heroku, this will prevent secrets from being synced at all. If you add one after the initial sync, it won't be synced to Heroku – although other secrets will be synced when changed. For now, we recommend removing any secrets with empty values from Doppler to avoid confusion and potential syncing problems.

Authorization

In your project, navigate to Integrations and select "Heroku":

1427

We will redirect you to Heroku to authorize Doppler for your account:

679

Configuration

In the next screen, you select the Heroku Project Type and App you would like to integrate with, the Doppler config you'd like to sync from, and whether you'd like to perform a one-time import of config vars from Heroku (preferring either Doppler or Heroku secrets):

1614

Once you've selected the options you want, click Set Up Integration and you're all set!

1420

Reserved Secrets & Addons

Some Config vars are Heroku-managed and are not meant to be updated by users. Doppler will not overwrite secrets from installed Heroku Addons, as well as the following secrets when syncing to Heroku:

SecretDescription
HEROKU_APP_IDHeroku app's id
HEROKU_APP_NAMEHeroku app's name
HEROKU_RELEASE_CREATED_ATHeroku app's current release created date
HEROKU_RELEASE_VERSIONHeroku app's current release version
HEROKU_SLUG_COMMITHeroku app's current release commit
HEROKU_SLUG_DESCRIPTIONHeroku app's current release description

🚧

If you imported Config vars from Heroku when creating the integration and some Heroku-managed Config vars were copied over, keep in mind that these are NOT kept up-to-date. Secret syncing is a one-way operation from Doppler to Heroku. Changes to Config vars made by Heroku will not be synced back to Doppler.

👍

Amazing Work!

Now you are all set up on Heroku. Every time you update your secrets in Doppler, we will automatically update them in your Heroku App.