-
Notifications
You must be signed in to change notification settings - Fork 233
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
low cost and alternative DIY hosting instructions #147
Comments
Just did this via fly.io, it's very easy to move from Heroku to them since they have a Heroku migrator. I can see the config vars (called "Secrets" on fly) are hashed. Looking at their docs I'm assuming you can only alter these configurations with Flyctl (command line utility) and are unable to view current settings as plain text? |
Correct, you can neither view nor modify them—additionally, you can't deploy a fresh installation without the CLI, only the heroku migrator works around this. So probably best-in-class for helping keep people's installation working come November, but maybe not the right choice for a fresh-setup recommendation. |
Low cost Nightscout can be a great way to get started with reduced risk.
T1Pal has also proposed ways to ensure that people use Nightscout do not experience the cost, is run by community members, and has committed resources to the Nightscout community. NS10BE is also run by a community member out of Germany. Both of these are great options for the long term quality and sustainability of Nightscout across a broad basis. Both of these subscription services eliminate time spent by volunteers answering common questions about setting up "strings" and other technology issues. T1Pal is willing to work with a non-profit or DAO, or anyone in order to make sure that the Nightscout experience can be cost-free to people who need it, and ways to sponsor subscriptions for third party usage. There are significant challenges, including the human capital needed to manage a program like this full time. |
Hey @bewest! I don't think this is issue is the time nor place to spread awareness of T1Pal; this topic is about no-cost DIY solutions, not paid solutions nor Nightscout-as-a-service solutions in general.
This person's comment is representative of the sort of use-case the no-cost DIY solution documentation is meant for. If you want to provide documentation on another low-cost solution like Digital Ocean, alongside the existing extensive documentation about T1Pal, I'd say that should be a separate issue.
That's excellent news, I was not aware of this. Perhaps in a separate issue/PR we could document the best way to approach T1Pal about a cost-free personal plan, for those who need it and are not able to arrange a custom install? Anyways, I'd like to stay focused here on coming up with new documentation for a viable no-cost DIY solution. |
|
@bewest there are already (hidden) pages for more vendors. The latest Heroku move requires a lot of rework and it will be done ASAP. MVS, Docker, NAS and maybe fly.io should land inside. Of course the original Heroku based model will be moved accordingly to the best directions we can find to get users find the solution that matches their needs. We all know free solutions will be too complex for many. But let's see how things go. |
I've found this topic on hacker news, https://news.ycombinator.com/item?id=32599398 |
Hi - sorry for the dumb question in advance but are there instructions on how to move from Heroku (since it's no longer free) to a different source for Nightscout? We're running Nightscout in order for my daughter's teacher to be able to track her bg's while she's at school so want to continue to use Nightscout but don't want to have to pay any fees if at all possible. Thank you! |
@JasmineT1D the simplest way right now would be to try out this migrator service onto fly.io for hosting. |
I migrated to fly.io and it works well. Can recommend so far. |
We really need any claim of "it's free" to be more specific about what is free. It's too confusing for people thinking they can expect a year of free Nightscout, when we know that to be false for their use case. There are many people who want an app ready for mission critical workloads. Please consider listing exactly what is free, and the way it compares to a year of Nightscout from the heaviest Nightscout users (FreeAPSX, AAPS, Loop, openaps, IFTTT, tconnect, etc). If it's free for the first week, please say so. If securing the service for a mission critical use happens with a small payment, please say so. I've tried to model this in an example here: #149 |
@bewest please let us try to find solutions that are not involving getting any form of payment in exchange of running our DIY Nightscout sites. Your point is very clear but we don't have enough data yet to understand if heavy users will have to pay or not the services we are evaluating now. If you are definite there is no free Nightscout solution anymore this requires a formal announcement. Please bear in mind there are MANY users not looping and needing Nightscout to share data between devices, most of them in trouble to pay for their sensors. They deserve our efforts too. The only documented method yet is Hobby Heroku and we know it holds as much load as the Free tier. I will add warnings to avoid deluding people. |
The pull request adds railway and fly.io to the docs with the appropriate caveats. Please feel free to add how long they are known to work reliably without payment, and additional use cases. It is common and best practice to secure mission critical apps with payment, that is the focus of the pull request, and this is not a change. Any additional claims of "it is free" should filter through the rubric @sulkaharo and I have defined repeatedly in these threads. It will be easy for someone to add details to fly.io or railway examples added in the pull request. |
@bewest the Railway deploy button is nice but can you explain why you've put your referral code? I also understand securing the site is important but should we force new users into doing it? |
It's not mine at all, it’s from another pull request.
nightscout/cgm-remote-monitor#7319 (review)
Feel free to edit or remove it.
…On Wed, Aug 31, 2022 at 10:05 PM Patrick Sonnerat ***@***.***> wrote:
@bewest <https://github.com/bewest> the Railway deploy button is nice but
can you explain why you've put your referral code
<https://railway.app/changelog/2021-08-27#referrals>? I also understand
securing the site is important but should we force new users into doing it?
PS: since this is not my main job can you ask that famous "someone" for
help?
—
Reply to this email directly, view it on GitHub
<#147 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADAHQ5ZPM4DKB2CCL264CDV4A2QNANCNFSM57VRTIAQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I agree that we really need to find a way to continue hosting Nightscout for free.
The first 3 work fine and I suspect the limits should be enough. At Railway you can switch to the development plan, but the resources are probably below the $5 you get as a credit. I understand that the opportunity is now being taken to migrate customers to T1Pal or 10Be, but users should be shown fairly that there are free alternatives. Deploying the above providers is at least as easy as Heroku! I'd rather use a free hosting platform and donate to Nightscout Foundation than pay for hosting. |
Given Foundation was mentioned, maybe something to address in these docs is the role of the Foundation... which is an entirely different effort from developing and supporting Nightscout. There's crossover, but maybe it should be more obvious that donating to the Foundation is supporting the Foundation, not the development effort, and doesn't contribute toward anyone getting Nightscout for free in a sustainable manner. |
This is a copy of Nightscout-Website: I do think spending to Foundation would help to develop nightscout source code. I think it is the goal of the foundation, this tool can be used from almost every T1D and these people do not have the ability to run it on themselves on own hardware. So it would be good to suggest a really free provider for running nightscout. Of course this can not be guaranteed for future but even we can do our best to find alternatives if the future will be changed. First there was Azure, as they changed pricing there was Heroku, and now what comes next? |
I've added railway and fly.io examples for people to augment. @gigich can you help put together a pull request to add Northflank and Cyclic? It might not get done without a volunteer like you to sponsor the work. We've adjusted the wording on the documentation site to clarify expectations. The Nightscout Foundation and subject of sustaining Nightscout are different topics, see the links in the thread for more information. New wording: There's no simple answer to this. You basically have two options:
Based on years of experience with other platforms, it's not immediately obvious that 500 hours a month on these platforms is sufficient for consistent and reliable Nightscout for a year for 10,000+ loopers. Heroku offered 1,000 hours, and we still had a variety of issues documented elsewhere. Please help keep the documentation up to date with pull requests as new information comes in. |
Hi @bewest |
@gigich you mean this? https://nightscout.github.io/vendors/railway.app/migrate/ |
@psonnera |
@psonnera "The Developer plan should be sufficient for loopers and anyone depending on Nightscout as a mission critical app. Costs will vary depending on your use (We expect that the given free credit of $5 per month should be enough, so you do not have to pay anything)." |
@gigicgmtest let's wait until we can verify it. I'm seeing the hours being burned down matching the creation day... |
It would be nice to describe your scenario of this test, including the devices that you use and how many apps/followers do you have connected at your nightscout. |
@dircsem Good questions. FWIW, I wouldn't expect those apps to increase consumption too much. @gigicgmtest 500 hours is just under 21 days, and since half the months have 744 hours, it looks like at least $5 will be needed to secure more than 500 hours. The offer is $5 or 500 hours. This is an awkward wording, but it means that $5 is worth MORE than 500 hours, not a $5 credit. The thing that will impact most people is the storage capacity. MongoDB Atlas offers 500MB for free or 2GB for $9/month. Platform for a service options like Heroku and MongoDB Atlas tend to come at a premium. The most cost effective will be infrastructure as a service options like Digital Ocean or Google Cloud, Oracle, or AWS where people can bundle cheap storage and compute on a single infrastructure. These will be around $6-$10 for both combined storage and compute resources, although several of these may involve use of command line to get set up. FWIW, the dedicated Nightscout as a service options are extremely competitive at these prices. Developers who are creating new applications like automated dosing system often take the perspective that Nightscout will store all the information that their application knows about. This creates an additional layer for people to observe and audit the behavior of a new and potentially risky application. Developers of these types of applications typically send larger payloads which can substantially increase the storage requirements for those Nightscout instances. For example openaps, AndroidAPS, Loop, and their variants will send substantially more information to Nightscout in case it will be useful to evaluate their behavior. Eg, ~6 years can easily be more than 10GB. Certain usage patterns such as switching profiles will also cause additional data consumption by requiring more storage. |
My scenario is the following:
In the first 4 Days I have used $0.2. so my estimate will be a lot below $5. Even there were some deployments during this time. Probably those do not count to the costs @bewest There is not that much data coming in from other apps and it is easy to manage that anyway. The developers of loop are really looking for efficient data storage. There was a period in dev branch where the data consumtion on atlas db was very high, but this is fixed now. My DB is on 55% at the moment and is not much increasing. But yes we have to mange that as well. I think it would be harder when Altas will do such a decision as Heroku did. I will report further after some more days about the ressource usage, it is to early to be sure it is running like that. Deploying on Railway, Northflank and Migration to Fly (not updating, or deploying) was much easier than on Heroku. I have an excel sheet with all the variables and there you can just copy/paste all together. Also changing to dev branch or updating the deployment was really smooth. |
Strongly suggest use semantic versioning. https://semver.org/. |
We are not going to release the development branch of Nightscout on our platform. If the Nightscout team does not feel that the development branch is stable enough to be released as a stable version of Nightscout, I see no reason for us to push it out on our platform. Is the Nightscout team telling us that we only have two options, stable release or development branch? Is the Nightscout team telling us that our proposal is completely unacceptable? I mean can we please find a compromise? That was the spirit I came here with. |
@sulkaharo and I are likely to release |
I actually prefer what you are suggesting. @tzachi-dar unless 50% of the users report unexpected costs, I prefer to use the official Nightscout as our default release. I still have not a single feedback reporting unexpected invoices. |
Note the change in dev only changes how the websocket compresses data for the web view and is unlikely to significantly affect users who aren't looping. This doesn't for example change the REST API data usage at all. I'd not tell users to fork unless this is absolutely critical for them. Or.. historically people have had huge issues jumping back to mainline releases after diverging from the Nightscout master fork, so if you do this, it's likely to cause a lot of support load on the Facebook group. |
I reported that it worked for me, but I missed the latest commits. Sorry for the noise. I just checked and even after restarts I get issues with Android APS and Android APS Client. They refuse to connect even after restarting everything. Reverting back to my late december branch fixes it. I'm going to setup a separate Nightscout with the changes and test it with the debugger attached from the AndroidAPS side. (since the web frontend works just fine) I'm not sure when I'll get to it, but I'll report back with an issue in the specific repo when I can. |
@gigich did you manage to go ahead with Cyclic? |
Something of interest might be that fly.io now has a Web CLI in Preview so the setup on their platform may become easier: It isn't possible to just upload the fly.toml right now (you can git clone a repo, as well as use |
@Jackenmen this is VERY interesting indeed. Thanks! |
@Jackenmen and there's something even easier, if you sign in GitHub from that same link, it will propose you to deploy a repo of yours. You just need to put your toml and hey, done. Now the standard issue is how to maintain privacy with a toml in your repo... |
Personally, I would suggest using secrets for
As for the TOML file...
Thinking about it, one could theoretically use one of CLI tools that can read and write TOML (a bunch of them are listed here: toml-lang/toml#645) which maybe is easier than learning how to use a CLI editor? I'm not sure if it's easy enough to suggest as the alternative for the current solution. But yeah, if I'm being honest, them implementing the single file upload feature I proposed would have made this a lot easier than any of the suggestions I gave here. |
@Jackenmen I believe you got something great. I tried: |
Using |
unfortunately, it looks like railway is now also no more available for free... |
Hey, not sure if you have tried this already but I followed instructions from a video I seen on YouTube and have Nightscout set up and running in Azure for free for a good few months now. Working well, resource group in azure needs restarted every now and then but so far so good. Here is a link to the video if it helps anyone https://youtube.com/watch?v=EDADrteGBnY&feature=sharea |
@xannasavin yes https://nightscout.github.io/vendors/railway/new_user/ but there are other solutions (please search for those not already documented here https://nightscout.github.io/nightscout/new_user/#vendors-comparison-table) |
@psonnera Yep still working here for me. I was able to follow the YouTube video and have mine set up with no issues |
@Jackenmen here we go 6334232 |
@psonnera I guess that using |
@Jackenmen using the fly.toml file requires you to redeploy manually every time you change a variable... that's all but convenient... |
The same is true for setting secrets (if you want them to actually apply - this is done by flyctl secrets set as well, which is why you can specify multiple secrets at once). |
the same is true for almost every hoster due to the nature of enviromentals |
@ninelore please have a look at the current implementation and feel welcome to improve it, keeping in mind the public addressed can have no IT knowledge. https://nightscout.github.io/vendors/fly.io/new_user/ |
As long as the actual secrets are stored as such (API_SECRET and MONGODB_URI) its fine. |
btw some side notes on fly:
|
Thanks for sharing that page @psonnera - was not aware of it. I'm still a bit lost on the solution to choose. I made some changes (mainly to the display of the clock face page) which are important to me, so I'd like to keep the ability to update my nighstcout via my Github repo. The nightscout.pro looks good, but it seems not to allow for personal repos since it's fully managed. Will have another look on the Azure solution @WilliamWatterson86 mentioned. |
question about fly / the heroku migrator: |
@xannasavin just create a new Nightscout in Fly.io. Copy MONGODB_URI from your Railway site. |
I found an extremely low-cost and easy-to-deploy solution: Akash Cloud. It is a decentralized cloud computing service platform that uses Docker for deployment. I have already tried deploying Nightscout 15.0.2 and MongoDB on it, and a typical configuration costs only around $0.50 per month to run. |
Synopsis
Heroku is sunsetting its free plan (more here). Timeline:
Fortunately the DIY instructions guide people to set up their mongo in Atlas, so data loss will not be an issue, but anyone using the free plan who followed the guide will see their DIY installations will just stop working as early as 26-10-2022 and 28-11-2022 at the latest.
We should probably recommend a different hosting provider, provide new DIY free-hosting setup instructions, and ideally a migration guide as well from Heroku to the new recommended provider.
Discussion
There are several alternatives we could establish guidance for. There are many general replacements suggested in the twitter thread, but I'll be focusing on the free plans of 3 of the most popular ones with a UX I see as most suitable to less-technical Nightscout users' needs. More suggestions welcome in further discussion!
Fly.io
Free Plan
Plan Notes
Pros/Cons
Pros
Cons
Render
Free Plan
Pros/Cons
Pros
Cons
Unsure/Neutral
Railway
Free Plan
Pros/Cons
Pros
Cons
Unsure/Neutral/Notes
The text was updated successfully, but these errors were encountered: