How connect database on VPS from local in Strapi

I installed postgres on VPS Ubuntu (DigitalOcean) and currently, i want to connect to DB from local (source code on my PC).I can connect this through Navicat with use SSH tunnel but in strapi, i can’t find the config do that.

How can config:

settings: {
    client: "postgres",
    host: env("DATABASE_HOST", "ec2-52-5-247-46.compute-1.amazonaws.com"),
    port: env.int("DATABASE_PORT", 5432),
    database: env("DATABASE_NAME", "d8df1si8te1ok0"),
    username: env("DATABASE_USERNAME", "lpgfhzrpbxsqxu"),
    password: env(
      "DATABASE_PASSWORD",
      "218c3a6766bec402872db8e4067ab1aeb6b4bf31df2d129295d3abe5d6824ff8"
    )
2 Likes

I have the same problem. But we don’t have info to do this SSH tunnel. Because my hosting does not allow to access to MySQL standard port. Only allows SSH Tunnel.

Did You save your issue?