# How do I connect to my PostgreSQL server?

https://www.seturack.com/en/knowledgebase/article/how-do-i-connect-to-my-postgres-server

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](https://www.seturack.com/en/postgres-vps): you choose the size and pay for what you choose.
