Author Topic: MongoDB Manager not working if authentication is turned on  (Read 247 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
MongoDB Manager not working if authentication is turned on
« on: September 07, 2024, 05:56:39 PM »
I just started using cwp and I'm using the pro version. I am coming from HestiaCP and was drawn to cwp due to it's NodeJS and MongoDB managers.

I installed a nodejs app and mongodb database and it's working fine but I have a security concern which I've tried to fix but can't.

My VPS is running Almalinux 8 and I could only get Mongodb version 4 to install via the admin panel. I found out that the mongodb is publicy accessible via mongodb://server_ip:monogdb_port without authentication, So the problem here now is when I enable the security authentication, the mongodb manager stops working on the admin panel and also the user panel but will work via command line and also will require authentication via compass.

I use my VPS for business and would like my clients to be able to create dbs from the user panel easily as this is my major reason for switching to cwp.

Is there anyone with same problem or steps on how to fix this?

PS: I have tried so many solutions without success. :-[

Offline
**
Re: MongoDB Manager not working if authentication is turned on
« Reply #1 on: September 07, 2024, 06:51:07 PM »
I don't use MongoDB personally but I assume you can configure MonoDB to be accessible over loopback only:

Code: [Select]
bindIp: 127.0.0.1

Offline
*
Re: MongoDB Manager not working if authentication is turned on
« Reply #2 on: September 07, 2024, 07:57:03 PM »
Don't I have to add the server ip to the
Code: [Select]
bindIp ?

Offline
**
Re: MongoDB Manager not working if authentication is turned on
« Reply #3 on: September 07, 2024, 08:16:47 PM »
127.0.0.1 only if you want to make your databases inaccessible from the internet. However it will make the databases accessible locally from the server using 127.0.0.1 as DB Host.

Offline
*
Re: MongoDB Manager not working if authentication is turned on
« Reply #4 on: September 08, 2024, 05:32:54 AM »
I've done that but I really need security authentication for the mongodb, otherwise anyone with access to the server can still see all the mongodb databases.