# 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](https://github.com/nightscout/cgm-remote-monitor/releases) before updating.
## Step 1: Update your repository in GitHub ```{tip} Skip this step if you're using Azure, Google Cloud xDrip+ scripted deployment or Fly.io from the orignal `cgm-remote-monitor` repository. ``` Follow [these instructions](/vendors/github/update/) and come back.
## Step 2: Deploy ````{tab-set} :::{tab-item} Select your platform ->
::: :::{tab-item} Heroku - Log in Heroku [https://id.heroku.com/login](https://id.heroku.com/login)



- Select your app (hidden in yellow)



- Click on `Deploy`



- Verify Heroku is connected to GitHub, if not, click`Connect to GitHub`



- 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`



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



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



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



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



- 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.



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



- Your site will open and should be at the latest version.
- Check your [profile time zone](/nightscout/profile_editor.md#profile-view) is correct. You're done!
If you ran into trouble, try the [Redeploy](/update/redeploy.md) method
::: :::{tab-item} Azure - Log into Azure : [https://portal.azure.com/](https://portal.azure.com/)
- Select your App service, your Nightscout site name (you should see it in recent resources)



- If you didn't find it, it will show in App Services



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



- 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.




- 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.
::: :::{tab-item} Fly.io Follow [these instructions](https://fly.io/docs/hands-on/install-flyctl/) to install `flyctl` on your computer. You also need to [install git](https://git-scm.com/downloads) 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](https://fly.io/docs/reference/regions/#fly-io-regions).

`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`
::: :::{tab-item} Railway Northflank Render
Once GitHub updated, your Nightscout should automatically deploy with the latest version.

::: :::{tab-item} Google Cloud
Continue [here](https://navid200.github.io/xDrip/docs/Nightscout/update_nightscout.html)

::: ````