Skip to content

MongoDB External and Internal Connection URLs Missing Required Parameters #4105

@anirbandasjoy

Description

@anirbandasjoy

To Reproduce

  1. Deploy MongoDB using Dockploy
  2. Go to MongoDB service dashboard
  3. Copy the External Connection URL provided by Dockploy

Example:
mongodb://user:password@1.2.4.5:27017/database

  1. Try connecting to MongoDB using the External URL
  2. Connection fails
  3. Copy the Internal Connection URL

Example:
mongodb://user:password@mongodb:27017/database

  1. Try connecting using the Internal URL
  2. Connection also fails
  3. Add the following parameters to the connection string:
    ?authSource=admin&directConnection=true
  4. Connection works successfully

Current vs. Expected behavior

Current Behavior

The provided MongoDB connection URLs do not work:

External:
mongodb://user:password@1.2.4.5:27017/database

Internal:
mongodb://user:password@mongodb:27017/database

Connection fails without additional parameters.

Expected Behavior

The provided URLs should work without modification.

However, currently they only work when adding:

?authSource=admin&directConnection=true

Working Examples:

External:
mongodb://user:password@1.2.4.5:27017/database/?authSource=admin&directConnection=true

Internal:
mongodb://user:password@mongodb:27017/database/?authSource=admin&directConnection=true

Provide environment information

Operating System:
OS: Zorin OS 18 (Ubuntu 24.04 based)
Arch: x86_64

Dokploy version:
Version v0.28.8

VPS Provider:
Hostinger

What applications/services are you trying to deploy?
MongoDB Database

Are you deploying the applications where Dokploy is installed or on a remote server?
Same server (where Dokploy is installed)

Which area(s) are affected? (Select all that apply)

Databases

Are you deploying the applications where Dokploy is installed or on a remote server?

Same server where Dokploy is installed

Additional context

No response

Will you send a PR to fix it?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions