PrismaP
Prisma8mo ago
3 replies
Tobias Madsen

Prisma + Supabase self-hosted

Hi I've got an issue I can't seem to find a solution to.

I've setup a self-hosted Supabase on a Hetzner cloud server, and I can no longer use npx prisma ... commands, all of them returns the error below:
Error: P1001: Can't reach database server at {server_ip}:5432

I can however connect to the database via psql "{connection string}" but all npx prisma commands returns no connection, anyone experienced anything like this before?

I've checked that all ports are open on the remote server, no firewall is blocking them, and I've added both url and directUrl in schema.
datasource db {
  provider     = "postgresql"
  url          = env("DATABASE_URL")
  directUrl    = env("DIRECT_URL")
}
Was this page helpful?