Hacker News new | ask | show | jobs
Ask HN: How are you hosting multiple small apps?
3 points by hitmyapi 1001 days ago
Curious how everyone handles hosting multiple side projects and apps? I have a few small apps with different frontend and backend stacks, and I've found it surprisingly difficult to deploy and host them without paying ~$5/mo per app. The monthly overhead starts to add up with 5 or 10+ apps, factoring in domain costs etc.

Lately I've been using an AWS Lightsail instance with an nginx reverse proxy and Let's Encrypt for managing the SSL certs for each domain. I've been able to run a few apps on a single instance for ~$5/mo. It takes a bit of time to setup each new app, but overall hasn't been terrible. Would love to find an easier way though so I don't need to keep updating my own nginx config.

How are y'all hosting your apps? Should I stop being cheap and just use Heroku? Let me know

5 comments

Based on the fact that your ideal is to have a similar experience to heroku than managing your own server setting up reverse proxies take a look at these options:

1) https://dokku.com - lets you turn your light sail instance basically into heroku

2) https://render.com

3) https://fly.io

4) If you have aws credits this is their heroku equivalent: https://aws.amazon.com/elasticbeanstalk

above is not what I do but would be the options I would pursue if I understand your preference and requirement correctly.

These look like great options, I'll check them out. Dokku looks like it could be a good balance between offering a managed server experience while letting me deploy multiple apps to a single instance
I went from working on one side project to now 3 or 4. Not a ton but like you wanted to figure out hosting. This is my hosting setup that has worked well for me.

- All project frontends are built on SvelteKit. This could Next, Remix or any framework really. This allows me to serve it on Cloudflare Pages for free. - All the app logic for my projects use one REST API service. This is hosted on Digital Ocean. - The DB for my API is also hosted on a Managed MySQL service from Digital Ocean. I could setup my own droplet but I wanted one less thing to manage. I'm looking to move this to Cloudflare D1 once it's available for public usage. - All my images are hosted on Cloudflare R2. This is great because it connects to Cloudflare's DNS and makes it a simple step to add a custom domain.

Cloudflare. I code all my side projects these days to run on cloudflare workers/pages. Free hosting off the bat, free KV storage, free S3/R2, Cron triggers, lot of other free stuff I haven't messed with yet
Oh interesting, I didn't know cloudflare offered serverless environments. I'll have to look into them, sounds like the free tier is generous with 100k requests per day
I use what sounds like a similar approach: cheap Digital Ocean instance, nginx, BIND, Let's Encrypt, Namecheap, DNSMadeEasy (for secondary DNS) and whatever stack the app uses.

I have a private GitLab instance (also at DO), and put a gitlab-runner on the web server so I can do deployments straight from GitLab's CI.

I'd probably look for an alternative to DNSMadeEasy if I was starting from scratch, but adding a new domain there is easier than finding something new, so inertia keeps me there.

I've considered using containers, just to keep things more modular, but I haven't yet bitten that off (yet?).

Oh adding a CI pipeline into the server is smart, that probably makes deployments a breeze. I mainly deploy manually with scp, would be awesome to automate that with a CI/CD flow haha

Same here on containers, in theory they seem great but my projects have been small enough where a container feels like more hassle than it's worth. I might need to just take the time to learn Docker properly though

Heroku, Fly, and Render are all good options.

As other poster mentioned, Dokku and Elastic Beanstalk are also good options--the latter would seem to be a natural migration, given you are already on AWS.

Yep love the ease of Heroku, just not a big fan of the $7/mo per container model since I have a lot of apps to host. Dokku looks like a great option for getting the Heroku experience on cheaper compute though, will check it out!