Heroku Deploy


To quickly get going, visit our Github repo and click "Deploy to Heroku"

You'll need at least 1GB of RAM for Retool to start successfully.

Setting environment variables

In the Settings page of your Heroku app, you'll want to have the following environment variables set:

  • NODE_ENV - set to production
  • HEROKU_HOSTED - set to true
  • JWT_SECRET - set to a long secure random string used to sign JSON Web Tokens
  • ENCRYPTION_KEY - a long secure random string used to encrypt database credentials
  • PGSSLMODE - set to require. This is a native PostgreSQL environment variable.

Updating a Heroku deployment

To update a Heroku deployment that was created with the button above, you may first set up a git repo to push to Heroku

$ heroku login
$ git clone https://github.com/tryretool/retool-onpremise
$ cd retool-onpremise
$ heroku git:remote -a YOUR_HEROKU_APP_NAME

To update Retool (this will automatically fetch the latest version of Retool)

$ git commit --allow-empty -m 'Redeploying'
$ git push heroku master

Manually setting up Retool on Heroku

You may alternatively use the following following steps to deploy to Heroku

  1. Install the Heroku CLI, and login. Documentation for this can be found here: https://devcenter.heroku.com/articles/getting-started-with-nodejs#set-up
  2. Clone this repo git clone https://github.com/tryretool/retool-onpremise
  3. Change the working directory to the newly cloned repository cd ./retool-onpremise
  4. Create a new Heroku app with the stack set to container with heroku create your-app-name --stack=container
  5. Add a free database: heroku addons:create heroku-postgresql:hobby-dev
  6. In the Settings page of your Heroku app, add the required environment variables.
  7. Push the code: git push heroku master

To lockdown the version of Retool used, just edit the first line under ./heroku/Dockerfile to:

FROM tryretool/backend:X.XX.X

Did this page help you?