Hi! I’m new to hosting n8n and hosting in general.
I’m hosting a PostgreSQL database via Google Cloud and trying to run n8n in Google Cloud Run, with it connected to the database.
I can successfully host n8n without the database, and I can also connect to the database without issues. However, when I try to connect n8n to the database via Cloud Run, I encounter the following errors:
“message: Cannot read properties of undefined (reading ‘database’)”
“The user-provided container failed to start and listen on the port defined provided by the PORT=5678 environment variable.”
I’ve tried using both port 8080 and port 5678, but the issue persists.
I am using the following environment variables:
DB_TYPE
DB_POSTGRESDB_DATABASE
DB_POSTGRESDB_HOST
DB_POSTGRESDB_PORT
DB_POSTGRESDB_USER
DB_POSTGRESDB_PASSWORD
DB_POSTGRESDB_SCHEMA
N8N_PORT
I’m also using the necessary n8n authentication variables. Additionally, I’ve set up the Cloud SQL connector to proxy the connection.
Is there something specific that I might be missing in my configuration?