-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question - Windows Server OS only? #8
Comments
Hey there! You should be able to follow all of these directions on Windows 10 and 11 Pro with the possible exception of anything IIS-related. I don't recall if the IIS packages are included in that SKU even if you pretend it's a dev box but everything else should work. |
Hi @jaylagorio In the step where you do the whole If I simply go to http://localhost, I get a generic Windows Internet Information Services screen showing, not nightscout. Any idea what I might have done wrong? When I run the 'node server.js' manually, it connected to mongo fine, and had a number of things it did before showing the whole 'emitted clear_alarm to all clients' part, so from what I can see that part is working, but I am a bit stuck as to why I cant load the nightscout profile etc. Any ideas? What I end up wanting to do is the whole Reverse lookup thing, and use DuckDNS to get a host name and point it back to this little server so I can use AAPS with this nightscout server. I really hope that is a possibility. |
I think I need more information to help you out. Assuming you assigned a host name to a new site for your reverse proxy, going to Android device -> IIS reverse proxy hosted on :443 -> Nightscout host on Looking at the environment variable sections what do you have configured for the One other tip is to configure As to the warnings you see during the NPM installation command, I've seen lots of those so it'd be good if you can rerun it and paste those here too. That said, if you see the clear_alarm message I'm not too worried about the installation at the moment. |
Hi again
443 is the PORT, just like your guide. Yes, going to http://localhost:443 on the same nightscout machine, goes to Nightscout, but as I mentioned, it doesnt get passed that 'loading' screen. It just sits there 24/7 on the 'Loading the client' screen, with the dots moving along. It never gets to the Profile. INSECURE_USE_HTTP is as you directed, I followed the guide 100%. I will try something like port 81. Thanks |
OK, I see the miscommunication. Setting As to getting a certificate for IIS, you can get them for free. Check out Let's Encrypt and use (Certify The Web)[https://certifytheweb.com/]` to automate replacement of the certificates before they expire. They're both free to use, though Certify The Web has a paid version - that's overkill and you don't need to pay for it. First things first, change your |
Thanks for that, ill give PORT 81 a try. Regarding what you said though, what do you mean by 'Nightscout running stand-along and directly internet facing' ? Yes I already have Certify the Web installed, and ran that and did a DNS certificate, but unsure yet if that works, but ill find out soon with this port 81 hopefully. But still my question stands about Nightscout itself, being stuck on the Loading the Client part, and not progressing to the profile. Thanks |
So PORT 81 loads locally with localhost:81, but again stuck on this Loading the Client screen. In IIS, I followed your instructions in your guide. So then going back to IIS, I can see the certificate listed under Server Certificates. Maybe I have the URL Rewrite stuff incorrect, I followed what the guide said but unsure if that was talking generals or if that is what I specifically needed to input. This is all new to me if you cant tell :) Thanks |
In my router, I am port forwarding ports 80 to 80, and 443 to 443, to the IP of my nightscout server/pc. should it be 80 to 81, and 443 to 81, or should it be 80 to 80 and 443 to 443, of the LAN IP of the Nightscout PC? Bit confused as to what is actually going on with all these moving parts, and I cant find any log as to what is actually going on or failing. |
Yes, there are a lot of moving parts but it looks like the problem originates early - going to http://localhost:81 needs to work first before we can figure out the problems with linking all the other ports and services together. Maybe your installation isn't quite where it needs to be so let's take a look a that first.
Scroll back and copy/paste everything in your command line window here, make sure to use a Code block so it's easy to read. |
Here you go
|
At this point I'd delete your Nightscout installation and start it over. Once you're ready to start the installation process type |
OK Here you go, I deleted the c:\Nightscout folder, and pulled it again from Git and ran the npm install part. This is the Node.js command prompt log:
And here is the Command Prompt for the starting of the server:
|
The page now shows the Nightscout Profile, so that is good - wonder what happened in the first install as I did exactly the same thing... hmm |
That's great news! Next step, let's get IIS talking to Nightscout. Follow the steps in the guide and then try to access Nightscout on the same system using http://localhost/. This will show that you can go from IIS on port 80 to Nightscout on port 81, and once we have that working you can install your certificates and updater software which will enable you to go from IIS on port 443 to Nightscout on port 81. |
So yes the http://localhost works on the local machine and brings up Nightscout in the browser. The IIS section in your guide is a little confusing to me, as you use the server name 'nightscout' here and I am unsure what that should be for me... If I was to put in an IP here, is that the LAN IP of my server, or is that the external IP of my router (internet side) or is that something else? Or should i use 'nightscout' here like you did, even though the server is not called nightscout? That step is rather confusing. Is 'nightscout' the system name, or what is this exactly? |
Admittedly, ARR is going to be the more confusing step of this whole process but you're in a better place to start now. What it really comes down to is this question: are you running any other web services that you want to serve over port 443? If not we might be able to significantly simplify it for your case. That said, you can safely delete your 80 -> 81 rule on your router and keep only the 443 rule. |
No, nothing else at this stage, this is the primary focus so we can ignore anything else that may come later - that is a task for another day. |
By removing the 80->81 rule in the router, now when I go to http://MYSITE.duckdns.org it goes to the login page of my router... which is not ideal to expose to the outside world... |
If that's what's happening after you remove the 80 -> 81 rule that's likely been that way for a while and you need to go into your router settings and disable remote administration. As to not self-hosting anything else, great. The guide is setup like IIS is running on a machine on your network forwarding to a different system running Nightscout so that's more complicated than your setup. I'm also going to assume you have AAPS connecting to Nightscout through cellular only, if you want to connect while the phone is on Wi-Fi in your house let's also cross that bridge a little later. First off, in your bindings (Step 2 under Create Proxy Site) one host name should be the host name of the computer as it is inside your network. Make sure to include the internal domain name you're using. As an example, we'll call it Using that information as a template with the graphic you copied above, that first text box needs to be Try that and configure compression and see how that looks. It's hard to visualize how this is working on Windows client because I'm not sure all of the options are in the right place, it might be time to move this to email and/or I can configure it for you in private. |
OK thanks for that
I have done this now with localhost:81, and the configure compression set has already been completely set up as per your guide, however it hasnt changed the https situation unfortunately. Would love to touch base with you offline. |
We can do that, but first do this because otherwise IIS isn't going to respond over port 443:
And once you're done with that, right-click the Nightscout Proxy site, click Edit Bindings, double-click the HTTPS bindings and make sure the SSL certificate that's selected in the drop down menu has |
Yep that has been done for a few days already. Hopefully I did it right. But yes it's got the certificate loaded and in the bindings already. |
Issue solved. Main issue was related to Port Filtering with the ISP. |
Hi
Thanks for providing this.
Is this however only possible on a Windows Server installation? Can it be done on something like Windows 10 PRO or Windows 11 PRO versions? or does it specifically have to be a Server install?
I wanted to use a spare PC as a nightscout server, but dont have a Server OS and didnt specifically want to have to buy it if it can be done on the PRO version of Windows 10 or 11 etc.
Thanks
The text was updated successfully, but these errors were encountered: