Heroku deployment with n8nio/n8n:ai-beta fails with PG SSL issue

Forked the repo, replaced the normal docker image with the ai beta image and tried deploying on heroku. Everything else, including the env vars, are unchanged. Get this error:

2023-11-30T10:17:49.116207+00:00 app[web.1]: 
2023-11-30T10:17:50.978629+00:00 app[web.1]: Initializing n8n process
2023-11-30T10:17:51.209885+00:00 app[web.1]: Error: There was an error initializing DB
2023-11-30T10:17:51.210157+00:00 app[web.1]: DatabaseError: no pg_hba.conf entry for host "", user REDACTED, database REDACTED, no encryption
2023-11-30T10:17:53.306402+00:00 heroku[web.1]: Process exited with status 1
2023-11-30T10:17:53.327263+00:00 heroku[web.1]: State changed from starting to crashed

Has anyone successfully deployed the ai beta image to heroku?


It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Marcelo_Emmerich,

Welcome to the community :cake:

Is there more to the error or is that it? It could be that you need to set DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED to false in your env options.

OMG that worked! Thanks a lot!

1 Like

This topic was automatically closed 7 hours after the last reply. New replies are no longer allowed.