Troubleshoot Fly.io
Warning
The web terminal feature was removed from Fly.io. You need a computer with flyctl.
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.
Restart your app
Follow these instructions to install flyctl
on your 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
flyctl app list
Restart your app (replace
example-ns
by the name of your Nightscout app in Fly.io)
flyctl machine restart --app example-ns
Recover fly.toml
Follow these instructions to install flyctl
on your 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
flyctl app list
Copy your Nightscout app (replace
example-ns
with your own) configuration filefly.toml
.
flyctl config save --app example-ns
Keep this file in a safe place as you’ll need it to redeploy or upgrade your Nightscout.
Cleanup
After several failed attempts to deploy or migrate, you might need to delete some apps.
Log into Fly.io https://fly.io/app/sign-in (GitHub recommended)

In normal running condition you will see only two apps on your dashboard:
The first one is your Nightscout site and the second one the builder (necessary).
If you used the migration wizard you will see another builder (three apps).

Clicking on your site you will see if it’s healthy and running. This is where you go to open your site.

Delete an app
Select an app from the dashboard. Then click Settings
.
Click Delete app
.

Confirm copying the app name below, then click Yes, delete it
.

You have deleted your app.
If you delete the builder (like in the picture above) you won’t be able to deploy anymore.
Delete your local repository
If you deployed with your own computer.
Warning
Make a backup of the fly.toml
file present in the cgm-remote-monitor
folder!
This is essential to make your site maintainable!
You can delete the cgm-remote-monitor
folder on your computer and fork it again.
Exit the folder before deleting it, in task manager end the flyctl.exe
task.
If you deployed from the web terminal.
You don’t have a local repository.
Downscale your app
Follow these instructions to install flyctl
on your computer.
Note for Windows: you might experience issues with Git Bash or PowerShell, try an elevated command prompt.
March 31st 2023, apps deploy in V2 and V1 apps are automatically migrated too.
This causes some issues as V2 automatically deploys in a more than one machine, your Nightscout site might not work correctly.
Type the following command in the terminal (replace example-ns
with your own app name):
Authenticate in Fly.io:
flyctl auth login
Verify your Nightscout app name
flyctl app list
Downscale your app:
flyctl scale --app
example-ns
count 1

Your app should now only be running on one machine. Check here.
Note: the builder app is normal, it is stopped: don’t worry about it.

Migrate from Heroku
Warning
Turboku has been removed from the CLI. This section is obsolete.
Log into Heroku.
Write down your Nightscout app name from the dashboard.
Get your API Key from your account settings. Do not share it publicly.
Look into this list and find a free region close to where you live. This is a 3 letters code, for example ams
.
Open a terminal or an elevated command prompt.
Note for Windows: you might experience issues with Git Bash or PowerShell, try an elevated command prompt.
Log in Fly.io:
flyctl auth login
Replace
example-ns
with your Nightscout app from Heroku,API-Key
with your Heroku API Key andxxx
with the region you selected.
flyctl turboku example-ns API-Key --region xxx
Your Heroku app will deploy in Fly.io. Wait until deployment completes.
You’ll see the name of your new Nightscout site with Fly.io.
Finished launching new machines
-------
✔ Machine 784e290f461048 [app] update finished: success
-------
Visit your newly deployed app at https://example-ns.fly.dev/
Downscale the app, confirm when requested.
flyctl scale --app example-ns count 1
Turn your Heroku site off (the switch
web node lib/server/server.js
) and check your new Fly.io Nightscout is running.Log into Fly.io, select your app and verify it’s using a share V4 IP, release the V6 IP.
Warning
Make a backup of your fly.toml! This is essential to make your site maintainable!
Fly deployment created a folder with your app name, you’ll find your
fly.toml
file inside. This file is all what you need to redeploy your project. You will need it to upgrade your Nightscout site or redeploy it.
Warning
Make a backup of your Heroku variables! Fly.io will store then as secrets and you won’t be able to read them!