Tunneling with database URLs [Feb 22]

:raising_hand_man: Amin Debabeche asked

Hi out there,

I am searching for documentation on database URLs. Indeed I have set-up my Postgres on my own VM but I do not know how to include the tunneling with password in the URL.

:person_tipping_hand: o1lab replied

We use knexjs to connect to databases.

See if you can figure the connection params from knexjs. On working, we can make it work for nocodb too

:person_tipping_hand: o1lab replied

SQL Query Builder for Javascript | Knex.js

:raising_hand_man: Amin Debabeche replied

Do you have an example of JSON file you are using, I find it a bit confusing as the knexjs are usually .js file

:person_tipping_hand: o1lab replied

you can specify NC_DB_JSON_FILE in env variable instead of NC_DB

:person_tipping_hand: o1lab replied

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

:raising_hand_man: Amin Debabeche replied

If not using ssh tunneling, what tech would you be using to connect to a postgres server ?

:raising_hand_man: Amin Debabeche replied

Yeah that is the matter with the environnement variable, it’s written to use a JSON file but I see only javascript file out there when used with knexjs

:person_tipping_hand: o1lab replied

knexjs takes an object, so the JSON file contents will be translated into an object

:person_tipping_hand: o1lab replied

hope it makes sense

:raising_hand_man: Amin Debabeche replied

okok

:raising_hand_man: Amin Debabeche replied

because it does not seem the simpliest way

:person_tipping_hand: o1lab replied

sorry, i didnt get what you mean by tunneling

:person_tipping_hand: o1lab replied

like connecting via ssh keys ?

:raising_hand_man: Amin Debabeche replied

I do not think that ssh keys are accessible on my side, it seems like we prefer to have it disabled as a security reason.

:raising_hand_man: Amin Debabeche replied

because I am hosting my own postgres server but I have some difficulties accessing as not all service (such as NocoDB) offer the possibility to connect via ssh

:person_tipping_hand: o1lab replied

SSL metadata DB · nocodb/nocodb · Discussion #838 · GitHub

Autogenerated from discord


Join NocoDB’s community

DiscordTwitterRedditDocs