How to set up Nightscout with the Freestyle Libre
Updated: Sep 16
Setting up your Nightscout can be a little tricky. This tutorial walks you through setting up your account with a Freestyle Libre on Android and iOS
What is Nightscout?
Nightscout is an open source DIY project that allows you to view your Medtronic, Dexcom, or Freestyle Libre data from any web browser for free. 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 as a solution for remote monitoring. Parents can use Nightscout to monitor their child’s blood sugars in real-time, reducing stress throughout the day.
What do you need?
You will need your Freestyle Libre and iOS or Android device. This tutorial also works with MiaoMiao.
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 laptop or desktop computer rather than a mobile device.
1. Create a Github Account
First thing you’ll want to do is create a GitHub account. Select the free individual plan, and verify your email.
Next, you’ll want to navigate to this Nightscout GitHub repository. Click on the “Fork” button to make a copy of the repository so you can use it for yourself.
Once you have your own forked copy of the repository, you should notice that the page URL is now github.com/your_github_name/cgm-remote-monitor. Bookmark this page so you can easily 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.
Sign up for Heroku. Make sure to select Hobbyist in the role field and Node.js as the development language. Verify your account by clicking on the link they send to your email address.
3. Connecting your Github and Heroku accounts
Go back to your forked version of the Nightscout repository that you bookmarked. If you didn’t bookmark the page (tsk tsk!), you can also access your forked version of the repository by clicking on your profile and then navigating to “Your Repositories”.
Scroll down to README.md and click on the purple button “Deploy to Heroku”.
This will take you to Heroku, where you should be already signed in. Fill in the following required information:
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 are the configuration settings to your Nightscout and we’ll be changing and filling out some of them. Each setting has a description underneath it. You can always change these at a later time if need be.
API_SECRET: This is your password. It must be at least 12 characters long. Record this somewhere as you’ll need it later!
BG_HIGH & BG_LOW: These are your high and low thresholds. When your blood glucose is outside of this range, you’ll get an alert (only if ALARM_URGENT_HIGH and ALARM_URGENT_LOW are turned on).
DISPLAY_UNITS: Choose if you want blood glucose units in mmol/L or mg/dL.
BRIDGE_SERVER: If you’re anywhere outside of the US, set this to “EU”. Otherwise, leave it as “US”.
ENABLE: Enter “careport basal”.
Once you’re done with the above, click “Deploy App” at the bottom and enter your credit card information on the next screen. Don’t worry! This is a free service and you won’t be charged. This is just for account verification purposes. This can take up to 10 minutes.
If you get an error message after saving your billing information, click on “Deploy App” again and it should work.
4. Setting up your Nightscout account
At this stage, you should see a notice that your app was successfully deployed. Click on “View” at the bottom of your 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_SECRET (the password you created earlier). Then, click “Save”.
Once saved, remove “/profile” in the URL displayed at the top of your browser and press ‘enter’ on your keyboard.
You’ll be redirected to your Nighscout homepage. It will be empty right now, but don’t worry. We will be connecting your CGM data in the following steps.
5. Setting up your Freestyle Libre
MiaoMiao turns your flash glucose monitor into a continuous glucose monitor. Setting up your Nightscout with MiaoMiao is easy. MiaoMiao has a great tutorial you can follow.
Download Spike from the App Store.
Go to Settings > Share, and scroll down to Nightscout. Then, toggle "Enabled" to “On”. Enter your Nightscout URL and API_SECRET from earlier. As an example, my Nightscout URL is https://test-nightscout-rachael.herokuapp.com.
Congrats! Your Freestyle Libre data is now accessible in Nightscout. Check out Additional Resources at the end of this blog for some Nightscout tips, tricks, and other resources!
First, you must download the Glimp app from Google Play. Open the app and accept the permission requests.
In Glimp, tap on the three dots in the top right corner to open the menu. Tap Options.
Then, tap Remote Glucose Monitoring.
Enter your Nightscout URL and API_SECRET from earlier. As an example, my Nightscout URL is https://test-nightscout-rachael.herokuapp.com.
Congrats! Your Freestyle Libre data is now accessible in Nightscout.
What you can do with Nightscout
Nightscout is also compatible with Diabits, our free diabetes management app that offers blood sugar predictions using machine learning. Creating a Diabits account and connecting it to your Nightscout is fast and easy. For more information on how to connect your Diabits account with Nightscout, click here.