Skip to content
Follow
Ubuntu Linux

How to Install LEMP on Google Cloud Server

Richard
Written by
Richard
Dec 2, 2021 Updated Jul 14, 2026 4 min read
How to Enable or Disable Microsoft Defender Cloud Protection
How to Enable or Disable Microsoft Defender Cloud Protection

LEMP on Google Cloud installs a popular web server setup on your virtual server. LEMP stands for Linux, Nginx (the web server), MySQL (for databases), and PHP (for programming). This combination powers many popular websites and apps.

⚡ Quick Answer

Connect to your Google Cloud server via SSH. Install Nginx, then PHP, and finally MySQL or MariaDB using apt commands. This completes the LEMP stack installation.

This guide shows you how to set up the LEMP stack on a Google Cloud server running Ubuntu Linux. You’ll learn to install the necessary software to build functional websites and applications.

LEMP is a set of software programs that work together to run dynamic websites. It’s a common choice for content management systems like WordPress.

Now that you’ve learned how to create a website domain, set up a Google Cloud server, and installed Apache, Nginx, PHP, MySQL, or MariaDB, you can continue below to tie all together with any platform that uses the LEMP stack.

When we started this series, we said a web server allows content to be published and served to web clients and audiences browsing your website. A PHP or server-side scripting language allows for a dynamic and more functional website. A database server allows you to store your website content efficiently.

Other software and packages may also be needed to enhance the functionality of a website. Below, we’ll show you how to install these tools with LEMP-based websites and applications.

In our first post, we also mentioned that after creating a domain name, it can’t be used until it is forwarded or pointed to a server. The second post showed you how to point a domain to a server we created. Then we showed you how to install software and packages to help us run a website online.

We’re ready to connect to our Google Cloud server and install LEMP by tying the software and packages installed in our previous posts.

How to connect to Google Cloud servers

Google Cloud servers (Compute Engine) let you connect using SSH from the browser window to your virtual machine (VM) instance within the Google Cloud Console

SSH from the browser supports several web browsers:

  • Web browsers
    • The latest version of Google Chrome
    • Firefox
    • Microsoft Edge
    • Microsoft Internet Explorer 11 and later
    • Safari 8 and later. Note that Safari in private browser mode is not supported.
  • Virtual machine configurations
    • All Linux VM images are natively available in Google Cloud.

No additional software or browser extensions are needed. Log in to Google Cloud Console and go to Menu ==> Compute Engine ==> VM instances.

In the list of virtual machine instances, click SSH in the row of the instance that you want to connect to.

Establish SSH connection to Google Cloud Ubuntu server instance
establish ssh connection to vm instances

Alternatively, you can open an SSH connection to an instance by clicking its name and SSH from the instance details page.

An SSH terminal window with the Ubuntu Linux instance created in the series’s second post will open.

You should now be able to run commands in Ubuntu Linux created on the Google Cloud server.

Connect to Google Cloud instance host for LEMP installation
connect to google cloud instance host

How to install the LEMP stack on Google Cloud Servers

Installing and managing the LEMP stack on Ubuntu Linux is no different, whether on Google Cloud servers or a local VM instance.

All the previous posts above are related to installing LEMP, except for installing Apache. LEMP is Linux (Ubuntu), Engine-x, MySQL or MariaDB, and PHP.

Once you’ve installed all required packages, you should be able to access the LEMP stack from your browser by browsing to the server hostname or IP address.

Below is a detailed post and help installing the LEMP stack on Ubuntu Linux. Use this link to learn more about LEMP.

How to install LEMP on Ubuntu Linux

That should do it!

Conclusion:

Installing the LEMP stack on Google Cloud servers with Ubuntu Linux empowers you to build powerful websites and applications. Here are the key takeaways:

  • LEMP stands for Linux, Nginx (Engine-x), MySQL/MariaDB, and PHP, a widely used stack for modern web development.
  • Properly understanding the components—web server, server-side scripting, and database management—is essential for dynamic content delivery.
  • Following our series ensures a structured approach to creating a domain, setting up Google Cloud servers, and installing the necessary software.
  • Having completed the installation, you can now effectively host and manage LEMP-based websites.
  • Explore additional tools and packages to further enhance your site’s capabilities beyond the basic LEMP installation.

By leveraging the power of the LEMP stack, you’re well on your way to building robust online presences!

Was this guide helpful?

Tags: #Windows 11
Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Mount Windows 11 Shares on Ubuntu Linux
Ubuntu Linux How to Mount Windows 11 Shares on Ubuntu Linux
How to Install GNOME Desktop on Ubuntu 24.04
Ubuntu Linux How to Install GNOME Desktop on Ubuntu 24.04
How to Install KDE Desktop on Ubuntu 24.04
Ubuntu Linux How to Install KDE Desktop on Ubuntu 24.04
How to Install Google Chrome on Ubuntu Linux
Browsers How to Install Google Chrome on Ubuntu Linux

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *