# How do I connect to my MongoDB server?

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

1. In the panel, open **My servers** and click your server.
2. On the **Overview** tab, wait for the **App** row to say "MongoDB 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:

`mongodb://yonetici:PASSWORD@IP:27017/?authSource=admin`

The `yonetici` login has full rights (root role), so it is a good idea to create a separate user for your app. The version is MongoDB 8.0.

## Security

- Database port **27017** is open to the internet. To let only your own servers connect, limit it in the firewall: `ufw delete allow 27017/tcp`, then `ufw allow from YOUR_IP to any port 27017`.
- Connections come without TLS: the password is protected but the data is not encrypted. If you move sensitive data over the internet, use an SSH tunnel.
- This is a standalone mongod: transactions and change streams only work on replica sets. If you need them, turn on replication yourself in `/etc/mongod.conf`.

**No server yet?** [Order a server with MongoDB installed](https://www.seturack.com/en/mongodb-vps): you choose the size and pay for what you choose.
