MONGODB_URI
propackmarocpp-bit
FREEOP

a month ago

Screenshot_2026-07-25-01-29-28-800_com.android.chrome.jpg

Attachments

Solved$10 Bounty

Pinned Solution

brezzy1337
HOBBYTop 10% Contributor

a month ago

Hey so I was able to reproduce the connection issue: Looks like your still running mango on your localhost:8080. I'd recommend just using a MongoDB service. Here are the steps laid out for you:

  1. Add a MongoDB service to your project — New → Database → Add MongoDB — or use an external provider such as Atlas.

  2. On your vortex-leads-api service, open Variables and add:

    
    MONGODB_URI=${{MongoDB.MONGO_URL}}
    

    Replace MongoDB with your Mongo service's actual name.

  3. Redeploy vortex-leads-api. Your normal startup log should appear with no connection error.

This will be much more reliable then trying to passing a connection string, referencing your Mongo service with environment variables is also much more consistant. If you have to use a self-hosted Mongo container let me know and I'll pass you a update once I reproduce it.

Hope this helps,

Best Regards :)

6 Replies

Railway
BOT

a month ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 28 days ago


Status changed to Solved propackmarocpp-bit 28 days ago


propackmarocpp-bit
FREEOP

a month ago

Screenshot_2026-07-25-01-29-28-800_com.android.chrome.jpg

Attachments


Status changed to Awaiting Railway Response Railway 28 days ago


Status changed to Awaiting User Response Railway 28 days ago


propackmarocpp-bit

![Screenshot_2026-07-25-01-29-28-800_com.android.chrome.jpg](https://station-server.railway.com/attachments/att_01kybeg518exz8qcpck9zhb71f)

propackmarocpp-bit
FREEOP

a month ago

Problem connect MONGODB_URI

URL problem password 🔑 problem help me please 🥺


Status changed to Awaiting Railway Response Railway 28 days ago


a month ago

Looks like you're trying to connect to localhost instead of mongo private url, make sure you define variable for mongo url and use the private url of your mongo service, how is your current setup?


Status changed to Awaiting User Response Railway 28 days ago


mayori

Looks like you're trying to connect to localhost instead of mongo private url, make sure you define variable for mongo url and use the private url of your mongo service, how is your current setup?

propackmarocpp-bit
FREEOP

a month ago

deepseek_20260725_35e3db.png

Attachments


Status changed to Awaiting Railway Response Railway 26 days ago


Status changed to Open brody 26 days ago


brezzy1337
HOBBYTop 10% Contributor

a month ago

Hey so I was able to reproduce the connection issue: Looks like your still running mango on your localhost:8080. I'd recommend just using a MongoDB service. Here are the steps laid out for you:

  1. Add a MongoDB service to your project — New → Database → Add MongoDB — or use an external provider such as Atlas.

  2. On your vortex-leads-api service, open Variables and add:

    
    MONGODB_URI=${{MongoDB.MONGO_URL}}
    

    Replace MongoDB with your Mongo service's actual name.

  3. Redeploy vortex-leads-api. Your normal startup log should appear with no connection error.

This will be much more reliable then trying to passing a connection string, referencing your Mongo service with environment variables is also much more consistant. If you have to use a self-hosted Mongo container let me know and I'll pass you a update once I reproduce it.

Hope this helps,

Best Regards :)


brezzy1337

Hey so I was able to reproduce the connection issue: Looks like your still running mango on your localhost:8080. I'd recommend just using a MongoDB service. Here are the steps laid out for you: 1. Add a MongoDB service to your project — **New → Database → Add MongoDB** — or use an external provider such as Atlas. 2. On your `vortex-leads-api` service, open **Variables** and add: ``` MONGODB_URI=${{MongoDB.MONGO_URL}} ``` Replace `MongoDB` with your Mongo service's actual name. 3. Redeploy `vortex-leads-api`. Your normal startup log should appear with no connection error. This will be much more reliable then trying to passing a connection string, referencing your Mongo service with environment variables is also much more consistant. If you have to use a self-hosted Mongo container let me know and I'll pass you a update once I reproduce it. Hope this helps, Best Regards :)

propackmarocpp-bit
FREEOP

25 days ago

Thank you for help 🙏🙏🙏🙏


Status changed to Solved brody 21 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...