LEMP (LLSMP) Application Server

LEMP (LLSMP) Application Server

Note: Since the 1.16.1 release, both the LEMP and LLSMP stacks come with HTTP/3 support enabled by default. To utilize this feature, you’ll need a public IP address to bypass the Shared Load Balancer and connect directly to the server using HTTP/3.

LEMP is a software stack consisting of the Linux operating system, the NGINX web server, the MariaDB database, and the PHP programming language. This combination is widely favored by developers for hosting a diverse range of projects within a single container.

If the platform supports LiteSpeed, you can use a similar LLSMP stack (Linux, LiteSpeed, MariaDB, PHP). To discover the advantages of the LiteSpeed Web Server, click the link above.

LEMP and LLSMP

The internal architecture of the LEMP and LLSMP containers includes the following components:

  1. An NGINX or LiteSpeed application server driven by PHP for handling events.
  2. A built-in MariaDB 10 database server that stores your project data.
  3. A default Redis 6 database for object caching.

Please refer to the section below for further information on the stack. Let’s now proceed with the installation steps.

Step 1. First, access your platform dashboard (create an account if you haven’t done so already). Then, locate and click on the New Environment button at the top of the page.

New Environment

Step 2. Navigate to the PHP tab in the topology wizard that opens automatically. Choose LEMP (LLSMP) as your application server.

Select Application Server

Adjust the remaining settings according to your requirements (such as scaling limits, public IP addresses, and regions), then click ‘Create‘ to continue.

3. Just give it a few minutes to set up your environment on the platform. After it’s done, you can simply click on ‘Open in Browser‘ to see the default phpinfo() data displayed on your server.

Open in Browser

Feel free to move forward with deploying your application now.

LEMP & LLSMP Peculiarities

When using the LLSMP software stack, all the features of the LiteSpeed Web Server are applied to this node, including the license fee. However, other aspects remain consistent across both servers.

1. To access the built-in database servers, follow these steps:

  • You can connect to the phpMyAdmin administration tool for MariaDB through port 8443. The specific link and login details can be found in the email sent after creation. If necessary, you can reset the password through the dashboard by hovering over the application server and selecting the “Additionally” > “Admin Panel” > “Reset Password” option.
  • The Redis database doesn’t require a password for access, but it’s only accessible from within the container (i.e., localhost).

Admin panel

Tip: You can connect to the database client within the LEMP/LLSMP container using either SOCKET (localhost) or TCP (127.0.0.1) protocols.

Check out the guide linked here to get a deeper understanding of how PHP connects with MariaDB

2. Here are some key environment settings for managing your LEMP/LLSMP container:

  • ADMINPANEL_ENABLED: This allows or restricts access (default is true) to the phpMyAdmin console for the integrated MariaDB database server.
  • REDIS_ENABLED: This toggles object caching with Redis on or off (default is true).
  • CP_MEM_LIMIT: Determines the share of RAM allocated for the application server (NGINX/LiteSpeed), set at 50% of the container’s total RAM by default.
  • CACHE_MEM_LIMIT: Specifies the portion of RAM reserved for the Redis cache server, set at 10% of the container’s total RAM by default.
  • DB_MEM_LIMIT: Sets the RAM allocation for the MariaDB database server, typically at 40% of the container’s total RAM by default.
Tip: You can express these RAM limits in megabytes (m/mb/M/MB), gigabytes (g/gb/G/GB), or percentages (%). If units are not provided, the values are interpreted as percentages.

Environment Variables

The changes to these settings need a restart of the container(s) for them to take effect.

Note: LLSMP includes extra factors like WAF, WP_PROTECT, and WP_PROTECT_LIMIT, tailored for the LiteSpeed stack, all detailed in their documentation.

Of course, you’ll find all the perks of the standard platform containers also apply to the LEMP and LLSMP stacks. Take this, for instance: