Self-hosted Retool cannot login

Hi Retool Community,

I recently switch the retool self-hosted from localhost to a static IP. When I tried to login with the static IP one, it shows:

User is part of multiple organizations

What should I do now? I want to login with the same user name (well I only have one work email tho) and reserve the data / app I created on localhost one.

Thank you in advance!

Hey @zelterNN - Which Retool version are you on? There was a bug that allowed incorrectly creating multiple organizations by going through the sign up flow more than once, but it was patched at some point.

In any case once you're in this state, you'll just need to manually delete the user with the duplicate email from the users table in the Postgres database your Retool instance is running on. This is likely going to be the user with organizationId that isn't 1.

Hi @jmann

I'm using the version 3.33.29

Can you instruct me how to delete the duplicate email from the user table?

Assuming you're running the Postgres DB as a container, you'll need to exec into it and connect to the same DB/user set in your deployment with psql. Once connected to the database, you can query and delete from the users table as needed.

I exec in the container retool-onpremise-master-postgres-1

and execute \dt in psql and get:

did i miss anything?

What's the database set in your deployment configuration? Can check existing dbs on the host with \l and switch with \c DB_NAME (which is hammerhead_production if you're using our template's defaults).

I use mostly the default options during deployment, here's what I get with \l

seems no hammerhead_production db?

Can you send your full list of containers and configuration to get some context? At first glance that looks to be a Retool DB container (not the actual Postgres database the instance uses).

here's all containers currently running.....
the one marked red is the one I just entered into

I'd check the other Postgres container

Also, can you show the exec and connect command in a screenshot?

those two postgres containers have the same dbs

The -h flag specifies a server, both of which you're going to the retool-db host, so you're going there in both cases. You should just need to run psql without it to connect to the local container after exec'ing in.

like this?
but i cannot connect to the server then

I'd run docker exec -it YOUR_POSTGRES_CONTAINER /bin/bash and then psql -U YOUR_USER YOUR_DB, swapping in the all caps bits (user/db should be in docker.env).

same result.....

Can you attach your sanitized docker.env file?

What you sent is the RETOOLDB_* value which again is not the Postgres database your Retool instance uses. These should just be POSTGRES_* variables.

## For a complete list of all environment variables, see

## Set node environment to production

## Set the JWT secret for the API server

## Set and generate postgres credentials

## Set and generate retooldb postgres credentials

# Change '' to to set up SSL properly
DOMAINS= -> 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

## Set key to encrypt and decrypt database passwords, etc.
## This random string value should be stored privately, and should not be changed over the liftetime of the deployment

## Google SSO configuration

## License key

## Uncomment this line if HTTPS is not set up

ahha! once i login with retool_internal_user the hammerhead_production database shows up!

Thank you!

psql -U retool_internal_user -d hammerhead_production
1 Like