Problem while installing Self Hosted Retool (host not found upstream "api")

Hello,

Im installing Retool on a Ubuntu dist, with the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/tryretool/retool-onpremise/ssop/deploy-retool)" < <(echo "SSOP_e7a3c23c-4d31-4e9c-95ab-afcfdab9490b")

  1. I than activated the setup process by running ./docker_setup.
  2. Adding my FQDN to be "retool.mydomain.com".
  3. After this running "docker-compose up", which starts some process and outputs lots of logs.
  4. But I get stuck in HTTPS-PORTAL V1.30, with the following output:
https-portal_1      | ========================================
https-portal_1      | HTTPS-PORTAL v1.3.0
https-portal_1      | ========================================
https-portal_1      |
https-portal_1      | [cont-init.d] 00-welcome: exited 0.
https-portal_1      | [cont-init.d] 10-persist-env: executing...
https-portal_1      | [cont-init.d] 10-persist-env: exited 0.
https-portal_1      | [cont-init.d] 20-setup: executing...
https-portal_1      | 2023/01/24 14:58:27 [emerg] 146#146: host not found in upstream "api" in /etc/nginx/conf.d/retool.myficitionaldomain.com.ssl.conf:26
https-portal_1      | nginx: [emerg] host not found in upstream "api" in /etc/nginx/conf.d/retool.myficitionaldomain.com.ssl.conf:26
https-portal_1      | 2023/01/24 14:58:27 [emerg] 147#147: host not found in upstream "api" in /etc/nginx/conf.d/retool.myficitionaldomain.com.ssl.conf:26
https-portal_1      | nginx: [emerg] host not found in upstream "api" in /etc/nginx/conf.d/retool.myficitionaldomain.com.ssl.conf:26
https-portal_1      | 2023/01/24 14:58:27 [emerg] 149#149: host not found in upstream "api" in /etc/nginx/conf.d/retool.myficitionaldomain.com.ssl.conf:26
https-portal_1      | nginx: [emerg] host not found in upstream "api" in /etc/nginx/conf.d/retool.myficitionaldomain.com.ssl.conf:26
https-portal_1      | Signing skipped for retool.myficitionaldomain.com, it expires at 90 days from now.
https-portal_1      | 2023/01/24 14:58:27 [emerg] 151#151: host not found in upstream "api" in /etc/nginx/conf.d/retool.myficitionaldomain.com.ssl.conf:26
https-portal_1      | nginx: [emerg] host not found in upstream "api" in /etc/nginx/conf.d/retool.myficitionaldomain.com.ssl.conf:26
https-portal_1      | [cont-init.d] 20-setup: exited 0.
https-portal_1      | [cont-init.d] 30-set-docker-gen-status: executing...
https-portal_1      | [cont-init.d] 30-set-docker-gen-status: exited 0.
https-portal_1      | [cont-init.d] done.
https-portal_1      | [services.d] starting services
https-portal_1      | [services.d] done.
https-portal_1      | Starting crond ...
https-portal_1      | 2023/01/24 14:58:28 [emerg] 178#178: host not found in upstream "api" in /etc/nginx/conf.d/retool.myficitionaldomain.com.ssl.conf:26
https-portal_1      | nginx: [emerg] host not found in upstream "api" in /etc/nginx/conf.d/retool.myficitionaldomain.com.ssl.conf:26
https-portal_1      | [cont-finish.d] executing container finish scripts...
https-portal_1      | [cont-finish.d] done.
https-portal_1      | [s6-finish] syncing disks.
https-portal_1      | [s6-finish] sending all processes the TERM signal.
https-portal_1      | [s6-finish] sending all processes the KILL signal and exiting.
retool-onpremise_https-portal_1 exited with code 0

My docker.env looks like this:

## For a complete list of all environment variables, see docs.retool.com/docs/environment-variables

## Set node environment to production
NODE_ENV=production

## Set the JWT secret for the API server
JWT_SECRET=XXXXXXX


## Set and generate postgres credentials
POSTGRES_DB=hammerhead_production
POSTGRES_USER=retool_internal_user
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_PASSWORD=XXXXXXXX

# Change 'retool.kobra.se' to retool.yourcompany.com to set up SSL properly
DOMAINS=retool.myfictionaldomain.com -> http://api:3000

## Used to create links for your users, like new user invitations and forgotten password resets
## The backend tries to guess this, but it can be incorrect if there’s a proxy in front of the website
# BASE_DOMAIN=https://retool.yourwebsite.com

## Set key to encrypt and decrypt database passwords, etc.
ENCRYPTION_KEY=XXXXXX

## Google SSO configuration
# CLIENT_ID={YOUR GOOGLE CLIENT ID}

## License key
LICENSE_KEY=XXXXXXXX

## Uncomment this line if HTTPS is not set up
# COOKIE_INSECURE=true

My docker-compose.yml https-part looks like this:

  # Uncomment below to use nginx container to handle the frontend & SSL certification
  https-portal:
    image: tryretool/https-portal:latest
    ports:
      - '80:80'
      - '443:443'
    links:
      - api
    restart: always
    env_file: ./docker.env
    environment:
      STAGE: 'production' # <- Change 'local' to 'production' to use a LetsEncrypt signed SSL cert
    networks:
      - frontend-network

I also pointed my DNS retool.mydomain.com to my server and its reachable.

Why am I getting above error, what am I doing wrong?

Quick question! Are you deploying Retool locally or on your own Cloud infra, like Docker?

https://docs.retool.com/docs/running-retool-locally

https://docs.retool.com/docs/deploy#deployment-options

The error message you're running into usually shows up for users that are running Retool locally and didn't comment out (or even better, remove entirely if possible) the https-portal.