2
2 Comments

How to host node.js instances for customers?

I'm looking for some guidance on how to support hosting one (or multiple) node.js apps per customer. I run a no-code tool for making Discord bots. The end product a user gets is a node.js Discord bot. I would like to be able to offer hosting to users. Essentially, it would be the same template node.js app, with different configuration and data files for different users.

What is the best way to go about this?

on November 4, 2020
  1. 2

    I would highly recommend Dokku or Caprover. I'd suggest Dokku to begin with because I've found it to be more stable but if your server starts maxing out, you could switch to Caprover and do a clustered system (it's not worth the effort if you don't have enough traffic, I learnt this the hard way). Both Dokku and Caprover have prebuilt images on DigitalOcean for you to use.

  2. 2

    Hi Austin,

    An affordable and quick way to accomplish what you want is to get a small VPS instance and start a Node.js app for each customer. Put Nginx in front of the apps to route traffic as a reverse proxy.

    Depending on usage you could easily host 10 or even more Discord bots on a $5/month VPS instance. When you outgrow your server later on you can easily scale up to a bigger one, but that's a worry for later.

    Let me know if you have any follow up questions!