After setting up my self hosted retool I have a message at the top that reads "Missing Encryption Key". How do I update this? I see how to generate it but I don't see how to update this.
Hi @hexx, go to docker.env
and check the value for ENCRYPTION_KEY
. We may just need to add it in there.
Interesting. I just checked and my docker.env file has an encryption key defined in it. Any suggestions?
Thank you for checking.
- Is this a new Retool instance?
- Have we successfully deployed other instances?
- What version are we trying to deploy?
Also, let's verify the deployed values the instance is reading by running:
-
$docker-compose exec api /bin/bash
to exec into the API container. -
$env
to list the values.
Please verify that the value for ENCRYPTION_KEY
in docker.env
matches the value that we see in the terminal.
Thx for the assist. will follow up in a few days.
Welp. After executing docker-compose down && docker-compose up -d I was prompted to log back in and it doesn't recognize my credentials. I am hoping I have not lost all my hard work. Any recommendations?
Did the values match, or did this happen with a new ENCRYPTION_KEY
?
Your data lives in your volumes, running docker-compose down & up shouldn't delete them.
Maybe it's an issue with wrong credentials. Try going through the 'forgot password' steps and check if you get the reset password link on your email.
Any recommendations on how to reset the self hosted password? The reset password link does not help. I only have the one email so not sure what the deal is.
"No changes have been made to your account yet.
However, we weren't able to generate a new password due to the following reason: No user with the email [ myemail ]"
Let's query the Retool Database to see if we have a user.
- Exec into the container by running
sudo docker exec -it retool-onpremise-postgres-1 /bin/bash
- Open the psql console by running:
psql "dbname=$POSTGRES_DB host=$POSTGRES_HOST user=$POSTGRES_USER password=$POSTGRES_PASSWORD port=$POSTGRES_PORT"
- Query your users table:
select email from users;
Yeah states there are no users. How could there be no users when I have been logged in developing all this time? Anyway. How can I add a user?
Hey @hexx! Do you still have access to the original encryption key that was associated with your instance? It's generally a bad idea to change this, as you are subsequently unable to read any existing data.
yes. encryption key never modified. I'm getting no where with this so what is the best way to just start it all from scratch?
Ah okay - I thought you may have followed the advice shared earlier in the thread and cycled the key. Regardless, it does sound like the encryption key specified in docker.env
no longer matches the one that was used to encrypt the contents of your platform database.
Assuming you are running a local postgres
database and are comfortable starting from scratch, you can run the command sudo docker compose down -v && sudo docker compose up -d
. The -v
flag appended onto the down
command will delete the local database volume.
Before you do that, though, I'd recommend backing up the database contents just in case! The command for that is:
docker-compose exec postgres \
pg_dump hammerhead_production --no-acl --no-owner --clean \
-U retool_internal_user > retool_db_dump.sql
Let me know if you have any questions!
I just removed all containers and images and reinstalled everything from scratch. Previously I installed the 3.75 stable version which ran just fine. This time I see there is a 3.114.1 stable so installed this now the containers are just restarting. I will have to troubleshoot that now. Thx for the assist. We can close this post. More troubleshooting I suppose now.
We release a new stable version every quarter - 3.114
is our Q4 release! I'll go ahead and close this particular thread, as the issue in your original post is no longer relevant.
I definitely recommend making a new topic for any issues that you're having with the new release. Feel free to tag me directly and I can help you out.