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")
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}
3 Replies
Prisma AI Help
Prisma AI Help6mo ago
You decided to hold for human wisdom. We'll chime in soon! Meanwhile, #ask-ai is there if you need a quick second opinion.
Tobias Madsen
Tobias MadsenOP6mo ago
What... If I run prisma migrate dev works fine, it's the npx prisma migrate dev that fails, even though they are the same version installed
Nurul
Nurul6mo ago
Hey! That's strange. So the issue occurs only if you prefix the command with npx..., right?

Did you find this page helpful?