New Nightscout Users⌁
Nightscout is DIY, if you don’t feel confident you’ll have necessary skills, give it a try, you’ll find open heart people ready to help you building it in many Facebook groups. For free. Paying it forward.
If you want to sell installations, keep in mind you will be legally liable and can easily be sued by your buyers should anything bad happen to them because of Nightscout. Nightscout is not approved by FDA, CE, ... this is the reason why it's DIY.
Here is a step-by-step guide for completing your own Nightscout site DIY style.⌁
Create your Heroku, GitHub and Atlas accounts from a computer.
Do not change device/computer/browser during the creation process!
If you have unexpected issues whilst creating your site restart with another browser.
If this is not your first attempt to deploy Nightscout
You might want to do some cleanup before.
Step 1: Create a GitHub account⌁
If you already have a GitHub account and previously forked cgm-remote-monitor
Make sure you delete your current cgm-remote-monitor fork using Step 1 of this guide (ONLY STEP1!).
- Click this link to create a GitHub account: https://github.com/
- Enter a username (anything you want and that is accepted, not very important), email, and password.
- Then click
Sign up for GitHub
- Play and solve the puzzle then click
Join a free plan.
- Select whatever choices (not important) then click
- GitHub will send you a verification email, open your mailbox and check for it (look into spam also).
- On the received email, click
Verify email address.
- A new page will open in your browser, click
Skip this for now.
- Leave the page open as it is.
Step 2: Create a Heroku account⌁
Click this link to create an Heroku account: https://signup.heroku.com/login
Enter mandatory data (*) and click
CREATE FREE ACCOUNT
- Heroku will send a confirmation email, open your mailbox and look for it (also check spam folder).
- Click on the activation link
- Create a password an write it down. Click
SET PASSWORD AND LOG IN
CLICK HERE TO PROCEED
- Your Heroku page will open, click on your profile picture top right and select
- Click on
Add credit card
- Enter a valid credit card information and click
Unless you voluntarily select billable features, your credit card information is only used for verifications and you will not be charged anything. Worst case you’ll be charged $0.00
- You should now have 2 pages open: Heroku and GitHub. Leave them open.
Step 3: Create an Atlas account⌁
- Open another tab at: https://www.mongodb.com/cloud/atlas and click
- Enter information then click
Get Started Free
Create a cluster in Shared Clusters (FREE)
- Leave all default values and click
Atlas will create your default cluster, wait until completion… (can take more than 3 minutes)
- Click on
- Click on
Allow Access from Anywhere
If you don't allow access from anywhere (IP 0.0.0.0/0) Nightscout will not be able to access your database.
- Click on
Add IP Address
- Add a database username (for example
nightscout) and a database password (in the example below
Do not use your Atlas account credentials. Do not use special characters: only letters and numbers.
Write down these credentials in the boxes below: you’ll need them later.
- Then click
Create Database User.
- Click on
Choose a connection method
Connect your application
- Copy the connection string: click
Copyand paste it somewhere to edit it (like Notepad).
- Paste the string in the box below.
It should be similar to this (
xxxxx will be different):
- Click the
The connection string will appear here
Keep this string safely aside, it is called your
If you didn't manage to get the string with the automated script: (else proceed to Step 4)
Open this helper page in another tab and insert the original connection string and both your database password and the name you decided for your database name (not important), then click
Generate to get the final string (leave the page open).
- If you want to do it manually: replace
<password>with your database password as noted previously (in the example below
<dbname>by any text you want, say
mycgmicfor example. The result will be like this:
There are no < and > characters in the final string, neither for password nor for database name.
Step 4: Fork and deploy cgm-remote-monitor⌁
If you previously forked cgm-remote-monitor before reaching this step, you should delete the existing cgm-remote-monitor repository before proceeding
Delete your current cgm-remote-monitor fork using Step 1 of this guide (ONLY STEP1!).
You should now have three pages opened in your browser: Heroku, Atlas and Github, make sur each one is logged in (i.e. not asking you to login) before you continue.
Click this link https://github.com/nightscout/cgm-remote-monitor, a new GitHub page will open. Click on
- Wait a moment
- Scroll down and click
Deploy to Heroku
You're getting into the core setup of your site
Below you'll see the minimum required configuration, you can modify the variables later in Heroku. A more complete list here: Setup
Enter your CGM in the Cloud site name: invent a name you will use to see your BG in the cloud. Check the name is available.
Don’t change the region.
Scroll down and setup the following variables:
API_SECRETwill be your Nightscout site password, it needs to be at least 12 characters long and should NOT use spaces and @ or ! symbols: it is recommended to use only letters and numbers.
- If you want to link your Dexcom Share account as a data source, compile the following lines:
MOST COMMON ERRORS
BRIDGE_USER_NAME are NOT visible from within your Dexcom app or online account. The values for them are what you entered into your Dexcom mobile app when you VERY FIRST logged into that app however long ago. The
BRIDGE_USER_NAME is not an email address. The most common error on initial Nightscout setups is that people incorrectly use an old account or an old password. To test your username and password, go to Dexcom's Clarity page (check here for USA accounts and here for the others) and try logging into your Dexcom account. If your account info doesn't let you in, or you don't see data in your Clarity account...then you need to figure out your actual credentials before moving ahead.
Some people have had problems with their bridge connecting when their Dexcom passwords are entirely numeric. If you have connection issues in that case, try changing your password to something with a mix of numbers and letters.
You need to have at least one follower to use Dexcom Share. See here.
- If you want to link your CareLink account as a data source, compile the following lines:
- Select the units you’re using in
DISPLAY_UNITSacceptable choices are
ENABLEcopy and paste the following words (separated by a space) so that won't have to think about which you want now:
careportal basal dbsize rawbg iob maker bridge cob bwp cage iage sage boluscalc pushover treatmentnotify mmconnect loop pump profile food openaps bage alexa override
If you want to know more about them, look here: Setup
- Now you need that connection string you defined during the Atlas cluster creation (as the example below, but not the string below). Copy and paste it in the
This is the string generated in the helper page if you decided to use it.
- Browse down to the end of the list and click
- WAIT until completion (will take some time). Do not interfere with the process until it's complete.
- Then click
View(if nothing happens click
Manage Appthen upper right
- Your Nightscout site should open, click on the hamburger menu top right and select
- Setup your
Time zoneand eventually all other fields. Do not leave empty fields. If you don't know which value you should use, just leave default. You can change them later.
- Browse down to
Authentication statusand click
Authenticate. Enter your API secret. Click
- If the following pop-up shows up click
OK, and check status (upper right of the window).
- Dexcom Share and CareLink users should see data flowing in after some minutes, other uploaders like xDrip+, Spike, xDrip4iOS, etc will need to be setup with the Nightscout address and API secret in the app.
- Finally, you might want to modify the
PAPERTRAIL_API_TOKENline. Heroku offers a free, tiny amount of Papertrail service (like a logging service for how the site is running), but really generates more confusion to most people later when they get a message that their "Free Papertrail Service has run out of room". Papertrail is not needed, edit the line and add
DISABLEDat the end, so that you can recover the function should you need it.