Update Nightscout

Tip

You don’t need to follow these instructions if you use a hosted service.
Contact the vendor to learn more about possible updates.


See here which is the current released version before updating.


Step 1: Update your repository in GitHub

Select your current platform below:



- Click here to log in at GitHub: https://github.com/login.

  • Enter your username or email and your password. Click Sign in

    ../../_images/UpdateNS00.png

  • Select your own cgm-remote-monitor project (not nightscout/cgm-remote-monitor)

    ../../_images/UpdateNS01.png

  • Your repository will open.

    ../../_images/Dev00.png

  • In the branch drop down menu (normally showing master) select dev

    ../../_images/Dev01.png

  • ClickFetch upstream to update it, then Fetch and merge

    ../../_images/Dev03.png

  • After a moment, your repository should display This branch is up to date with nightscout:latest

    ../../_images/Dev04.png

  • If you ran into trouble, try to Redeploy


You don’t need to update your GitHub repository.


You don’t need to update your GitHub repository if you deployed from https://github.com/nightscout/cgm-remote-monitor.


Step 2: Deploy


  • Log in Heroku https://id.heroku.com/login

    ../../_images/UpdateNS15.png

  • Select your app (hidden in yellow)

    ../../_images/UpdateNS16.png

  • Click on Deploy

    ../../_images/UpdateNS17.png

  • Verify Heroku is connected to GitHub, if not, clickConnect to GitHub

    ../../_images/UpdateNS18.png

  • If Heroku is not connected to GitHub, scroll down and click Connect to GitHub, if a popup window opens and requires authorization, click Authorize Heroku

    ../../_images/UpdateNS19.png

  • Verify your app cgm-remote-monitor is connected to GitHub

    ../../_images/UpdateNS20.png

  • If it isn’t, In Connect to GitHub, type cgm-remote-monitor and click Search then click Connect

    ../../_images/UpdateNS21.png

  • If you have trouble connecting your app, click Disconnect and reconnect it as shown above

    ../../_images/UpdateNS22.png

  • Scroll down to the bottom of the page, select the master branch and click Deploy Branch

    ../../_images/UpdateNS23.png

  • Build will start and information will scroll in the log window. Do not leave the page, do not interfere and wait for completion. It might take more than 10 minutes.
    Interrupting the process will lead to a broken site and you’ll need to restart deployment.

    ../../_images/UpdateNS24.png

  • Wait until the deploy process completes and click View (if nothing happens click Manage App then upper right Open App)

    ../../_images/UpdateNS25.png

  • Your site will open and should be at the latest version.

  • Check your profile time zone is correct. You’re done!
    If you ran into trouble, try the Redeploy method

  • Log into Azure : https://portal.azure.com/

  • Select your App service, your Nightscout site name (you should see it in recent resources)

    ../../_images/Azure42.png

  • If you didn’t find it, it will show in App Services

    ../../_images/Azure43.png

  • In the left menu select Deployment Center and change Continuous Deployment to On.

    ../../_images/AzureU02.png

  • Click Save (or Discard if you don’t want to update). Your site will redeploy with the latest cgm-remote-monitor version.
    Expect a few minutes before it comes back online.

    ../../_images/Dev13.png


  • You can leave Continuous Deployment On if you want upgrades to happen automatically, or turn it back to Off (and save) to control upgrades manually yourself.

Follow these instructions to install flyctl on your computer. You also need to install git if you’re using a Windows computer.

Note for Windows: you might experience issues with Git Bash or PowerShell, try an elevated command prompt.

  • Log in Fly.io:

    flyctl auth login

  • Verify your Nightscout app name, use it to replace example-ns in the following lines.

    flyctl app list

  • Verify your app current region (three letters code) and make sure it’s in the free tier.

    flyctl app list

  • Navigate to the cgm-remote-monitor folder from which you deployed Nightscout on your computer. Verify it contains the fly.toml configuration file you used to deploy your site.

    • If you don’t see this file, recover it:

      flyctl config save --app example-ns

  • If you migrated from Heroku using the wizard, or if you can’t find this folder on your computer, follow the next steps to recover your Fly.io configuration:

    • Fork a copy of the Nightscout repository and change directory

      git clone https://github.com/nightscout/cgm-remote-monitor

      cd cgm-remote-monitor

    • Download a default fly.toml configuration file

      flyctl config save --app example-ns

  • Update your Nightscout repository

    git pull

  • Edit your fly.toml configuration and search this section:

[[services]]
  protocol = "tcp"
  internal_port = 8080
  processes = ["app"]
  • Change the internal port value to 1337, do not change anything else, do not remove the spaces before internal_port.

    internal_port = 1337

  • Save the fly.toml file.

  • Deploy Nightscout:

    flyctl launch

  • Wait until completion, you site should now be running the latest Nightscout version.

Updating existing machines in 'example-ns' with rolling strategy

-------
 ✔ Machine 1781944ae46438 [app] update succeeded
-------

Visit your newly deployed app at https://example-ns.fly.dev/
  • Downscale the app if you haven’t yet flyctl scale --app example-ns count 1


Once GitHub updated, your Nightscout should automatically deploy with the latest version.


- Log into Northflank: https://app.northflank.com/login

  • Select your Nightscout project

    ../../_images/Dev14.png

  • Select your Nightscout service

    ../../_images/Dev15.png

  • In Overview, Edit deployment

    ../../_images/Dev18.png

  • In the image path, check the image is nightscout/cgm-remote-monitor:latest (modify if necessary), then click Update & rollout restart

    ../../_images/Dev19.png

  • Your site will redeploy with the latest version.



a) Open Railway and click login. Login with GitHub.

../../_images/Railway00.png

../../_images/Railway01.png

b) Select your Nightscout project.

../../_images/RailwayM15.png

c) Select your Docker service.

../../_images/RailwayD05.png

d) Click on Settings, disconnect the source image.

../../_images/RailwayD09.png

e) Select Connect image and type nightscout/cgm-remote-monitor:latest then press enter.

../../_images/RailwayD10.png

../../_images/RailwayD04.png

f) Go to the Deployment tab and from the three dots menu of the top deployment select Redeploy.

../../_images/RailwayD11.png

  • Your site will redeploy with the latest version.


Continue here