How to set up Nightscout - Dexcom
What is Nightscout?
Nightscout is an open source DIY project that, when completed, allows you to view your Medtronic, Dexcom, or Freestyle Libre data from any web browser. Nightscout sends your blood sugar data into the cloud, so you can view it remotely and use it in many interesting ways.
Nightscout was developed by a tech-savvy group of parents of children with type 1 diabetes (T1D) as a solution for remote monitoring. Parents can use Nightscout to monitor their child’s blood sugars in real-time which can reduce stress throughout the day.
What do you need?
What you need depends on which device you are using to connect to Nightscout. This graphic, courtesy of Nightscout, shows a high-level overview of how to get your CGM data into the cloud depending on which device you use. In this article we will cover how to set up your Dexcom CGM with Nightscout.
For Dexcom, you can use either iOS or Android.
Setting up Nightscout can be a little tricky, but we’re here to help. We’ll first walk you through the general setup requirements, and then go into detail about specific devices. It’s best to go through this process on a desktop rather than mobile device.
1. Create a Github account
Type in your email and password to create your account
Select the free plan
Verify your email by clicking on the link in the email you will have received from Github
Navigate to the Nightscout repository in Github
Make a copy of the repository so that you can use it yourself. To do this, click on the “Fork” button on the top right hand corner of the page.
Once you have your own forked copy of the repository, bookmark the page so you can go back to it.
2. Create a Heroku account
Heroku is the easiest way to host your Nightscout website for free. Using this platform means you will be able to see your real time CGM data in the cloud.
Create your free account by entering your information and clicking on “Create free account”
**Make sure you select Hobbysist in the role field, and Node.js as the development language**
Verify your email by clicking on the link in the email you will have received from Heroku
3. Connecting Github to Heroku
Go back to your forked version of the Nightscout repository in Github that you bookmarked
Scroll down to “README.me” and click on “Deploy to Heroku”
Fill in the information on the Heroku page:
App name: Choose your app name! It will appear in your Heroku URL like “your-app-name.herokuapp.com”
Region: Leave this on United States even if you are located in another country. This setting will not affect your Nightscout.
Config Vars: These will all be auto filled values that you can leave as is. You can always change them later if you want, so don’t worry too much during setup. However there are a few you should look at before launching your site.
API_SECRET: Enter your password for your site. This needs to be 12 characters long. Be sure to write it down somewhere safe so you never get locked out of your Nightscout account!
Set your high and low thresholds in the BG_HIGH and BG_LOW sections. These are your urgent high/low values where you will be notified.
Enter your Dexcom account name and password in BRIDGE_PASSWORD and BRIDGE_USER_NAME. This is the same login information you use for the Dexcom app.
If you are outside the US, set BRIDGE_SERVER to “EU”
Enter “careport basal bridge” into the ENABLE field. This is the plugin that lets you manually add events to your graph, like insulin doses, carbs and more.
Click on “Deploy App”
Enter your credit card information. You will not be charged, this is just to verify your account.
If you get an error message after saving your billing information, click on “Deploy App” again, and it should work this time.
This step can take up to 10 minutes.
4, Setting up your Nightscout Account
Click on “View” at the bottom of the Heroku page. This will take you to your Nightscout account.
Choose your timezone
At the bottom of the page, click on “Authenticate”. Enter your API password that you chose in step 3.
Remove the “/profile” part of the URL displayed on your browser
You will be redirected to your Nightscout homepage. It will be empty right now, but don’t worry. We will be connecting your CGM data in the following steps.
5. Connecting your Dexcom CGM to Nightscout (iOS)
Make sure you have Dexcom Share turned on in your Dexcom app
You will need to create an Uptime Robot account. This makes sure that your Nightscout account stays active 24/7 and will be continuously updated. Click on “Sign-up” in the top right corner of the page
Select the free plan
Enter your information and click on “Sign-up”
Verify your email by clicking on the link in the email you will have received from Uptime Robot
Click on “+ Add a New Monitor”
Select HTTPS for the Monitor Type
Choose any Friendly name
Enter your Nightscout URL
Click on “Create Monitor”
You’re all set!
If you have completed all these steps and you are still not seeing your Dexcom data on your Nightscout homepage, you can check out this support facebook group for some frequently asked questions and troubleshooting tips.
6. Connecting your Dexcom CGM to Nightscout (Android)
Newer versions of Android will allow you to connect to Nightscout directly using Dexcom Share (following step 5) - if you have an older model, you will need to download xDrip+
If you have a Dexcom G4 where Share is not enabled, you will also need to go through the process of downloading xDrip+
For detailed instructions on how to set up your Android device with Nightscout, click here.
For more in-depth information about features and other tips, visit the Nightscout Wiki.
For more support or for any troubleshooting, check out Nightscout’s Facebook page.
What you can do with Nightscout
Now that you have set up Nightscout, your data lives in the cloud and you can view it live!
Nightscout is also compatible with Diabits, a free diabetes management app that offers blood sugar predictions using machine learning. Diabits will tell you where your blood sugar is headed 60 minutes ahead of time so that you can take proactive steps to avoid highs and lows. Creating a Diabits account and connecting it to your Nightscout is fast and easy. You can download through the App Store or Google Play. For more information on how to connect your Diabits account with Nightscout, click here.
If you want someone else to be able to view your blood sugar data in real time, simply give them your Nightscout URL and you’re set!