Hosting more than one Node.JS bot on a single droplet

Posted February 11, 2018 6.9k views

Hello, I am fairly new to this hosting business. I am currently making Discord and Twitter bots using Node.JS. I have one that uses a mongo database and one that will use SQLite. They each have their own accounts. My question is, will I be able to run them both at the same time on a single droplet? Or will I need to get two droplets?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Yes, you can run multiple Node.JS applications on single Droplet. You just need to make sure they’re not running on the same port, but as long as they aren’t, you can.

For that, you can use something such as pm2, to easily manage applications. Check out the How To Set Up a Node.js Application for Production on Ubuntu 16.04 to learn how to use pm2 to manage your applications.

by Brennen Bearnes
Node.js is an open source JavaScript runtime environment for easily building server-side and networking applications. Node.js applications can be run at the command line but this guide focuses on running them as a service using PM2, so that they will automatically restart on reboot or failure, and can safely be used in a production environment.