How do I connect to my MongoDB server?
- In the panel, open My servers and click your server.
- On the Overview tab, wait for the App row to say "MongoDB is ready". The page refreshes itself.
- 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, thenufw 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: you choose the size and pay for what you choose.
Was this helpful?
Thanks for your feedback!