Skip to content
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

Open
christhekeele opened this issue Aug 26, 2022 · 86 comments
Open

low cost and alternative DIY hosting instructions #147

christhekeele opened this issue Aug 26, 2022 · 86 comments

Comments

@christhekeele
Copy link

christhekeele commented Aug 26, 2022

Synopsis

Heroku is sunsetting its free plan (more here). Timeline:

  • October 26, 2022: accounts that have been "inactive for over a year" will start to be deleted (unclear if that entails accounts that have not been deployed in the last year, which would be many nightscout users)
  • November 28, 2022: free plans will no longer be available and free dynos will be scaled down; associated databases will be deleted

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
Feature Limits Notes
Apps 2 apps You can create up to 2 apps full time with one VM each.
2,340 hours per month Run 2 shared-cpu-1x VMs with 256MB RAM full time with time to spare.
1GB Provision 1GB of persistent volumes for permanent storage
160GB per month See outbound data transfer for regional breakdown
Unlimited IPv6, 1 IPv4 Additional IPv4 addresses require a payment method
10 active certificates Add 10 certificates to your apps
Pros/Cons

Pros

  • Build Support: Prefers Docker, supports buildpacks which is useful if a technical user has customized their build
  • Migration: Automatic Heroku migrator service
  • Shutoff: No automatic shut-off
  • Free Hours: More than enough free hours (2,340) per month to run continuously
  • Bandwidth: More than enough bandwith allowances for normal Nightscout usage
  • Security: SOC2 (Type 1) audited
  • Other — Commitment: Founder has expressed interest in finding ways to keep Nightscout deployments free

Cons

  • Deployment: Requires command-line usage if not using Heroku migrator

Render

Free Plan

Pros/Cons

Pros

  • Free Hours: Just enough free hours (750) per month to run continuously
  • Deployment: Has a builtin support for deploying from a GH repo w/out command line usage, based on Dockerfile

Cons

  • Build Support: Prefers Docker over buildpacks, but migration docs require buildpacks?
  • Migration: Has Heroku migration instructions, but requires buildpack usage which is not how we build things, requires additional changes to the code in the forked repository
  • Shutoff: 15 minute inactivity spin-down, 30 second spin-up

Unsure/Neutral

  • Bandwidth: Could not find documented limits
  • Security: Currently getting their first SOC2 compliance audit

Railway

Free Plan

Pros/Cons

Pros

  • Build Support: Prefers Docker, supports our Procfile
  • Deployment: GH integration prevents CLI usage, based on Dockerfile/Procfile
  • Other — DB: Unlike others, provides hosted mongo deployments, which might be an interesting avenue to explore simplifying setup (probably not free tho)

Cons

  • Migration: No maintained documentation or services, a few historical blog posts for specific use-cases
  • Free Hours: Less than enough free hours (500) per month to run continuously

Unsure/Neutral/Notes

  • Shutoff: Could not find documented limits
  • Bandwidth: Could not find documented limits
  • Security: Could not find documentation on SOC2 compliance
@JLChamberlain
Copy link

JLChamberlain commented Aug 26, 2022

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?

@christhekeele
Copy link
Author

@JLChamberlain: 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.

@bewest
Copy link
Member

bewest commented Aug 26, 2022

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.
For those looking for the lowest cost, I think Digital Ocean $5 platform as a service would be a good fit, along with setting up a variety of sidecars, so long as there are good documents that don't increase burden on the support community. A $5 digital ocean droplet with some attached volume storage can host Nightscout with all the core application, sidecars, and database for years without any interruption. It's a very reliable, high quality setup, especially for the cost.
For those wanting to start for free, something like flyio might be desirable, but it's hard to know if it will increase quality issues or be sustainable without looking at their unit economics. The problem with offering free compute resources is that it tends to attract spammers, among other unsavory content that eventually requires addressing.

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.

@christhekeele
Copy link
Author

christhekeele commented Aug 27, 2022

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.

  • T1Pal is already featured prominently alongside every documented reference on how to roll your own no-cost DIY solution, so I assume everyone doing a custom install knows about it.
  • It's therefore reasonable to assume that they've decided they cannot afford any "low cost Nightscout" solution, or do not want to pay the cost, and it's those folk affected by the Heroku change.
  • So, this conversation is about our documentation for no-cost DIY Nightscout solutions, and honoring the assertion in the docs that "it is possible to run Nightscout for free". (Hence the title, "New DIY free hosting instructions".)

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.


