The article calls out having to learn how to create a Docker image for Fly.io as though it's a bad thing. I consider it a huge bonus if you like taking advantage of free tiers for services.
The whole point is that if you're going to take advantage of a free tier you should do so in a way that switching is trivial. Docker goes a long way to achieving that.
I personally just pay $10/month to Linode and self host these days using Nomad. Less restrictions and more freedom for the cost of a coffee and a bagel.
As someone who uses Node.js and is in the exact same situation as the author, requiring Docker is the #1 reason I'm not going with Fly.io. There's a standard for launching a Node.js project, and that's running the "start" script `npm start`, so switching is trivial. I switched from a Linux machine to my current MacBook and I didn't have to make a single change in any of my Node.js projects.
Adding docker means adding a whole new layer to ALL of my projects, which I'd prefer to avoid specially when there's no need as Heroku has very clearly shown.
I hear you, it's nice to run on a platform that understands how to execute your entrypoint to start your program. Docker helps ensure more than that though.
How do your dependencies get installed? What happens if you depend on something in your package.json that isn't on the public npm repo? What happens if you need to compile some native code as part of one of your dependencies?
Do you need to depend on anything provided by the OS? Timezone data? Maybe you use sqlite as a storage backend and want to ship your database file as well. How do you include configuration data?
Docker drastically simplifies packaging and deployment, and gives you a ton of flexibility in where and how you run your code.
Agreed, if you have a complex project Docker helps standardize it. But if you have A LOT of simple projects where none of your points apply, then it actually makes it all more complex.
I installed FreeBSD on a OCI arm machine, made two Jail templates (iocage) and deploy everything that way, backup or redeployment to another host is as easy as zfs-send.
Oracle a problem? No, because my Jails can wander to Vultr, Hetzner (yes they sill support FreeBSD) and Amazon andandand, the only change is a DNS one.
Using Docker is relatively simple and requires little to no configuration, arguably less than a standard node project.
Regardless, as someone who uses a variety of languages and is in the exact same situation, my generic Makefile is probably easier to read and understand than any standard that you have probably achieved.
I don't use any build packs in Heroku? Since a while back Heroku just recognizes the Node project and automatically works with it, no need for any extra file.
Or do you mean it's the same in Fly.io? If it auto-detects Node.js (through package.json), or at most allows for a dropdown to say "Node.js project", then that sounds about right for me.
> At this point, flyctl creates an app for you and writes your configuration to a fly.toml file. You'll then be prompted to build and deploy your app. Once complete, your app will be running on fly.
Well it still creates a fly.toml for you, which is still a new config file that I have to maintain across projects.
You update the toml file once (e.g if you have a release step), and then don't touch it again. Its more powerful than Heroku, so with that it gives you the option of adding additional config options.
I mean it even creates the basic file for you, I'm not sure what the issue is?
I use Time4VPS (which is linked on my blog) or Hetzner for VPSes and Docker Swarm for orchestration (at least for personal stuff, though Nomad or something like K3s can be great too), in combination with a more boring web server like Apache or Nginx for ingress (but Caddy and Traefik are viable as well).
Overall, I'm inclined to agree! You can pick a stack that's as boring or interesting as you want and have your container images work in almost any environment where OCI is supported, with minimal tweaking.
Currently each of my individual nodes cost around 5-10 euros a month, or I can even use my homelab servers for whatever I want, since they can either be in the same cluster or a separate cluster. Essentially you just adjust some deployment constraints and feed some YAML/HCL into whatever container orchestrator you have. Provided that your registry access is configured correctly, you'll have your software up and running in minutes.
Did not mean to imply that Dockerizing applications is a bad thing - actually even pointed out that "it's not so hard". Just wanted to point out that writing one takes some effort and therefore Fly.io is not a drop-in replacement for Heroku.
Container based deployment is a great thing to have and definitely a skill worth learning.
Fly.io seems like the easiest way to get a docker container running publically. I had a look at the AWS equivalent (can't remember the name), and it was a cluster fuck of complementary services in the tutorial.
Wish more cloud providers would focus on helping with existing open source tech, rather than trying to suck you in.
I've found nomad far easier to operate and maintain, and conceptually it's easier to wrap your head around as well. It helps that nomad is just responsible for container orchestration, that's it. You can use whatever you want for ingress routing (I really like traefik).
That’s good to hear. I also like Traefik but I used some Traefik ingress controller on K8s. I really just want an orchestration tool for my containers and nothing else since NGINX and Traefik have nice enough abstractions. Thanks y’all.
My biggest take away from trying to find a Heroku alternative is that Heroku is late to the game of charging for a basic app. Other service might be free, but seem to have some sort of catch--only static, or requires a certain infrastructure, or whatever else--and only Heroku had the unopinionated free tier. And while I haven't used their competitors, I'm skeptical they can match Heroku's interface, CLI, add-on ecosystem, documentation, and all the various tutorial and stack overflow questions about their platform.
So, I'm sticking with Heroku. Sure, it'll cost some (and supposedly they're bringing in cheaper tiers than current, too), but it's not a big difference from their competitors, is reasonably priced (from a competitive perspective), and allows me to continue using a tool I know inside along with all the accompanying ecosystem.
I guess after ten years I'll actually have to pay Heroku something for their service. That seems... fine to me. Complaining about that seems petty.
I’ve found Vercel to work well for my personal projects. It’s supports dynamic applications and static ones, custom domains, CI for deployment and has a useable CLI all available on its free tier.
Replit can host any language that it supports (unless I’m reading the verbiage incorrectly at [1]), and custom domains are in the free tier (and ssl I believe).
Throw Cloudflare in front to survive an HN hug as far as bandwidth concerns go for the Replit free tier and you should be looking good.
It was the security breach where all of my environment variables were stolen. And the amount of time it took and their level of transparency through it all.
This looks like a serious agency, so I'm stuck on the question of why the free tier is so important to them versus simply paying for Heroku. Surely doing a mass migration to a new PaaS just to claim a small per-project savings is a dubious proposition given the inevitably of a future rug-pull from wherever you migrate.
On the other hand, if you're an individual with a bunch of small projects and you want to host them economically, then standard VPS hosting is going to give you a lot more bang for your buck.
Post author here. We are of course using paid dynos for any business applications. Free tier only makes sense for hobby projects and quick experiments. There's no free lunch in the long run.
All the free alternatives will eventually get rid of their free tier too - could be 1 year, could be 10 years. As the author stated, they had 25 free instances running. They converted over to paid, so maybe they became a profitable client. However, all the users who have 25+ instances and never pay over the course of 10 year isn't sustainable for a business.
We just shut down our last Heroku dyno. Kudos to all the people who worked there, there were a lot of talented ones but lately the service has been a joke.
As a Heroku user, you pay a premium for AWS instances, essentially, with the premise being that things "just work" and that you get simple deploys.
Well, if by "just", you mean "barely" - sure! We had several hours of outages where Heroku's status page was still green. We even gave them metrics to show that the issue was with their routing layer, and they just told us that it was our apps fault and that perhaps we should get New Relic to see why it's so slow... After several months of prodding they acknowledged that it was their fault. Or, well, they blamed another customer for excessive use of resources or something like that.
As for simpler deploys. We had multiple incidents where our deploys got into some hybrid preboot state. (If you're not familiar with Heroku's terminology, a bit simplified: Preboot enabled = start the new instances, wait three minutes and then reroute traffic. Preboot disabled = stop the old instances, then start the new ones.) In our case, deploying with preboot enabled, Heroku stopped our old instances and then waited three minutes to start new ones... Again, this wasn't acknowledged by support until after several weeks, even those we provided logs showing exactly what happened with our instances. Now they have admitted that it's a bug, but our issue is still open.
Oh, and the Github integration was of course removed when they were hacked, so the DX argument isn't very strong either.
Heroku still has a free tier which is comparable to Render, Fly.io and all the other alternatives people keep bringing up. The mythical "an unlimited number of sites & DBs hosted for free forever" option everyone is looking for simply doesn't exist.
> new AWS customers will be able to run a free Amazon EC2 Micro Instance for a year
I don't see how that's comparable. it's one instance of a micro server(and a few other things) for one year for a new AWS user and then it's over. heroku was an unlimited number of apps free tier forever with a limit on cpu/database usage for each app.
The terms are actually quite reasonable. You can't even pay for your resources without changing your account type (anything you buy with your free credit gets wiped out after the trial month, only the "always free" stuff remains...) so I'm reasonably certain you can use their service quite comfortably.
The 50mbps uplink isn't spectacular and certainly not enough to run a business on, but for anything the other free tiers are intended for (experimentation and hobby use) it's sufficient.
Juet remember to never give them your credit card number and provide as little personal information as legally allowed. You don't want the lawnmower to come in your direction, the lawnmower doesn't care.
maybe heroku and fly and others could start shelling books and shoes to help out...
it's been 12 years, but they had a decade of other business units helping to fund their service, and can afford loss leaders like few other businesses.
No discussion of Heroku and the free tier should happen without the context of the massive cryptomining scheme that was directly targeting their free tier:
I’m personally very happy with switching to a Hetzner dedicated server, I’m saving a ton of money, and the server can handle my busiest months of load with plenty of room to spare.
I use docker containers for a rails app and send backups of my db to S3 with restic. Docker compose files and DR scripts are in my repo. If Hetzner goes down I’ll run them on a VPS from any of the million providers.
Deploys push a docker container to dockerhub, then ssh into Hetzner and pulls them.
If you want the ease of git push deploys similar to Heroku then use Dokku.
Everyone should remember how long it took Heroku to tell you your environment variables were stolen in a breach and how they were not transparent at all through the whole process.
They recently increased prices to account for an increase for them on electric costs.
Their business model is sound especially for the server auction dedicated servers.
All that to say I hear your worry but I’m not worried. Hell I was paying more than double on heroku for MUCH less compute resources. So if they double their prices I’d still be ahead.
Every conversation on this topic can be summed up as: "Heroku charging $7/mo for hosting is evil. Switch to <competing service that costs $10-$20/mo> instead."
This assumes the cost of server maintenance is $0. I just shutdown my last droplet. I want a PaaS so I never have to deal with server maintenance again.
$7 is less than a single beer in the pub. If you can afford to devote thousands of hours to learn programming and then hundreds to thousands of hours to build an app then you can afford the hosting cost...
True, I noticed that too. I mean, how low do you value your time to not pay $7/mo for your a project you are spending significant time on?
On the other hand... there is a ton of intangible value in the form of knowledge to be gained from switching tech stacks and hosting platforms. So another way to look at it is, this is a chance to re-evaluate and potentially upgrade your tech stack or skils.
Which is not what I got from TFA, more like their local bar no longer giving away free buffalo wings because people weren’t buying drinks so now they’re shopping for new happy hour specials.
About a month ago I found a tiny VPS for ~$11 for two years which could easily host a pet node app if I were into that sort of thing. $5.50 a year I think it is.
Actually, there's a whole set of mental heuristics that are evolving in my head surrounding monthly-recurring-discretionary-fixed-costs, as compared with the cost of a $BEVERAGE at the $VENUE. It runs the gamut from a $5/mo DO droplet, which costs a Bier vom Fass in your average pub in Germany and grants me a public-facing static IP, to a $20/mo donation to Wikipedia, which costs a Singapore Sling at the Raffles Hotel and grants me a clear conscience when I dismiss its increasingly concerning[0] petitions to donate.
All that said, in addition to the booze quotient, one also has to compare the more nebulous cost of _providing payment credentials at all_ to a new party which didn't have them before; i.e., enlarging your digital footprint[1]. This often must include a mailing address and/or a phone number. In the event of a breach, the consequences to the payor range from a mere uptick in spam/robocalls/junk mail to identity theft and all that entails. We can agree the dollar here is a huge wildcard, just like the odds of it happening at all. It varies by individual, is usually unquantified, my point is the cost/benefit gets real muddy, real fast.
Much more fruitful discussions had a couple of months ago when this decision was first announced 1. People making the decision to move are basing that on slightly more than just not wanting to pay the cost of a beer each month. Furthermore, free tiers are loss leaders, and removing them predictably has consequences.
you don’t want a free tier. what you want is reasonable usage based pricing and scale to zero.
all the actual tiny projects on free tiers have actual costs approaching zero. everything else shouldn’t be on a free tier.
if it’s not possible to monitor usage (not billing) and automatically unplug dns if usage spikes above some threshold, it’s probably not a good provider. having confidence that some project will never cost above x/month is a reasonable ask, and not challenging.
hint: use aws. like python and linux, it's not very good, but everything else is worse.
It's bizarre that people's form of protest against Heroku is to threaten to move to a competitor that has even worse pricing tiers. You've had a free ride for a decade, being asked to cough up $7/mo now isn't the end of the world.
Even if you are a paying customer, this change is likely to affect you. Heroku no longer offers free postgresql to go alongside your already enormously expensive dynos.
From a previous thread on this topic - posted by driverdan:
> We're a large Heroku user currently spending $10-20k/month. This change may lead us to switching to another platform.
> We host a lot of individual apps, many that only need free tier DBs and Redis. This change will roughly double the cost of a basic app on pro dynos + DB + redis, from $25/m to $49/m, with no additional benefit.
> Heroku is already very expensive. $25/m for 512MB RAM is laughable. At $49/m we could get a decent bare metal server for each of our apps.
> If this change included a reduction in pricing to better match alternatives it would be fine. If they only eliminated the free tier for dynos but kept free tiers of add-ons that would be fine. But as is this change will significantly increase the cost for anyone using some free resources.
Many of these projects have no revenue and only exist because a free plan existed. Paying is a non starter so asking where that next free alternative is is a logical intermediary step before shutting it down and moving on to something else.
Why is paying a non starter? There’s a lot of hobbies in the world that require money. I can’t just barge into a climbing gym and say “I’m sorry this hobby will give me no revenue so I refuse to pay”
No one barged into Heroku. The company offered a free service because they considered it a worthwhile marketing strategy. It has to be free because no one, including the authors, are interested in paying for the projects that are looking for another free option.
I created an Ember.js and Ruby on Rails clone of an old video game called Heroes of Might and Magic because it was fun to show my old buddies what I could do and play through some mock battles. I have no interest in paying for a server to host this so it’s just going to disappear from the internet. I have no interest in doing the work to port it over to even another free service. It never would have existed had Heroku not been an option when I had the idea. Obviously I could pay for it, it’s just not worth paying for. It’s similar to piracy, I consumed a lot of content back in the day simply because it was free. I never would have paid money for those music or to watch those movies.
It feels like a bait-and-switch and the "heroin dealer" model to give something away for free just long enough that people become reliant on it, and then suddenly make it be paid.
> It feels like a bait-and-switch and the "heroin dealer" model to give something away for free just long enough that people become reliant on it, and then suddenly make it be paid.
Heroku's free tier has been incapable of running a 24/7-accessible webserver for many years, nearly a decade[0].
At this point, if anyone is reliant on it, it's almost impressive that they've managed to get by for so long without either paying Heroku or bouncing off to another service.
[0] if you give them a verified credit card, you get a few additional free hours per month, just barely enough to run a single webserver full-time on one dyno. At best, the free tier offering is... incredibly limited.
If you verify with a credit card, a single dyno can run for as many hours as you like -- it can perpetually serve HTTP requests for years and years -- but it will be automatically turned off every few hours, with some latency on the first request to boot it back up.
I would say this kind of free tier is quite powerful. It even had free Redis and PostgreSQL. But it had some horrendous periods of downtime and bugs that affect the paying customers just as badly. So ironically the free Heroku experience in 2022 leads you to the conclusion that it's the worst service you could pay for, but the best service you could mooch off of (aside from fly.io and similar) -- which may be counterproductive for Heroku's marketing.
Interested to hear what the paying business customers who migrated away from Heroku think about their new home and the process to move to Fly/Render/Digital Ocean/whatever?
I've migrated one larger project with several containers / databases to AWS Fargate / RDS and a smaller one to Scalingo [0]. In both cases, I'm happy with how it turned out and the migration went fine.
One of the main drivers behind the decision was that Heroku required us to move to the Enterprise tier to run private databases.
If the architecture of your application is not too complex, I would suggest trying Scalingo (or Fly.io, Render, etc.) first. It took me around a day to get the application running on Scalingo, Fly.io and Render. This allowed us to be able to compare them a bit. In the end, we went with Scalingo, since the Review Apps feature to automatically launch environments from pull request worked well for our workflow.
You can see the configuration for Scalingo for a smaller elixir app on Github [1].
GCP Cloud Run and Cloud Native Buildpacks will get you back the Heroku workflow and includes a bunch of other advantages on top of it. It also includes a free tier as well.
https://neon.tech/ wasn't mentioned in the article, but I'm looking forward to trying it out. At the moment it's unclear if they'll have something suitable for hobbyists.
I've been using Google Cloud Run for one of my hobby projects and it worked like a charm. You can have a Google Cloud Build job that takes your GitHub repo from which it builds a Docker image. You make sure that the CMD in the container starts your server. When a request comes in the container is started within ms. You only pay for the storage for the image & the cost from actually executing the container. If you get no requests, it's practically free which is important for my side projects, since there is hardly any traffic.
I tried to get a similar solution with AWS Lambda and API Gateway and it was a huge PITA in comparison.
Anyone know any developers willing to work for free? I have a business idea, and it'll probably make me decent money, but I'd rather not have to pay for the resources needed to fulfill my vision.
There are cheap virtual machines that are good enough for most.
In my book Deployment from Scratch I make a case that just a little bit of Bash gets you pretty far.
There is also nothing wrong with Dokku (we used it at one startup) or Capistrano (I didn't really use it but I think it's fine!) and other simple tools for simple deployments.
Time to remind folk that if you don't need containers (well, it works with containers too, but it's not the point), you can set up https://github.com/piku on a VPS as well.
I appreciate the great article. Heroku has been my go-to platform for personal projects. I'll research these Heroku alternatives. You've given me a terrific place to start and saved me countless hours. Best wishes for your relocation!
I believe there is a new tier coming that that is a small price for dyno hours spread across all your apps. So if your apps sleep it could still be cheap.
Personally I just doubled down on heroku!
I cleaned up a lot of free apps. ‘git pull’ to grab the source is just as magical as git push.
I scaled the important ones up.
I simply don’t have time to learn another platform and its trade offs, or to repackage my apps. I definitely don’t have time for anything other than Postgres which isn’t standard or cheap on other platforms either.
Nothing else is free anyway and who knows how long other platforms will be around. The whole Docker fad has practically come and gone meanwhile build packs keep doing their thing.
In doing so I hit a problem redeploying and the docs and support response are as good as ever.
Thanks for everything up till now Heroku, I’m still a customer for life!
I have zero sympathy for these guys, nor for anyone else running their business on free tier infrastructure. This is the kind of customer nobody needs.
Post author here. The article is about alternatives for running your hobby projects. I agree that it doesn't make sense to run, or expect to be able to run, your business applications on free tier. We will keep on using Heroku's great services from now on as well.
In the article, it says they use Heroku for work and hobby projects. I imagine, like many developers with projects on the side, they try out new tech or platforms on the side and advocate for it at work. In this case, I imagine they used Heroku for hobby projects because it was free and brought it to work (where they could switch seamlessly to a paid tier when usage demanded it) because they liked the platform. On Heroku's side of the fence, I would consider this to be a marketing strategy known as a "loss leader". It's fine for Heroku to take that away, but it's also fine for people to be driven away when the marketing strategy that lured them in is abolished.
I can want free shit. If you offer it, I can use it. If you stop offering it, I can leave and look for more free shit. I can also help other people who want free shit to find it. I can write about it, and you can downvote it if you don't like it. The end.
The whole point is that if you're going to take advantage of a free tier you should do so in a way that switching is trivial. Docker goes a long way to achieving that.
I personally just pay $10/month to Linode and self host these days using Nomad. Less restrictions and more freedom for the cost of a coffee and a bagel.
https://www.larrymyers.com/posts/nomad-and-traefik/