How do I connect to my PostgreSQL server?
- In the panel, open My servers and click your server.
- On the Overview tab, wait for the App row to say "PostgreSQL is ready". The page refreshes itself.
- 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, thenufw 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
pgdriver verifies the certificate when it seessslmode=requireand refuses the connection. With this driver, end the string withsslmode=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!