T1Pal has also proposed ways to ensure that people use Nightscout do not experience the cost...

T1Pal is willing to work with [...] anyone in order to make sure that the Nightscout experience can be cost-free to people who need it

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
Copy link
Member

bewest commented Aug 27, 2022

  • Consider putting the button for railway in the docs, rather than the README? Add Railway as Deployment Platform cgm-remote-monitor#7319
  • Removing the wording as this is causing issues. replace Heroku free tier with Hobby tier #148 - feel free to use this as a base for additional changes?
  • Please review concerns outlined by @sulkaharo and myself:
    • total cost of ownership, maintenance, support, and developer resources for 20k - 60k people.
    • the developers cannot control the price of third party servers
    • the developers are already over committed with bug fixes, dependency updates, security responses, and demand for features
    • to our knowledge there are no free servers for "a year of Nightscout," especially for loopers of any stripe who send lots of data to Nightscout. Should the default directions say that Nightscout is free to use for a month, for a year, for a decade? We can't make that promise. Every other platform before Heroku has also retired free compute resources because it's not sustainable.
      I think a series of deploy templates for lots of vendors would be desirable, along with a discussion of the tradeoffs for each tier available. @psonnera has done a great job organizing everything by vendor and I'm sure would accept additional changes to add more vendors.

@psonnera
Copy link
Collaborator

@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.

@dircsem
Copy link

dircsem commented Aug 27, 2022

I've found this topic on hacker news, https://news.ycombinator.com/item?id=32599398
and this at github https://github.com/DmitryScaletta/free-heroku-alternatives
Hope it helps.
Would be too hard to migrate the database to an SQL like postgres, available at fly.io?

@JasmineT1D
Copy link

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!

@christhekeele
Copy link
Author

@JasmineT1D the simplest way right now would be to try out this migrator service onto fly.io for hosting.

@ninelore
Copy link

ninelore commented Aug 31, 2022

I migrated to fly.io and it works well. Can recommend so far.

@bewest
Copy link
Member

bewest commented Aug 31, 2022

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

@psonnera
Copy link
Collaborator

@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.

@bewest
Copy link
Member

bewest commented Aug 31, 2022

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.

@psonnera
Copy link
Collaborator

psonnera commented Sep 1, 2022

@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?
PS: since this is not my main job can you ask that famous "someone" for help?

@bewest
Copy link
Member

bewest commented Sep 1, 2022 via email

@gigich
Copy link

gigich commented Sep 1, 2022

I agree that we really need to find a way to continue hosting Nightscout for free.
I am also sure that is possible.
The above comparison of Railway and Fly is great and should be further supplemented.
I currently have 4 Nightscout sites deployed:

  1. fly.io: Migrated from Heroku
  2. Railway: New Github deployment
  3. Northflank: New Github deployment
  4. Cyclic: New Github deployment

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.

@sulkaharo
Copy link
Member

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.

@gigich
Copy link

gigich commented Sep 2, 2022

This is a copy of Nightscout-Website:
———————
The Nightscout Foundation exists to encourage and support the creation of open source technology projects that enhance the lives of people with Type 1 Diabetes and those who love them. This includes fundraising, advocacy, and direct software and hardware development.
———————

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?
At this point it cozld be Northflank, Cyclic or Railway? I‘m sure there is a way to run Nightscout in the future for free for almost all of us.

@bewest bewest changed the title New DIY free hosting instructions low cost and alternative DIY hosting instructions Sep 2, 2022
@bewest
Copy link
Member

bewest commented Sep 2, 2022

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:

  1. DIY Use instructions on this website or your computing skills to create your own installation. Depending on your skill and choice of platform, this can take anywhere from minutes to tens of hours to accomplish. Additionally, you will need to maintain this installation yourself, further adding to the effort. Having said that, there are cloud providers that offer the needed hosting services for free, so your monthly hosting cost can be free - $0 with this option. Historically vast majority of Nightscout users have opted for this choice. Of note, with this option you are the person responsible for ensuring the service is up when you need it. The community aims to support people who choose this option, but this is entirely driven by a voluteer effort and support might not be available when you need it. Additionally, it's important to understand that if you're using a free tier of a hosting service to run Nightscout, your hosting costs are being paid by the hosting provider you're using.
  2. Use a service You can use a hosting provider that does all of this work for you in exchange for a small monthly fee set at a level that mostly just covers the cost of operations to provide this service. There are currently two options available for this (NS10BE and T1Pal), both of which are from active Nightscout community members. If you're a non-technical person, this is a great choice.
    The Nightscout development community actively supports both of these choices.

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.

