Skip to main content

Build PHP applications with an NGINX server instead of Apache.

The LEMP stack replaces the Apache web server component with NGINX (“Engine-X”), providing the E in the acronym: Linux OS, NGINX server, MySQL/MariaDB relational database management system, and the PHP programming language. This stack will work for almost all applications that are compatible with a LAMP stack. The advantage of choosing NGINX is the ability to serve more pages simultaneously with a predictable memory usage profile, making it a more stable alternative in high demand scenarios.

Set up this standard development stack even more efficiently using Linode’s LEMP Stack Marketplace App.

Deploying the LEMP Marketplace App

  1. Log in to the Cloud Manager and select the Marketplace link from the left navigation menu. This displays the Linode Compute Create page with the Marketplace tab pre-selected.
  2. Under the Select App section, select the app you would like to deploy.
  3. Fill out all required Options for the selected app as well as any desired Advanced Options (which are optional). See the Configuration Options section for details.
  4. Complete the rest of the form as discussed within the Getting Started > Create a Linode.
  5. Click the Create Linode button. Once the Linode has provisioned and has fully powered on, wait for the software installation to complete. If the Linode is powered off or restarted before this time, the software installation will likely fail. To determine if the installation has completed, open the Linode’s Lish console and wait for the system login prompt to appear.
  6. Follow the instructions within the Getting Started After Deployment section.

Software installation should complete within 2-3 minutes after the Linode has finished provisioning

LEMP Stack Options

Here are the additional options available for this Marketplace App:

Database Root PasswordThis is the root password for the database. Required
Admin Email for the serverThis email is require to generate the SSL certificates. Required
Your Linode API TokenYour Linode API Token is needed to create DNS records. If this is provided along with the subdomain and domain fields, the installation attempts to create DNS records via the Linode API. If you don’t have a token, but you want the installation to create DNS records, you must create one before continuing.
SubdomainThe subdomain you wish the installer to create a DNS record for during setup. The suggestion given is www. The subdomain should only be provided if you also provide a domain and API Token
DomainThe domain name where you wish to host your Wazuh instance. The installer creates a DNS record for this domain during setup if you provide this field along with your API Token.
The limited sudo user to be created for the LinodeThis is the limited user account to be created for the Linode. This account has sudo user privileges.
The password for the limited sudo userSet a password for the limited sudo user. The password must meet the complexity strength validation requirements for a strong password. This password can be used to perform any action on your server, similar to root, so make it long, complex, and unique.
The SSH Public Key that will be used to access the LinodeIf you wish to access SSH via Public Key (recommended) rather than by password, enter the public key here.
Disable root access over SSH?Select Yes to block the root account from logging into the server via SSH. Select No to allow the root account to login via SSH.

Note: The password for the MySQL root user is automatically generated and provided in the file `/root/.linode_credentials.txt` when the LEMP deployment completes.

Software installation should complete within 2-3 minutes after the Linode has finished provisioning.

General Options

For advice on filling out the remaining options on the Create a Linode form, see Creating a Compute Instance. Some options may be limited or have recommended values based on this Marketplace App:

  • Supported distributions: Debian 11, Ubuntu 20.04 LTS
  • Recommended plan: The Linode plan you deploy your LEMP stack on should account for the estimated workload. If you are standing up a simple web page, you can use a 1GB Linode (Nanode) or 2GB Linode. If you are standing up a larger or more robust web app, then consider a plan with higher RAM and CPU allocations.

Getting Started After Deployment

After your LEMP stack has finished deploying, you can view it and upload your own files using one of the methods below:

  • Log in to your new Compute Instance through Lish or SSH using either the root user or limited user and the associated password you entered when creating the instance. Your application’s web files are located in the /var/www/html directory.
  • Navigate to the domain entered during the creation of the Linode instance. If you did not enter a domain, you can also use your Compute Instance’s rDNS, which may look like See the Managing IP Addresses guide for information on viewing and setting the rDNS value.
  • Consult the following guides to learn more about working with the various components of the LEMP stack:
  • Upload files to your web root directory with an SFTP application like FileZilla. Use the same root credentials that you would use for SSH.

Software Included

The LEMP Stack One-Click App will install the following software on your Linode:

NGINXWeb server that can be used to serve your site or web application.
MySQL ServerRelational database.
PHP 7General purpose programming language.
UFWFirewall utility. Ports 22/tcp and 80/tcp for IPv4 and IPv6 will allow outgoing and incoming traffic.

Going Further

The LEMP Stack Marketplace App was built by Linode. For support regarding app deployment, contact Linode Support via the information listed in the sidebar. For support regarding the tool or software itself, visit LEMP Support.