
Deploy Nightscout on Your Own Server
Nightscout is a free and open-source project, and associated social movement, that enables accessing and working with continuous glucose monitor data
Want to deploy Nightscout on your server faster? Try Senate with one-command setup, automatic HTTPS and monitoring.
What is Nightscout?
Nightscout acts as a web-based CGM (Continuous Glucose Monitor) to allow multiple caregivers to remotely view a patient's glucose data in real time.
Self-Host Nightscout
Follow these steps to deploy on your own server.
Install Docker
Skip this step if Docker is already installed on your server.
curl -fsSL https://get.docker.com | sh
Configure
Customize the settings below. Defaults work for most cases.
General
Deploy
Copy the configuration and run it on your server.
services:
nightscout-mongodb:
image: mongo:4
environment:
MONGO_INITDB_ROOT_PASSWORD: ""
MONGO_INITDB_ROOT_USERNAME: root
volumes:
- nightscout-db-data:/data/db
- nightscout-db-config:/data/configdb
nightscout-nightscout:
environment:
API_SECRET: ""
BASE_URL: https://replace.me.in.settings.of.website.com
DISPLAY_UNITS: mg/dl
INSECURE_USE_HTTP: "true"
MONGO_CONNECTION: mongodb://root:@nightscout-mongodb:27017/nightscout?authSource=admin
PORT: "1337"
depends_on:
- nightscout-mongodb
volumes:
nightscout-db-data: {}
nightscout-db-config: {}
Then run:
docker compose up -d
Access
Once started, access your app at http://localhost:1337
Why Self-Host Nightscout?
Full Data Ownership
Your data stays on your servers. No third-party access.
No Monthly Fees
Pay only for your server. No per-seat or usage charges.
Complete Control
Customize, backup, and scale on your own terms.
Privacy & Compliance
Meet GDPR, HIPAA, or internal security requirements.
Technical Details
Docker Image
mongo:${mongo_version}Want to go faster?
Try Senate! Senate handles Docker, HTTPS, updates, and monitoring for you. Deploy any of our 300+ apps with a single command.
Install on any Linux server:
sh -c "$(curl -sSL https://get.senate.sh)"