# Access to CloudSQL Postgres database using unix socket

**URL:** <https://community.forestadmin.com/t/access-to-cloudsql-postgres-database-using-unix-socket/450>\
**Category:** Help me!\
**Created:** [June 10, 2020, 9:16pm UTC](https://community.forestadmin.com/t/access-to-cloudsql-postgres-database-using-unix-socket/450 "2020-06-10T21:16:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![narciero](https://avatars.discourse-cdn.com/v4/letter/n/a87d85/32.png) [@narciero](https://community.forestadmin.com/u/narciero)\
**Post date:** [June 10, 2020, 9:16pm UTC](https://community.forestadmin.com/t/access-to-cloudsql-postgres-database-using-unix-socket/450/1 "2020-06-10T21:16:02Z")

</div>

I am trying to connect ForestAdmin to a Postgres database running on a unix socket - this is how Google Cloud Run applications connect to Google CloudSQL databases which is ultimately my goal (deploy forestadmin backend in docker container on Google Cloud Run).

## Expected behavior

ForestAdmin should connect to my database using a valid DATABASE\_URL pg connection string.

## Actual behavior

Error trying to connect to database. FWIW, the connection string I am using works with Prisma 2 client.

## Failure Logs

 ![Screen Shot 2020-06-10 at 3.13.18 PM](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/1X/4a2314b970a5d307efa409dbdb088d24c1d290aa.png)

See above

## Context

Please provide any relevant information about your setup.

My connection string in my .env file is:

DATABASE\_URL=postgresql://postgres:@localhost/dbname?host=/Users/username/tmp/cloudsql

- Package Version:
- Express Version: 4.16.3
- Sequelize Version: 5.15.1
- Database Dialect: postgres
- Database Version: 11
- Project Name: regen

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [June 11, 2020, 7:19am UTC](https://community.forestadmin.com/t/access-to-cloudsql-postgres-database-using-unix-socket/450/2 "2020-06-11T07:19:50Z")

</div>

Hi @narciero, and Welcome to the Forest Admin community!

(I’m assuming here that you were able to fully onboard on your own localhost, and that’s the deployment process that fails, am I right?)

I’m not that familiar to the complete GCSQL/GCR environment, I’m pretty sure you can proxy the database to expose a classic database connection string, but you might not want to do this I guess ?

For now, we do not support unix socket connection string, at least from the onboarding screens. You might still be able to initialize `Sequelize` in the `models/index.js` folder using this socket though, using the `dialectOptions` parameters, like :

```javascript
var sequelizeConfig = {
    dialect: 'postgres',
    dialectOptions: {
        socketPath: '/path/to/the/socket',
    }
    port: 5432,
};

```

Let me now if that helps 🙂
