Unable to self-host on Heroku

Hello! My team is trying to figure out how to self-host on using Heroku and even though we have followed the documentation we are unable to get it working and would love any guidance on the issue.

First we tried to single-deployment button that can be found on the tryretool/retool-onpremise git repository here.

We put in our license key and set USE_GCM_ENCRYPTION to true, then hit deploy. On the step "Configure Environment", we run into an issue for which I've added a screenshot:

After the single-button deployment didn't work, we started on the manual process, also following the directions closely to set the proper environment variables. After that we saw the following error message relating to a missing pg_hba.conf entry.

We then added the following config variables hoping it would solve the issue: POSTGRES_DB, POSTGRES_HOST, POSTGRES_PASSWORD, POSTGRES_PORT, POSTGRES_USER (the credentials of which we got from the postgres instance created by heroku). That still didn't work.

Then I updated the Dockerfile from FROM tryretool/backend:X.Y.Z to FROM tryretool/backend:2.117.7 in an effort to use the most recent self-hosted retool version.

The error message remained the same.

Are we missing a step or incorrectly setting an environment variable? or something else entirely? We would love some guidance here as to how we can get retool self-hosted on Heroku!

I'd be happy to provide any more details of our environment if need be.

Hello! Thank you for sharing all those details - you've had quite the journey.

Would these docs be helpful at all?

https://docs.retool.com/reference/environment-variables-reference#postgres_ssl_enabled

Dear Victoria,

Thanks for the documentation. I looked it over and I did create a self-signed certificate and uploaded it to our Heroku certs in the hopes the postgres connection/retool would recognize it without any extra configs and it looks like in that case my error message does change - though I'm still unable to get retool running.

here are a couple of logs from those attempts:



It looks like its about to spin it up but then continually fails and restarts in an endless cycle. I do see a warning in these logs about how POSTGRES_SSL_REJECT_UNAUTHORIZED is set to false and eventually that will be set to true, then it references some of the environment variables from the link you sent me.

Just to test it out, I did push those certs to the heroku project and tried to add those filepaths/filenames, however since there is no way for me to know where on the Heroku local server those files are held I'm not able to get the path variables working - I see file not found errors in that case.

Would appreciate any guidance you might have on how specifically to use those environment variables, since I'm not able to find any examples that work for me.

Hi,

I am facing the same issue here as well.
I spun up the instance on heroku a few weeks back, and could not completely dive into it, but today when I got the time to go back, it is unable to connect to the database.

It looks like the on-premise deploy on heroku is now deprecated.

Can we please have a way where we can get the deployment to work on heroku, so that we can use it for our internal apps?

Hey everyone!

We made the decision not to support Heroku as the way Heroku scales their containers makes it challenging for some of our customers to scale their Retool instances.

What Retool version are you currently running/trying to run? And would you mind sharing your current memory allocation? I believe we suggest 8GB of memory and 16GB of storage!

Also, looking at the screenshots, perhaps the issue is related to environment variables. For your environment variables, do you have PGSSLMODE=require set? In addition, you'll also want to set POSTGRES_SSL_ENABLED=true (this will have Retool try to force an SSL connection).

So in summary:

PGSSLMODE=require POSTGRES_SSL_ENABLED=true POSTGRES_SSL_REJECT_UNAUTHORIZED=false