Can I run LEMP Server and a Node stack on the same droplet?

I just setup a LEMP server on Ubuntu 16.04. This is my first time setting up a server from scratch!

I would like to run 3 seperate domains on the same droplet. One is a LEMP site (personal site) and another is a Node.js app that I want to use Node/Express/React/Postgres on. The third one might be a wordpress blog. Anyway…

Two Questions:

#1 I have already created the server blocks for the respective sites. Do I just install all my necessary packages and go from there? Can node and node packages be installed alongside mysql and php?

#2 Do server blocks share all the same access to the packages/servers I install? For example, can all domains use mysql and php or node?

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.

Accepted Answer

Think of it this way:

Can this road handle 100,000 cars per hour with no bottle necks?

There are a lot of questions to ask:

  • Was the road built optimally (code for the sites)?
  • Is the road wide enough (memory allocation per request)?
  • Are there enough lanes (server size)?
  • Does it have shoulders to allow people to pull over if they break down (CPU/RAM is able to handle extra load/larger requests)?

So, think of planning a server the way you would a road. Can it handle the traffic? Can it handle 25% more traffic than you expect? Is your code optimized?

As for if the sites can use the same installs of packages: yes.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.