@gigich
Copy link

gigich commented Sep 6, 2022

Hi @bewest
Yes of course I can do that. I see already a documentation from @psonnera, but the images are not visible. I can review this.
At the moment I have migrated my productive loop-nightscout with multiple followers to railway developer plan which is still free when not used for more than $5. Until know it looks like this should be enough to run it the whole month. I will try to make a forecast after one week of usage

@psonnera
Copy link
Collaborator

psonnera commented Sep 6, 2022

@gigicgmtest
Copy link

@psonnera
Yes, I think that is great! As soon as I know how much ressources my ns-site is using, I can tell you that probabably dev plan is good enough and free.

@gigicgmtest
Copy link

@psonnera
I would change this:
"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 the amount to be below or around $5 per month)."

"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)."

@psonnera
Copy link
Collaborator

psonnera commented Sep 7, 2022

@gigicgmtest let's wait until we can verify it. I'm seeing the hours being burned down matching the creation day...

@dircsem
Copy link

dircsem commented Sep 7, 2022

@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.
Some people connect happy bob and tidepool to the nightscout it would be nice to see how does that affect the consumption of this plan.

@bewest
Copy link
Member

bewest commented Sep 7, 2022

@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.

@gigich
Copy link

gigich commented Sep 7, 2022

My scenario is the following:

  • 1 Dexcom G6 App who is sending Data to Dexcom Share Server
  • 2 Dexcom Followers (not often used in the follow app
  • Nightscout on Railway is getting data from Dexcom Share
  • 1 Loop-App which is uploading omnipod pump data to Nightscout
  • Remote Overrides, Remote Carb, Remote Insulin periodically needed
  • Sugarmate configured to alarm by pushover sms on low blood sugar
  • 2 other iphones with nightscoutX configured for following (not always used)
  • UptimeRobot who is running every 30min
  • FloatingGlucose Desktop App running 5x8
  • ChromeToolbar CGM TIR running 5x8

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
One Month has 720hours, it would be possible just to have 2 sites configured with 2 accounts and you could switch in middle of month, just keep the same Atlas DB in the backend. If you have your own domain and can manage dns, you also could do a round robin dns entry and it would probably load balance that automatically. But anyway I would say, developer plan with the 5$ free is enough for most of us.

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.

@bewest
Copy link
Member

bewest commented Jan 3, 2023

Strongly suggest use semantic versioning. https://semver.org/.
What's wrong with dev and existing process? We welcome any contributions on the important work underway. There are lots of needed updates. We've folded lots of work in dev already that we believe is good to release. This includes lots of work to make Digital Ocean a reliable and accessible platform, improvements for Loop, these compression optimizations and more.

@Navid200
Copy link
Contributor

Navid200 commented Jan 3, 2023

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.

@bewest
Copy link
Member

bewest commented Jan 3, 2023

@sulkaharo and I are likely to release 15.0.0 nightscout/cgm-remote-monitor#7809 with everything we have quite soon. I hope that works. It would help us hasten release to have people confirm that the dev branch does work for them. With additional confirmation we can release quickly, which I think accomplishes what you outlined.

@Navid200
Copy link
Contributor

Navid200 commented Jan 3, 2023

I actually prefer what you are suggesting.
I will put together a page explaining how to create a fork and how to merge in it only that particular commit.
We have a utility that allows users to install from a fork. Then, anyone experiencing high traffic can follow the instructions on that page to address their issue.
We will continue to have the official Nightscout in our platform as the default.

@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.

@sulkaharo
Copy link
Member

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.

@yodax
Copy link

yodax commented Jan 4, 2023

It would help us hasten release to have people confirm that the dev branch does work for them

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.

@psonnera
Copy link
Collaborator

@gigich did you manage to go ahead with Cyclic?
image

@Jackenmen
Copy link

Something of interest might be that fly.io now has a Web CLI in Preview so the setup on their platform may become easier:
https://fly.io/shell

It isn't possible to just upload the fly.toml right now (you can git clone a repo, as well as use curl though) so another way of providing the file would be needed there. I did suggest allowing file uploading on fly.io's community forum today but I don't know if this is something they would be interested in adding.

@psonnera
Copy link
Collaborator

@Jackenmen this is VERY interesting indeed. Thanks!

@psonnera
Copy link
Collaborator

@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...
image

@Jackenmen
Copy link

Now the standard issue is how to maintain privacy with a toml in your repo...

Personally, I would suggest using secrets for MONGODB_URI and API_SECRET. I do that already since using fly.toml for it rubbed me the wrong way. fly.io has a command for setting secrets:

flyctl secrets set "MONGODB_URI=..." "API_SECRET=..."

As for the TOML file...

cgm-remote-monitor repo could come with the default fly.toml which would be included in the clone as that would make the default setup easier to do. The problem is that this still makes changing settings non-trivial as it would seem that right now you would be forced to modify that file within the web CLI (this can be done by e.g. apt installing nano and opening the file in it) and using a CLI editor might not be very straightforward.
Something that is somewhat helpful is that flyctl config save can be used to save the application's current configuration to a TOML file which means that the users wouldn't necessarily have to keep their own copy but this doesn't matter due to the difficulty in editing files from a CLI.

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.

@psonnera
Copy link
Collaborator

@Jackenmen I believe you got something great. I tried:
git clone https://github.com/nightscout/cgm-remote-monitor.git
Edit a fly.toml in a computer text editor, copy all
cat > fly.toml
Paste in the terminal
^Z
flyctl launch
fly deploy
And here's the site alive!

@Jackenmen
Copy link

Using cat is a neat trick, I like it!

@xannasavin
Copy link

unfortunately, it looks like railway is now also no more available for free...
https://blog.railway.app/p/introducing-trial-hobby-pro-plans
https://blog.railway.app/p/pricing-and-plans-migration-guide-2023
They charge now $5 starting next month...
So the search begins again T_T

@WilliamWatterson86
Copy link

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

@psonnera
Copy link
Collaborator

psonnera commented Jul 3, 2023

@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)
@WilliamWatterson86 is that still working? Last time I looked at it the Cosmos thing for Mongo wasn't available anymore.

