Set Up Your Nightscout Website — Deploy to Azure

14 Oct
Guides > Setup Guides > Set Up Your Nightscout Website -- Deploy to Azure

It is now easier than ever to create a Nightscout website. A “Deploy to Azure” button (or “Deploy to Heroku”) allows a user to make many configuration choices while deploying the site for the first time.

You must have already forked the CGM-Remote-Monitor repository at Github and created your mLab database (and database user) to complete these steps. Be sure you have your mLab connection string information written down.

Deploy to Azure

  1. Go to your CGM-Remote-Monitor repository at Github. (If you have not yet set up your GitHub repository, do that and then return to this page.)
  2. Click the large “Deploy to Azure” button (if you plan to use Azure; single-click deploy to Heroku continues to be available).
    grilledcheese-deploytoazure
  3. Login at Azure (follow whatever prompts appear to get logged in). (If you do not yet have an Azure account, you should stop, create the Azure account first, separately, and then return to this sequence of steps. It is possible to set up your account at this point, but it may be less confusing if you create the account first.)
  4. The Deploy to Azure screen will load with all of the options you can configure (at the outset) for your site. (You can change any of these later, as needed.)

    grilledcheese-deploytoazure-panel-step1

  5. Make sure the Subscription shows Pay-As-You-Go. (If your account is new, it may instead show the free trial, and you will need to change this before the trial ends.)
  6. If a Resource Group is listed in the dropdown, select it. Otherwise, choose “Create New” and accept or replace the “new” resource group name in the Resource Group Name box.
  7. Choose your Site Name. A default name will already be shown in the box. You can replace this with the name you want. What you enter here will become the “name” of your Nightscout site (and will be the key part of your Nightscout url). The name of your site can not be changed. If you wish to use a different name later, you will need to create a new site.
    grilledcheese-deploytoazure-panel-sitename
  8. Select the Site Location from the dropdown menu. (This location does not need to correlate to your actual geographic location.)
  9. Make sure “Free” is selected from the Sku dropdown. (This is the “free tier” that will help ensure your Nightscout site is free.)
  10. Enter your mongo (mLab) URI in the Mongo Connection box.

    Your mLab URI will use the syntax shown in this example, but you must fill in your OWN information, not the sample values shown here:

    mongodb://databaseUserName:databaseUserPassword@ds012345.mlab.com:12345/databaseName

    For example:
    mongodb://sallyuser:sallypassword@ds012345.mlab.com:12345/mycgm

    Note: In March of 2016, mongolab changed to mLab. The syntax above is the new syntax using the mLab format.

  11. Select mg/dl or mmol from the Display Units dropdown.
  12. Enter your 12-character minimum API SECRET in the Api Secret box. You make this passphrase up, but it must be at least 12 characters.
  13. Many of the other variables on the deployment screen are optional. If you do not know what a variable means, you can consult the readme file or the Grilled Cheese features page for more information.
  14. The ENABLE variable is prepopulated on this one-step deployment with many commonly used features. Leave them. If you need to add something to the values string, leave a space after the last one in the string and type your new value (e.g., bridge for Dexcom G4 Share/G5 bridge site users or pushover for those using Pushover notifications).
  15. In the Show_plugins box, “careportal” is prepopulated. Plugins listed in this box are always visible on the site, rather than being visible only if toggled on within the individual browser’s settings panel. If you want iage, cage, sage, bwp, rawbg to be “always visible,” then list them in this box in a space-delimited list. (Other values can be entered here as well, including bwp, boluscalc, etc.)
  16. Click the “Next” button.
    grilledcheese-next
  17. The next screen confirms a “website” will be deployed. Click “Deploy.” (If you need to return to the previous screen, click “Setup.”)
    grilledcheese-deploy
  18. On the next screen, you will see the deployment happen. Be patient.
    grilledcheese-deployment
  19. When the deployment is complete (and successful), you will see a final line that has links that allow you to Manage your site or Browse to yoursiteURL. Your Nightscout url uses this format: http://YOURWEBSITENAME.azurewebsites.net.
    grilledcheese-success
  20. Click your site URL to open your site. If the deployment was successful and your mLab information was correctly entered, you should see a black Nightscout site. (If your site does not yet have data, it will be a black site with time and dashes or time and the word “undefined.”
    Note: With the 0.9.0 update, a “profile” is required for you to view your site. The very first time you visit the site, you will be prompted to create a profile. Enter your API SECRET to authenticate your site. Then, at the minimum, select the time zone and “save” the profile. (You can always edit it later.) Return to another browser window and load your site (or enter your url again in the same window and hit enter).
  21. Plugins you “enabled” will need to be toggled on/off in the settings in the browser. When viewing your site, click the three horizontal bars top right, and scroll down to see the plugins. You can check visibility on/off, and then save the settings. If you wish to have certain plugins always visible, you can set the SHOW_PLUGINS variable with the value being the plugins you want visible. For example: SHOW_PLUGINS=careportal iob cob sage iage cage.
    showplugins
  22. If you have not yet installed and configured your uploader app, do so now. (If you are using a cabled rig, this means setting up the Nightscout app. If you are using another uploader or configuring the bridge, return to the core directions for your specific setup and continue with the next step.) You will not see data on your Nightscout site until the uploader app (or bridge) is configured.
  23. Note for those using older uploaders, including Medtronic: A change in the 0.9.0 release may affect users of older uploader apps. If your site does not receive data, you may need to set the following variable in Azure (or Heroku): AUTH_DEFAULT_ROLES=readable devicestatus-upload

Confirm Your Site is Configured as a FREE Site

If your account is new and you did not choose Pay-As-You-Go during setup, you have 30 days in which to convert the site to Pay-As-You-Go. We recommend you double-check your site settings by reviewing the following:

  • Confirm the Subscription type is set to Pay-As-You-Go.
  • Confirm the Pricing Tier is set to Free.

azure-new-reviewfree

Directions to confirm your account is properly configured so that it is free (with typical usage) see: Azure Management.

Learn More About Your Nightscout Site

To learn about your website’s features click here. There are many customizable features, such as high and low alarms, high and low alerts (for warning of an approaching high/low), and other custom settings. You also can enable a range of plugins, including CarePortal, IOB (insulin on board), COB (carbs on board), CAGE (cannula age), and more.