Nightscout and dexcom

Does anyone have a link for instructions to setting up nightscout for use with dexcom g6. I had nightscout years ago when I used spike app and g5 but never really used it and now it gives me a cannot find URL and nightscout boot error (unable to connect to mongo) when I try to open it. I was hoping it may just need some settings adjusted but have no idea where to begin. :face_with_raised_eyebrow:

Is this what you’re seeing?

Here’s the main Nightscout web page. If you click on Troubleshoot, it’ll bring you to a page with the image shown above. It leads you to instructions about how to fix it. I know that there was a change in the last year about the Mongo database and I had to make some changes by a certain date or I would lose Nightscout access.

I use Nightscout but my knowledge is limited to brief periods following info from this website while troubleshooting some glitch. Once it’s fixed, I forget about it.

If you’d prefer to pay someone a monthly fee to run your Nightscout site, search for “Nightscout as a service” once you are at the site.


I recall when this was an issue, I got some phone calls about it. If your still struggling after Terry’s suggestions, reach out and I’ll ask people.

1 Like

Nightscout isn’t using mongo anymore. Everyone had to switch over to Atlas instead. Could that be the problem?

At least Xdrip doesn’t. I haven’t yet figured out why nightscout doesn’t get my data from Xdrip, when they’re the ones that built Xdrip.

1 Like

I tried to set up Dexcom and found out, after a LOT of work, that it wouldn’t go for G6 unless you had constant internet access. And since I’m frequently outside of cellular range, there was no point carrying further.
Maybe this has changed?

1 Like

Thank you. Yes I never made the changes to the Mongo by the date so not sure now. The URL is not recognised when I try to go to my nightscout site and the phone app gives that reboot error. I’ll look at that troubleshooting page. I’m not very tech savy though. :stuck_out_tongue_winking_eye:

Yep. I suspect it’s a mongo problem.

Thank you. I’ll try and see if I can resolve with the troubleshooting guide tomorrow . Fingers crossed.

Perhaps this might help ….

1 Like

Thank you :slight_smile:

1 Like

Still having trouble with this :frowning:
I switched to mongo atlas but still unable to connect to nightscout and getting “mongodb_uri seems invalid :authentication failed “ errors
This is link I used to update to atlas then I deployed in heroku. No luck !!!
I also checked the great hypotalks link @Jimi63 shared and the webpage @Terry4 had linked as well and I believed I had set it up ok but clearly I’ve missed something

Any ideas where to go next ???

Check this: node.js - Error Message: MongoError: bad auth Authentication failed through URI string - Stack Overflow

My friend had trouble after changing her password in one of her accounts. She, like you, had errors associated with authentication. After posting several times in the facebook group “CGM in the cloud,” someone reached out, asked her for the log files in Heroku, and was able to identify the problem. That was back in August, though.

I haven’t used NS in a couple years. I suggest you read about problems here (there seem to be a lot of probs). Some people recommend that non-tech savvy users just wait until they make some changes to fix the configuration more easily. CGM in the Cloud | Facebook


1.) What version Nightscout are you running?
2.) Are you using multifactor authentication yet? Does it text your phone when you log in?

It seems they setup multifactor authentication and that is throwing a lot of people off. “Multifactor authentication” means that a password is not good enough anymore to sign in. They want to be able to send a text message to your phone to verify that you are who you say you are. If you are not setup for this, that might be a clue that you need to update your version of Nightscout. Heroku Multiple Factor Authentication - Nightscout

I think they are requiring NS version 14.2. What version are you on? You may need to update NS. Updating your site - Nightscout

" Update your Nightscout to latest release!
Versions older than 13.0.x won’t probably run.
Versions 13.x are not optimized for the Atlas database."

How to update NS: How to update your Nightscout site to the latest version -


If you haven’t used it in years, I would uninstall EVERYTHING and just start with a brand new, fresh laundry installation. Create brand new accounts with new usernames and passwords. That old installation of Night Scout will be useless to you. If anything, it will just create problems. Everyone has been pushing security updates for all software since covid started so new software is totally different than old software. Old versions of software are bad and will ruin your life.

1 Like

Try this @Amelia3

I suspect your MONGODB_URI string doesn’t contain the new Atlas db PASSWORD and / or db Name. These are the same ones you created at 8:20 of the video above.

At 9:20 of the video, it explains how to copy the MONGODB_URI string and then go to your Heroku account and paste the NEW string into Mongo_URI (click edit, paste string in and change PASSWORD and DB Name (anything you want).


Thanks so much for your reply. I did change some of my passwords so maybe that has caused the issue. I had managed to update to the latest nightscout version but can’t even open it now.
I’m not using multi factor authentication so will try that as well. I’m only wanting nightscout again so I can access Sugarmate app for dexcom which is the only way to get it now outside the US by using nightscout as its data source.
I’ll have another attempt today to get it working.

Yeh. If none of my attempts work today might be good to start from scratch.

Thanks Jimi.
Yes I had done all that exactly as instructed…. With new password and name. We’ll I think I did lol.
Will have another attempt today. Very frustrating set up. As I mentioned in another reply I only want to access nightscout again to use dexcom with my Sugarmate app as outside the US it’s no longer available unless you have nightscout as it’s data source.

1 Like

Update :grinning:
I went and changed my Mongo database password and changed the connection string in heroku - which I had tried previously - and deployed again and it’s working now …. Happy days.
Thank you to everyone for your advice and links to troubleshooting…


Your amazing!!!
Well done!!!

1 Like