New Nightscout Users

”What is great is there will be multiple options for those interested in setting up the system! #wearenotwaiting” J.A.

Too complicated? Not what you’re looking for?

Consider a hosted Nightscout service! Check for easier solutions here.

Basic concepts

Even if knowing how it works is not mandatory, it is very useful to understand a few background concepts before starting DIY Nightscout.

  1. The code available open source in GitHub or packaged for you in Docker is the set of instruction that will be used to make your Nightscout. You don’t need to understand it or be a programmer to use it.

  2. Your Nightscout will usually be running a web application in the internet cloud, meaning that somewhere on the planet, a computer or another will spend some of its time to keep your Nightscout active. This is the engine of Nightscout: it will make sure to be ready to accept the data you will send to it (BG, treatments, …) or to answer to data requests when you ask them (BG, reports, …) and even send alarms when instructed to do so. You will not see the engine work but you will see its frontpage: the web URL of your Nightscout site, which will be available on any device connected to the internet.

  3. Since you will need to store a lot of data, Nightscout must have a database. This database will also be in the cloud, meaning data will be stored on one or more computers, somewhere. The Nightscout engine mentioned above will store and read data from this database whenever required.

../../_images/nselements.png

From this you understand there are three main pieces necessary to build your Nightscout:

  1. The Nightscout code also known as cgm-remote-monitor

  2. A cloud platform running the Nightscout web app

  3. A cloud database storing Nightscout data

Some platforms offer both engine and database like Azure, Railway, Northflank and all VPS servers. But you can use an external database if you want. Some others like Heroku or Fly.io don’t propose a database and require you to use an external one. Traditionally the database holding Nightscout data is hosted by another provider (mLab, now MongoDB Atlas) but it might not be the most reliable solution.


Building Nightscout DIY in a cloud platform

You can run your Nightscout site in several vendors platforms, using free or paid accounts. Try the wizard to see which options can match your needs.

Below is a list of most used platforms. There are probably others, don’t hesitate to open an issue in the documentation with the easiest deployment method if you want to see them named here.

Vendors comparison table


../../_images/Comparison.png

Free DIY

Vendor Cost/month Database Complexity Limitations
Platforms as a service
Azure Free Basic plan Issues Medium Basic B1 is too limited for FAPSX
Northflank Free Developer plan Yes Medium  
Render Free Instance No Medium  
Fly.io Free Hobby plan No Medium  
Databases
Atlas Free M0 tier 512MB Medium Very small for Loop/AAPS
9$ M2 tier Medium Not worth the cost compared to hosted solutions
Azure Free Basic plan Issues Medium Cosmos is not supported correctly
Railway 10$/GB Medium  
Northflank 0.3$/GB Medium  
Virtual private servers
Google Cloud Free e2-micro tier Yes Medium Access from Australia and China is not free
Oracle Free E2.1 micro tier Yes High  
VPS 1$ -> ? Yes High  
Hardware solutions
Raspberry Pi Hardware Yes High  
Synology Hardware Yes High  

Security and safekeeping


  • 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 of your accounts to others.

  • Do not use Nightscout or any related applications on rooted and/or otherwise compromised 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.