# When move to prodction env I get a server error

**URL:** <https://community.forestadmin.com/t/when-move-to-prodction-env-i-get-a-server-error/2413>\
**Category:** Help me!\
**Tags:** setup\
**Created:** [May 3, 2021, 4:19pm UTC](https://community.forestadmin.com/t/when-move-to-prodction-env-i-get-a-server-error/2413 "2021-05-03T16:19:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![uripeled2](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/uripeled2/32/2125_2.png) [@uripeled2](https://community.forestadmin.com/u/uripeled2)\
**Post date:** [May 3, 2021, 4:19pm UTC](https://community.forestadmin.com/t/when-move-to-prodction-env-i-get-a-server-error/2413/1 "2021-05-03T16:19:36Z")

</div>

## Failure Logs

[forest] ��� Unexpected error: self signed certificate  
{  
“name”: “SequelizeConnectionError”,  
“parent”: {  
“code”: “DEPTH\_ZERO\_SELF\_SIGNED\_CERT”  
},  
“original”: {  
“code”: “DEPTH\_ZERO\_SELF\_SIGNED\_CERT”  
},  
“stack”: “SequelizeConnectionError: self signed certificate\n at /app/node\_modules/sequelize/lib/dialects/postgres/connection-manager.js:182:24\n at Connection.connectingErrorHandler (/app/node\_modules/pg/lib/client.js:213:14)\n at Connection.emit (events.js:315:20)\n at TLSSocket.reportStreamError (/app/node\_modules/pg/lib/connection.js:57:10)\n at TLSSocket.emit (events.js:315:20)\n at emitErrorNT (internal/streams/destroy.js:106:8)\n at emitErrorCloseNT (internal/streams/destroy.js:74:3)\n at processTicksAndRejections (internal/process/task\_queues.js:80:21)”  
}

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/a/ac3830b1d7b921a44104362a8b2f4c6733ca5ce4.png)

## Context

I use PostgreSQL and deploy using Heroku, I attached a database from a different heroku project to “AdminBackEnd” project

---

<div class="post-metadata">

**Author:** ![morganperre](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/morganperre/32/1296_2.png) [@morganperre](https://community.forestadmin.com/u/morganperre)\
**Post date:** [May 4, 2021, 8:06am UTC](https://community.forestadmin.com/t/when-move-to-prodction-env-i-get-a-server-error/2413/2 "2021-05-04T08:06:08Z")

</div>

Hello @uripeled2 ! 👋 Welcome to our community 🎉 🎊

The logs say that the agent is refusing to connect to your database because of the error `DEPTH_ZERO_SELF_SIGNED_CERT` which indicates that your DB uses a self-signed certificate that cannot be validated. Probably caused by the Heroku config for this different postgres.

The following thread give a solution to accept invalid certificate.

> [@Unauthorized app / \[object Object\]](https://community.forestadmin.com/t/unauthorized-app-object-object/2158/7):
>
> the errors are the ones in the first post + this

Let me know if it help.

Thanks in advance  
Morgan.
