Simplifying Nightscout setup routine
These scripts are used to make private Nightscout setup as smooth as you could only imagine.
It uses docker compose with nightscout itself, traefik for ssl termination and mongodb for your data. The docker-compose.yml
is based on original Nightscout's one but modified a bit to make use of parameters entered during install scipt's execution.
- First of all you need your VPS - virtal machine.
- You need a domain name registered and attached to your VPS's public IP.
- Also you need a ssh access to your VPS.
Once all the mentioned preparations done you do:
- ssh to your VPS
- write
bash <(wget -qO- https://raw.githubusercontent.com/justmara/ns-setup/main/ns-setup.sh)
in console, press enter and follow installation instructions. - enjoy your private nightscout installation
This section is optional, for advanced users that want to transfer their data from old Nightscout installation. There are at least two methods to do that:
- Use pre-made ssh script, like this one
- Use direct mongodump/mongorestore routine
Since we've set up running MongoDB docker image we can use it to pull all the data from remote mongo instance
docker exec -it mongo /usr/bin/mongodump --uri="<here goes your MongoDb Atlas connection string>"
this will dump whole db to the folderdump/<dbname>
in your mongo containerdocker exec -it mongo /usr/bin/mongorestore --db ns dump/<dbname>
this will restore all the data fromdump/<dbname>
folder to thens
database