How does one setup a LEPP stack on Digital Ocean using Ubuntu 22.04 - 23.10?

I was wondering if there is a way to use LEPP instead of LEMP for my virtual petsite using PHP since my website performs a lot more write operations than read operations. I have gone through the tutorials in the digital ocean stack and I am unable to find one that does so.

I am switching from Ruby on Rails to PHP since there is a bit more up to date articles on it and I am kind of at a stuck point on Ruby on Rails 7. I am unable to get past the initial setup using a postgress server and https. There was one piece of information I am missing from the previous question which is stopping me from moving forward to get the website up and running.

Any help would be greatly appreciated on this.

Show comments

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.

Site Moderator
Site Moderator badge
April 14, 2024

Heya @ebeecroft,

Yes, you can go from MySQL to PostgreSQL making the setup LEPP, it’s quite alright.

First, let’s start with the L, A and P(php). You can follow this tutorial from DigitalOcean for that:

Skip the part for MySQL.

Now for Postregsql install on Ubuntu, you can do the following

Update your system’s package list: Open a terminal and run the following command to make sure your package list and installed packages are updated.

sudo apt update && sudo apt upgrade

nstall PostgreSQL: You can install PostgreSQL along with the PostgreSQL-contrib package which adds some additional utilities and functionality by running:

sudo apt install postgresql postgresql-contrib

Verify the installation: After installation, PostgreSQL should start automatically. You can check its status by running:

sudo systemctl status postgresql

Accessing PostgreSQL: By default, PostgreSQL creates a user named ‘postgres’ with the role ‘postgres’. You can switch to this user to start using PostgreSQL:

sudo -i -u postgres

You can then access the PostgreSQL command line interface by typing:


To exit the PostgreSQL interface, type:


Additional Configuration (Optional):

  • You might want to create a new database or new roles. You can do these as the postgres user.
    • Adjust authentication methods and other settings by editing the configuration files typically found in /etc/postgresql/{version}/main/.

Secure PostgreSQL: While PostgreSQL is configured with reasonable defaults for security, you may need to adjust these settings based on your specific needs. For example, you might want to change the default listening addresses or implement more stringent password policies.

Site Moderator
Site Moderator badge
April 13, 2024

Heya, @ebeecroft

LEPP might a suitable alternative to LEMP to optimize the stack for write-heavy operations.

I don’t think we have one article that covers the whole process, but you can use these two to complete the process.

You can complete the LEMP stack article, beside from the MySQL setup bit and then switch to our PostgreSQL article to complete the database bit.

Hope that this helps!

Try DigitalOcean for free

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

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

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

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

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