Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Neon.tech Postgres DB with a Strapi Application

I'm trying to setup up a deployed Strapi V4 application with Neon.tech's Postgres database. I set up the DATABASE_URL correctly and checked that all the environment variables were being read appropriately. However, the app crashes with a 500 status code every time I try to load my admin dashboard.

Is there something I'm missing that makes them incompatible?

like image 374
Sebastian Scholl Avatar asked Feb 24 '26 01:02

Sebastian Scholl


2 Answers

I wrote a Strapi plugin for usage of neon.tech DB: https://github.com/trieb-work/strapi-neon-tech-db-branches

The Plugin will set the DB URL automatically and will also create new DB branches as soon as you git checkout into a new branch. This feature is very usefull for preview deployments in a later stage, because you can preview deploy from this new DB branch and do not need to seed with testing data to get a real deployment. More on this here: https://trieb.work/blog/article/neontech-serverless-postgres-db-strapi-auto-branching-plugin (German only sorry... but with deepl.com you should be able to get a decent translation)

like image 53
Til Avatar answered Feb 26 '26 13:02

Til


I don’t know about the strapi, but for the sequelize the link that neon provides also didn’t work for me

try to modify it with sslmode param

postgres://<DB_USERNAME>:<DB_PASS>@<DB_ENDPOINT>.<DB_HOST>/<DB_NAME>?sslmode=require`
like image 29
Bohdan Dratovannyi Avatar answered Feb 26 '26 15:02

Bohdan Dratovannyi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!