Comprehensive Docker Setup for Nightscout CGM Monitor on Raspberry Pi 4 or any Linux Computer/Server
I have gotten both the Dockerfile and the docker-compose.yml from liske/cgm-remote-monitor-docker, thank you!
My girlfriend is a type 1 diabetic and so I got into CGM Monitoring. I wanted to create a guide of how I host my own Nightscout server under my own domain. It is very easy for everybody that owns a Linux Server (for example a Raspberry Pi 4). I will first explain how to setup Nightscout and later also how to setup Nginx so you can host Nightscout securely. If you don't own a domain you can use a free one (google is your friend). If you have any questions feel free to just write an e-mail to florian@schickel.me and I can try my best to help you.
git clone https://github.com/pyrmon/nightscout-docker.git && cd nightscout-docker
# admin secret
- API_SECRET=xxxxxxxxxxxx
# the URL to this Nightscout instance
- BASE_URL=https://ns.xxxxx.com
...
# use SI units by default
- DISPLAY_UNITS=mg/dl
docker-compose up -d
cd nginx
docker-compose -f docker-compose-nginx.yml up -d
./backupNightscout.sh
chmod +x backupNightscout.sh
crontab -e
00 2 * * 0-6 /bin/bash /path/to/backupNightscout.sh
docker exec -d nightscout_mongo mongorestore /path/to/unzipped/restore-files