@WilliamWatterson86
Copy link

@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)
@WilliamWatterson86 is that still working? Last time I looked at it the Cosmos thing for Mongo wasn't available anymore.

@psonnera Yep still working here for me. I was able to follow the YouTube video and have mine set up with no issues

@psonnera
Copy link
Collaborator

psonnera commented Jul 4, 2023

@Jackenmen here we go 6334232

@Jackenmen
Copy link

@psonnera I guess that using cat didn't turn out to be practical? It is a bit of a bummer since that means that users won't be able to easily see what values they set the env vars to after setting them since they're treated as secrets.

@psonnera
Copy link
Collaborator

psonnera commented Jul 4, 2023

@Jackenmen using the fly.toml file requires you to redeploy manually every time you change a variable... that's all but convenient...

@Jackenmen
Copy link

Jackenmen commented Jul 4, 2023

@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).

@ninelore
Copy link

ninelore commented Jul 4, 2023

the same is true for almost every hoster due to the nature of enviromentals

@psonnera
Copy link
Collaborator

psonnera commented Jul 4, 2023

@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/

@ninelore
Copy link

ninelore commented Jul 4, 2023

As long as the actual secrets are stored as such (API_SECRET and MONGODB_URI) its fine.
I wasnt aware of the Web CLI yet as i use fly for non-nightscout purposes as well with flyctl. Seems like a fine addition for the non tech-saavy users.
Wasnt the time format mandatory aswell?

@ninelore
Copy link

ninelore commented Jul 4, 2023

btw some side notes on fly:

  • credit card was recently made mandatory due to abuse
  • the free resources are enough for exactly 3 applications on the lowest cpu and ram level
  • Fly seems to wave any bills below 5$, further expanding the free resources

@xannasavin
Copy link

@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)

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.
However, I have absolutely no Devops/Server/Terminal skills.

The nightscout.pro looks good, but it seems not to allow for personal repos since it's fully managed.
Google cloud looks a bit complicated to me on first glance, also not sure if I could use my own DNS or only freeDNS and also not sure about my own Repo.
Everything else looks either more complicated or "expensive".

Will have another look on the Azure solution @WilliamWatterson86 mentioned.

@xannasavin
Copy link

question about fly / the heroku migrator:
since I'm now on Railway, is there any way to get my data/application from railway to fly or any other service?
or is this really "Heroku only"?

@psonnera
Copy link
Collaborator

psonnera commented Jul 8, 2023

@xannasavin just create a new Nightscout in Fly.io. Copy MONGODB_URI from your Railway site.

@birdfly
Copy link

birdfly commented Oct 18, 2024

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.

CleanShot 2024-10-18 at 18 38 44@2x
CleanShot 2024-10-18 at 18 40 02@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests