Unable to connect to self hosted retool server from linux container using docker

Hi,

We have the license for self hosted retool and want to install it on our server.
Currently, we have a Proxmox LXC (Linux container), and are trying to install retool using docker.
We followed the steps as mentioned here , but are unable to connect to the retool server.
The docker-compose up, runs everything fine, but we cant access the server. Any help on what we are missing or how to fix this ?

Hi @Anjali_S - thanks for reaching out.

Are you able to share the contents of your docker-compose.yml file? Just to confirm that you can connect locally, I'd first run the command docker compose ps. This will list all running containers and, importantly, show if they are exposed on any network interfaces.

image

In the above screenshot, you can see that my api container is exposed on port 3000 and the https-portal container is exposed on ports 80 and 443. I can verify that the port-forwarding is working by running the command curl --url "http://0.0.0.0:3000, for example. I would expect this to hit the api container and return the html of the Retool splash page.

The next step is to configure SSL for your instance. It should be sufficient to use the certificates provided by https-portal, but there are instructions on that same page for using custom certificates.

Last but not least, you'll need to set up DNS for your org's domain via AWS Route 53 or something similar. In order to complete this step, you'll need to know the IP of your Linux container and potentially configure ingress. I'm not familiar with Proxmox but there is likely a solution in their cloud architecture for this.

Let me know where you are in this process and I'll do my best to help you out!

Hello Darren,

Thank you for your reply.
While running docker compose ps, I see that there's a container that's exiting.
Attached is the screenshot showing the same and the error log.

A bit of context here, we referred to this document and have created a SQL DB for external DB configuration.
In this case of external DB configuration,is there something else that we have to change, apart from setting these variables in the docker.env file ?

POSTGRES_DB=SQLDB
POSTGRES_USER=retool_user
POSTGRES_HOST=SQL Server IP
POSTGRES_PORT=1433
POSTGRES_PASSWORD=

Also am unable to upload docker-compose.yml file, any specific section that I can send you a screenshot of ?


1 Like

Ah great - thanks for sharing! This is super useful. The logs suggest that your instance is unable to connect to the external database that you've configured.

Did you use the template docker-compose.yml file here? The only thing you need to do is update those environment variables, which tells me that there's either an inherent issue with those values or your external database isn't configured to receive ingress traffic. Where are you hosting the database? Were you able to successfully complete the second step here?

Hello Darren,

We use this file and we didn't make any changes to it. Should we be using this one ?

We updated the environment variables in the docker.env file and not docker-compose.yml.

Should we be adding the environment variables in the .yml file? If so where exactly in that file? Would it still be these variables?

POSTGRES_DB=SQLDB
POSTGRES_USER=retool_user
POSTGRES_HOST=SQL Server IP
POSTGRES_PORT=1433
POSTGRES_PASSWORD=

Sorry for these questions, this is our first time setting it up.

Also, SQL DB is hosted on our On-prem server and no, we didn't attempt step2, since this is our first setup and we have nothing to export.

No worries! Deploying Retool has become a relatively complex task as the product grows and evolves. We encourage questions. :slightly_smiling_face:

The difference between the templates here and here is that the latter configures a local instance of Temporal alongside the Retool deployment. I assumed this is the one you were using because the screenshot you shared earlier shows a Temporal container running in your Docker environment.

Regardless - whether you've deployed with Temporal or not - you should only need to update the environment variables in the docker.env file in order to externalize your database. It looks like you've updated the correct values, as well.

Have you verified that you can connect to the SQL database manually? There might be a networking issue, if not. If I understand correctly, the database is being hosted in the same VPC as Retool - is that right? The ENOTFOUND error being thrown by your jobs-runner container indicates that it is unable to communicate via the provided host and port.