6
14 Comments

Where do you host multiple projects?

For all you IHers with more than one project, from side-projects to personal sites, etc and especially if they're not making money yet (or might never).

Where do you host them that doesn't break the bank?

  • How many projects do you have? Feel free to link your favourites!
  • Which hosts? Vercel, DO, AWS, Render, Heroku
  • Do you use DBs like RDS?
  • Do you make that money back on your projects?

I like Render for its simplicity, and I'm sure the same goes for Heroku and other PaaS-style providers, but once you've added in a database and multiply that by several projects the pricing doesn't scale.

At work we have multiple DigitalOcean droplets and ansible scripts and all that, but for side-projects I want the best of both worlds!

What does everyone else do?

posted to Icon for group Developers
Developers
on August 21, 2020
  1. 4

    There are some pretty cool OSS projects in this space you can check out.
    https://github.com/dokku/dokku/ - Create a local docker server and run apps with a Heroku-like config files.
    https://fnproject.io/ is the one I'd most like to try for a more "serverless" feel. I think I read somewhere that you can run regular apps with it about as easily as a serverless app.
    https://www.openfaas.com/ - I played with this only a tiny bit. It was cool, but kubernetes is probably a bit much for side projects :)

    Currently, I use DigitalOcean with LXD containers to make each app a little more maintainable/separated. My containers look like this:

    • webserver - nginx with static sites, LetsEncrypt (including a wildcard cert for subdomains)
      This also includes a little ssh tunnel script so I can easily proxy stuff on my laptop I'm playing with that doesn't need a production server yet.
    • postgresql - my DB instance
    • app-name-X - an instance for each app, which I reverse proxy from webserver. ~10 lines of a config in systemd to auto-start the app

    It's pretty great. I used to run everything on individual DO instances, which was a pain with their own DBMS, and now they startup quickly, can be updated easily, etc.

    My only complain about DO is that their load balancing is a bit expensive for a bunch of misc side projects, so all the web requests have to go through a single server, even if I end up creating multiple virtual machines later.

    DevOps is super fun to me. I kinda want to spend a month to automate random stuff and make a web UI, but that's hard to justify :-P

    1. 3

      Thanks for your insights!

      I've seen Dokku and OpenFaaS - Dokku I'll probably give a go since I've never tried it, and OpenFaaS is overkill for me because k8s.

      Will have to check out fnproject too!

      It sounds like your setup is similar to mine, or at least to what I was thinking of doing. I use https://github.com/nginx-proxy/nginx-proxy along with the letsencrypt container to proxy requests any Docker container with the right VIRTUAL_HOST env. Then I use ansible for setting up a server for each project and for deploying prebuilt docker containers.

      It works pretty reliably but I'm probably going to adapt it to hosting a few side-projects on a single server.

      I guess amongst my rambling, I just want that PaaS like experience for my own containers on projects that aren't making money!

      Been toying with the idea of wrapping up these ansible scripts into an opinionated cli tool for myself but it's a rabbit-hole I'm not sure about just yet.

      Do you use something like Terraform, Ansible or Puppet or do you setup everything by hand?

      1. 1

        That all sounds very cool!

        nginx-proxy sounds pretty handy. My setup is ok, but a little tedious to add new projects. Since I tend to do frontend-heavy apps, I like to have a subdomain with static files and then reverse proxy a /app directory for backend API stuff though.

        Yeah, I totally want the PaaS experience as well haha. Dokku sounds really cool to me, but I've been hesitant (and lazy) about jumping into Docker. I like the idea of managed machines more than containers that disappear or don't maintain state. Think I need to just get over it :-P

        I really need to use something to manage setup. I used puppet a bit at a past job, but it's been a long time. Instead, I do crap like this:
        https://brisaboards.com/docs/installation/ (old OSS project of mine)

        1. 2

          I'm glad to see this is a shared problem :)

          I think I'm going down a rabbit-hole of research and reading, but I found https://nanobox.io/ https://github.com/nanobox-io/nanobox which seem like interesting things to keep an eye on!

          1. 1

            Oh yeah, I forgot about that! Saw it a while back, maybe DO sent me an e-mail asking if I was interested in beta testing it or something.

            It was a simple PaaS with it's own costs before DO bought them. And I imagine it would require load balancing (more costs! haha) pretty quickly.

            1. 1

              Yeah, I'm sure it'll be another option where it ends up pricey but the ui looked nice. No reason why that same experience couldn't be replicated on a single server instead of a huge cluster though.

    2. 2

      This comment was deleted 6 years ago.

      1. 1

        Even though I'm not a big fan of docker (more a personal problem than a Docker problem haha), I don't think it's the best option long-term, it was just simple to get up and running.

        First, I tried LXD on my laptop, loved it for the ability to spin up/tear down containers easily, so I created a DO server and installed it. I think my instance is Ubuntu 18.04, but I practically followed this tutorial by the letter:
        https://www.digitalocean.com/community/tutorials/how-to-set-up-and-use-lxd-on-ubuntu-16-04
        Including the iptables-persistent thing to make sure routes were saved on reboot.

        (Sorry, this turned out to be a novel. Feel free to stop reading here haha)

        Then I created 3 containers: webserver, postgresql, and ssh-access (I don't know why, but containerizing an ssh server which you have to access as a "jump box" seemed a little safer than leaving ssh public on the root of the virtual machine). Then setup containers for each app and configured reverse proxies for each app.

        Some helpful scripts I created:

        • bssh: On my laptop, I can type bssh [container] [user] and it goes through all of the hurdles to ssh to the VM and lxc into a container.
        • backup.sh: Simple bash script on the root vm that backs up specific container directories, encrypts it with gpg, and uploads to Spaces (an s3-compatible store).
        • btunnel: With a wildcard cert on my webserver, I can run btunnel <testapp> and it creates an nginx config that proxies testapp.brisa.io through ssh to my laptop (I love this. I get ssl and can send people links to my test apps!).
        • templates: A lot of misc nginx templates for quickly configuring static sites with a git directory.

        What's missing for me:

        • Simple cgi for a script I want to run when it's needed, and shut down when it's not to save RAM.
        • Auto-updates: For my static sites, I have cronjobs to git pull, and I'd prefer post-commit hooks that auto-update the content.
        • Similar for apps: I don't have tests :-P so I'd like a way to pull the repos and restart services when my repo changes. Right now, I ssh in and git pull/update manually.

        And, of course, the PaaS dream: I have gitolite for my own private git server, and I'd love to easily create repos, with a web interface (or even simple cli) to configure nginx, spin up an instance, and link the two.

        1. 1

          This comment was deleted 6 years ago.

          1. 1

            I wouldn't necessarily recommend it. It was just easy for me. I think most of us develop in a way that would work with Docker, which seems a bit more sustainable long-term :)

  2. 2

    We're building something simlar to Render at www.kintohub.com. Not to self promote, but we're also eating our own dog food so, we are using kinto to build kinto and all of the company's side projects are on there too.

    We were looking for a place that doesn't limit the stack (MongoDb, MySQL) requirements for example, but something that had Heroku-like UX all in one place. I'm comfortable trusting the cloud providers for production data related stuff, or 3rd party saas like MongoDB atlas, but when it comes to cost, doing something simple is key.

    My process on getting a project from idea -> scale is that I start with self hosted DBs like on Kinto. I have the ability to fine-tune them with resources and add read replicas and scale horizontally, but there is always a point in the project (Way after its successfull) where I don't have a team of DBAs / experts yet and need to switch to managed DBs as mentioned above. This is usually when you hit the 1M USD revenue mark. When that happens, I still have dev/test using self-managed/self-hosted DBs, but staging(UAT)/prod will be using the real-deal.

    So we built Kinto to do this, manage all apis/sites/jobs/databases/etc in one place. While focusing on developer friendliness and cost conciousness. No surprise bills and tools to see actual usage and optimize your resources.

    We're also not aiming to be a next-gen cloud. We're on google at the moment, but soon will have AWS regions available. Trying to be more of a "cloud interface" to get your heroku experience via our SaaS or it can even run on your own private cloud account as well.

    Feedback sincerely welcomed!

  3. 1

    For me, Heroku is still the best. I mainly work with Rails though - so take that into consideration.

    Ultimately, it comes down to time and effort to get a project off the ground. There are so many other things I need to do to launch a product. And I want to worry about hosting, deployments, and stability as little as possible. I simply want an easy way to deploy, then forget about it.

    In the past, I've used AWS Elastic Beanstalk. It's pretty good, but it takes far longer to setup than Heroku. If you do it a bunch and come up with a nice template for yourself, Beanstalk might be a viable option.

    I've explored others in the past like Cloud 66. And I've used bare metal Digital Ocean servers, too.

    But I keep coming back to Heroku for its simplicity. Sure, it gets expensive if you need to scale up. Regardless, I'd argue it's worth the cost because it gives you time to put into other more important things. For example, if I were to deploy to AWS, I would need to babysit whenever something goes wrong.

    Time is my most important resource. Anyway I can steal time back (by letting Heroku keep my product up and running) is a gigantic, huge, priceless win.

    There will be a time to move to AWS and save money, but that time is not when launching a product.

  4. 1

    yeah have been running into this myself, esp for small toys where I'm the main user

    lambda is great but RDS isn't free. Their serverless offering ('aurora serverless') takes 1 minute to boot when cold which isn't ideal

    if your data is KV-structured instead of relational, there are a lot of 'per transaction' pricing options for datastores

    I have a dedicated server that has a bunch of docker images packed into it for small experiments

    1. 1

      That's exactly my issue, RDS just isn't priced right for lots of small experiments really - and maybe it shouldn't be, but it leaves this little gap where people are left to cobble together solutions for themselves.

      1. 1

        if you like to live dangerously, you can mount a file-based datastore on a network file store from inside lambda

        it will be slow (sqlite explicity warns against this https://sqlite.org/lockingv3.html#how_to_corrupt) but for very low concurrency it could work

        wouldn't be that hard to develop an 'on demand hosted sqlite' system that solves these problems and lets people have an on-demand SQL DB that warms up in 100ms

        1. 2

          That would be an interesting one. Don't think I'm feeling like living on that particular edge, but it'd be interesting to see how that'd work

Trending on Indie Hackers
Fixing broken scrapers instead of working on my actual product. So I made it my problem. User Avatar 42 comments I Built a Habit Tracker SaaS Alone in 6 Weeks (No CS Degree, No Team). Here's Exactly How User Avatar 41 comments I built a WhatsApp AI bot for doctors in Peru — launched 3 weeks ago, 0 paying customers, and stuck waiting for Meta to approve my app User Avatar 39 comments I built an open-source PII masking layer for LLM APIs — early traction, looking for design partners User Avatar 33 comments From broke and burned out as a PM, to launching my SaaS and optimizing my health User Avatar 27 comments How to see revenue problems before they get worse User Avatar 27 comments