New Nightscout Users⌁
Nightscout is DIY (Do It Yourself), if you don’t feel confident that you have the necessary skills, give it a try. You’ll find people that is willingly to help you setting it up 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.
Security and safekeeping⌁
It's highly important you understand you have to take computer security seriously when setting up Nightscout. We assume you have full legal ownership of all data being stored in your installation of Nightscout and that there are thus no liabilities you'd need to respond to regarding the data. Depending on how you use Nightscout, an unauthorized user could cause harm by for example changing the CGM data shown by Nightscout. We have no evidence of this having ever happened to anyone, but to keep it that way, take the following guidelines to heart:
- Use the same email address for all accounts to ensure you have access to the accounts going forward. Do not use a disposable email address.
- Do not use the same password for all your accounts, and choose passwords that are not easy to guess.
- Do not use the API_SECRET for the Atlas database password.
- Do not use your Dexcom or CareLink user name or password for Nightscout components.
- Do not share the API_SECRET or other passwords to your accounts to others.
- Do not use Nightscout or any related applications on rooted and/or otherwise compromized devices, and ensure you always have the latest operating system and virus protection updates installed.
If you want to read more about Nightscout security, including about additional configuration options to make your installation more secure, please check our security guide.
Print this document to record all information during installation. Store it together securely with your diabetes documentation.
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 setup process!
If you have unexpected issues when 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!).
You do not need several GitHub accounts for several Nightscout sites. You can connect one GitHub account to multiple Heroku apps and accounts.
- 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.
- Type your interests (not important) then click
- GitHub will send you a verification email, open your mail and check your inbox (check your spam-folder if not received after a couple of minutes).
Verify email addressin the verification email from GitHub.
- This will open a new page 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 mail and check your inbox (check your spam-folder if not received after a couple of minutes).
- Click on the activation link
- Create a password, it is important that you write it down for later usage. Click
SET PASSWORD AND LOG IN
CLICK HERE TO PROCEED
- Your Heroku page will open, click on your profile picture, in the top right corner, and select
- Click on
Add credit card
- Enter your 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 your information and 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 it is complete... (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
Database credentials: Do not use your Atlas account credentials. Do not use special characters: only letters and numbers.
Write down these credentials in the boxes below (yes, in this browser window you're reading now, unless you're reading a printed version). 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 (yes, in this browser window you're reading now, unless you're reading a printed version).
It should be similar to this (
xxxxx will be different):
- Click the
Generatebutton (just here below this line: in this browser window you're reading):
The connection string will appear here
Keep this string safely aside, it is called your
- 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 3 pages opened in your browser: Heroku, Atlas, and Github, Make sure you are logged-in on each one (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 for 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. You will find 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. Confirm that 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 you should NOT use spaces and @ or ! symbols: it is recommended to use only letters and digits.
The API_SECRET is the main password allowing full access to your Nightscout site. Make sure it's reasonably secure (mix uppercase and lowercase letters, plus digits) and do no not share it publicly. If you think you exposed it by mistake, it is recommended that you change it.
- If you want to link your Dexcom Share account as a data source, complete the following lines:
MOST COMMON ERRORS
BRIDGE_USER_NAME are NOT visible from within your Dexcom app or online account. These values are what you entered into your Dexcom mobile app when you logged into that app for the VERY FIRST time. 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 in to your Dexcom account. If your account info isn't valid, or you don't see any data in your Clarity account... 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, complete the following lines:
- Select the units you’re using in
DISPLAY_UNITSacceptable choices are
ENABLE, copy 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 speech cors
You find more information about the
ENABLE words on the: Setup page
- Now you need the connection string you defined during the Atlas cluster creation (as the example below, but not the string below). Copy and paste it in the
- Scroll down to the end of the list and click
- WAIT until completion (will take some time). Do not interrupt the process until it's complete.
- Then click
View(if nothing happens, click
Open App, in upper right corner)
- Your Nightscout site should open and direct you to a new profile creation.
- Setup your
Time zoneand eventually all other fields. Do not leave any fields empty. If you don't know which value to use, just use the default value. You can change these values later at any time.
- 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).
- If you need to modify your profile after this, authenticate with the lock icon (top right of the page): enter your API secret. Then click on the hamburger menu and select
Anyone with access to the URL of your Nightscout site, can view your BG and run reports of your data. It it strongly recommended that you enable security to your site once you're done with the setup.
- 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 (this is like a logging service for how the site is running), but this generates a lot of confusion to most people later on, 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 if you need it later.
Step 5: Uploader setup⌁
Continue to uploader setup.