How can we help?

Search our guides and tutorials, or browse the categories below.

How do I connect to my PostgreSQL server?

Apps 108 views Markdown
  1. In the panel, open My servers and click your server.
  2. On the Overview tab, wait for the App row to say "PostgreSQL is ready". The page refreshes itself.
  3. Copy the details from the Connection address, Login and Password rows.

Connecting

The connection string looks like this:

postgresql://yonetici:PASSWORD@IP:5432/uygulama?sslmode=require

Installation prepares a database called uygulama. The yonetici login has full rights, so it is a good idea to create a separate user for your app.

Security

  • Database port 5432 is open to the internet. To let only your own servers connect, limit it in the firewall: ufw delete allow 5432/tcp, then ufw allow from YOUR_IP to any port 5432.
  • Remote connections are accepted over TLS only. The certificate is self-signed, so use sslmode=require.
  • Node.js's pg driver verifies the certificate when it sees sslmode=require and refuses the connection. With this driver, end the string with sslmode=no-verify: the connection stays encrypted, but the server's identity is not verified.

No server yet? Order a server with PostgreSQL installed: you choose the size and pay for what you choose.

Was this helpful?

Thanks for your feedback!

Still Need Help?

If you can't find what you need, get in touch.