Env variable for jwt token [Feb 07]

:raising_hand_man: Rotarius asked

Docker setup: What is NC_AUTH_JWT_SECRET?

:person_tipping_hand: o1lab replied

https://docs.nocodb.com/getting-started/installation#environment-variables

:person_tipping_hand: o1lab replied

It’s for jwt … like for authentication token generation… this will be used for token generation

:raising_hand_man: Rotarius replied

OK checked.

:raising_hand_man: Rotarius replied

Have connection problems:

╔═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗

β•‘ β•‘

β•‘ EXCEPTION OCCURED!! in PGClient @ createDatabaseIfNotExists β•‘

β•‘ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - β•‘

β•‘ MESSAGE: β•‘

β•‘ connect ECONNREFUSED 127.0.0.1:5432 β•‘

β•‘ β•‘

β•‘ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - β•‘

β•‘ CODE: β•‘

β•‘ ECONNREFUSED β•‘

β•‘ β•‘

β•‘ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - β•‘

β•‘ STACK: β•‘

β•‘ Error: connect ECONNREFUSED 127.0.0.1:5432 β•‘

β•‘ at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) β•‘

:raising_hand_man: Rotarius replied

Can connect from ps with psql with no problems

:raising_hand_man: Rotarius replied

docker run -d -p 6000:8080 -e NC_DB=β€œpg://127.0.0.1:5432?u=postgres&p=postgres&d=nocodb1” -e NC_AUTH_JWT_SECRET=β€œ569a1821-0a93-45e8-87ab-eb857f20a010” nocodb/nocodb:latest

:raising_hand_man: Rotarius replied

Where can i find database URLS’s?

:raising_hand_man: wkw replied

is your postgres running in docker or in your host machine?

:raising_hand_man: Rotarius replied

on host machine

:raising_hand_man: wkw replied

can u replace 127.0.0.1" by β€œhost.docker.internal” and try again

:raising_hand_man: Rotarius replied

but nothing appears on localhost:6000/dashboard

What can i do?

:raising_hand_man: wkw replied

any errors found in browser console?

:raising_hand_man: wkw replied

nothing appears - does it mean all blank or do u see a spinning loader?

:raising_hand_man: Rotarius replied

:raising_hand_man: wkw replied

any error logs found in docker desktop?

:raising_hand_man: Rotarius replied

only the mesage above…

:person_tipping_hand: o1lab replied

I see port 6000

:person_tipping_hand: o1lab replied

Is the env for port set? We default to 8080

:raising_hand_man: Rotarius replied

docker run -d -p 6000:8080 -e NC_DB=β€œpg://host.docker.internal:5432?u=postgres&p=postgres&d=nocodb1” -e NC_AUTH_JWT_SECRET=β€œ569a1821-0a93-45e8-87ab-eb857f20a010” nocodb/nocodb:latest