Skip to content

Nightscout Setup & Troubleshooting

Nightscout is your own self-hosted website. You (or someone in your community) set it up, and it stores your glucose data on a server you control. Sugar Sense does not host it for you. Instead, Sugar Sense connects to your Nightscout site and reads your glucose readings over its REST API, the same way other Nightscout viewers do. Because the data lives on your server, connecting works while your site is online and public over https, and fresh glucose only appears while your site is receiving new readings.

What you need to enter

Connecting Sugar Sense to Nightscout takes just two things:

  1. Your full Nightscout site URL. This is the complete web address of your site, ideally starting with https:// (for example https://my-cgm.up.railway.app or your own domain). It must be the public address you open in a browser, not a local or internal address. If you type http:// or leave the scheme off entirely, Sugar Sense upgrades it to https for you, so the exact prefix you paste does not matter.
  2. Your access credential. This is either your Nightscout API secret (the long passphrase you chose when you set up the site) or, far better, a read-only access token. We strongly recommend the read-only token (see below). Some Nightscout sites are configured to allow read access without any token at all, but entering a read-only token is still the recommended, revocable approach.

Why a read-only token is the safer choice

Your API secret is the master password for your Nightscout site. Anyone who has it can read and change everything. A read-only access token, by contrast, can only read your data and cannot change anything on your site. If you ever want to revoke Sugar Sense’s access, you simply delete that one token without changing your master secret or affecting any other app. For that reason we recommend creating a read-only token and entering it instead of the API secret.

How to create a read-only access token

You create the token inside your own Nightscout site:

  1. Open your Nightscout site in a web browser and log in with your API secret.
  2. Click the hamburger menu (the three lines) in the top right, then open Admin Tools.
  3. In the Subjects – People, Devices, etc. section, click Add new Subject.
  4. Give the subject a name you will recognise, such as sugarsense.
  5. In the Roles field, type readable. This grants read-only access with no ability to change your data.
  6. Click Save. Nightscout will generate an access token next to your new subject.
  7. Click the token to copy it (or use the link icon). Keep this token private and treat it like a password.

This token is what you paste into Sugar Sense in place of the API secret.

Connecting in Sugar Sense

  1. Open Sugar Sense and start adding or switching your glucose source.
  2. Choose Nightscout as your provider.
  3. Enter your full site URL in the Nightscout URL field.
  4. Paste your read-only access token (recommended) or your API secret into the field labeled Nightscout API Secret. That single field accepts either your API secret or a read-only token, so there is no separate token field to look for.
  5. Tap connect. Sugar Sense will verify the site and pull in your most recent readings.

Once connected, Sugar Sense polls your Nightscout site on a regular schedule and shows your latest glucose, trend, and history just like any other source.

Troubleshooting “No Data”

If Sugar Sense cannot connect or shows no readings, it is almost always one of these causes:

  • The site does not serve https or is not public. Sugar Sense always connects over https. A site that only serves plain http (no TLS), a local address, or an IP on your home network is not publicly reachable and will fail. The scheme you type does not matter (we upgrade it for you), but the site itself must actually be reachable over https.
  • The site is asleep. Some hosts put an idle site to sleep after a period of inactivity (Render-style hosts are a common example). Open the URL in a browser first to wake it, then try connecting again. If it sleeps often, consider a host that stays awake.
  • You added extra parts to the URL. You only need the base site address (for example https://my-cgm.up.railway.app). Extra /api/v1 paths and trailing slashes are ignored, so they will not break the connection, but do not paste your token onto the end of the URL.
  • The secret does not match. Nightscout secrets are at least 12 characters, so a partial paste or a typo will be rejected. Re-copy the full value and try again.
  • The token has no read access. If you created a token but did not give it the readable role, it cannot read your data. Recreate the subject with the readable role and use its token.
  • There is no recent glucose data. Sugar Sense can connect to a healthy site and still show nothing if there are no fresh readings. If your Nightscout site has not received a new sensor reading (an “sgv” entry) recently, there is nothing current for Sugar Sense to show. Confirm your uploader or sensor is sending data and that your site shows a current value in the browser.

Official Nightscout documentation

For deeper help with your site itself, the official Nightscout documentation is the best resource:

Still stuck?

If you have checked everything above and Sugar Sense still shows no data, we are happy to help. Email us at [email protected] with a description of what you are seeing and your site URL. Never include your API secret or access token in an email, to us or anyone else. We will never ask you for it, and you should keep it private at all times.

Safety reminder: Sugar Sense reads the data on your own Nightscout site and is meant to support, not replace, your own monitoring and your care team’s guidance. Readings can be delayed or unavailable if your site goes offline. Always confirm with a fingerstick and follow your healthcare provider’s advice before making any treatment decision.

Using a different glucose source? See the FreeStyle Libre setup and troubleshooting guide or the Dexcom Share setup and troubleshooting guide.

Download on the App StoreGet it on Google Play