Common issues to troubleshoot

This is contains troubleshooting for some issues while selfhosting Onboardbase

API returns invalid token or token expired while trying to register or log in.

This is because we rely on database time, and it should also match with the server timezone. So, we need to change the database timezone to our backend server timezone.

In the docker-compose file, we have an env variable for TZ. You'll need to validate if it's set already by connecting to the docker image for the database.

docker exec -it <container_name> psql -U <username> -c "SHOW timezone;"

This should give you the timezone for the database; if it doesn't match your server's timezone, you need to change it. Visit for reference Change postgresql timezone

If you need to check your backend image's timezone, cat /etc/timezone will give you the string you need to look for. If the issue still persists, please make sure to delete the volume of the database and restart the image.

How to escalate a user's privileges.

We need to connect to the database, the image is running on:

docker exec -it <container_name_or_id> bash

Then, connect to the database:

psql -U postgres -d onboardbase

Great job. Now, we have 2 tables to make change to.

We need to read some information from a table called teams_tiers. Here is how to do that:

SELECT * FROM public.payment_tiers;

You will have an output like this. We care about the id.

                  id                  |    tier    | price_per_user |
--------------------------------------+------------+----------------+-----------------+---------------
 4f58c387-849b-4506-b58e-50564644ecf9 | FREE       | 0              
 45640c27-19c0-4cea-b895-6a6698acc3d6 | STARTUP    | 5              
 e54b3fc3-001b-4204-98ec-e16abe9f2179 | BUSINESS   | 12             
 4d8c4e5c-fbfd-4d54-85ee-04761fa461d6 | ENTERPRISE | 0              
(4 rows)

Get the id for tier you want. Now we need to apply that to two fields for the user you want.

Look for the team:

SELECT * FROM public.teams;

Then update this field payment_tier for the user.

UPDATE public.teams
SET payment_tier = 'value you had above'
WHERE id = your_id_value;

Then get the id of the team_payment_tier to use it to update a field on row for team_payment_tiers table.

UPDATE public.team_payment_tiers
SET payment_tier = 'value you had above'
WHERE id = your_id_value;

Now you have escalated a user to a tier. Enjoy!


What’s Next