What is the best environment setup for a Node.js web app working with a MySQL server?

I want to deploy a Node web app (with Express) to a droplet. I’ve used MySQL for database management on my local machine.

I also have Cron running PHP scripts which scrape an external website for data, and insert this data into the database.

What would be the best way to get this live?

Could I setup a one-click Node.js app, then install the MySQL server and Cron, and migrate the PHP scripts and the cronjob to this droplet?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


You can install the one-click NodeJS image to a Droplet and then proceed to install MySQL and PHP using the package manager provided by Ubuntu, yes. You’ll still be provided with root access to the Droplet, so you could install other packages as well, if needed.

If you’re only running PHP scripts from CRON you’d at least need PHP’s CLI package, though if you want to run PHP scripts from the web browser at any point, I’d recommend also installing NGINX and using PHP-FPM. You would then setup NGINX as a reverse proxy and it would handle proxying to both PHP and your NodeJS application(s).