How to Install Nginx on Google Cloud Server
Installing Nginx on a Google Cloud server sets up a fast web server that can handle lots of visitors for your websites. Nginx is a free program that efficiently sends web pages and application data to people’s browsers.
This tutorial focuses on installing Nginx on an Ubuntu Linux system within Google Cloud. A common setup means Nginx will listen on port 80 for regular web traffic.
Getting Nginx working on your Google Cloud server means you have a powerful tool ready for hosting websites and web applications right away.
Connect to your Google Cloud server via SSH. Then, open your terminal and run the commands sudo apt update and sudo apt install nginx.
How to connect to the Google Cloud server
You can connect to your Google Cloud server using SSH directly from your web browser, with no extra software needed. The Google Cloud Console makes opening an SSH session and managing your server quick. This browser-based SSH works with popular web browsers like Google Chrome, Firefox, and Microsoft Edge.
SSH from the browser supports these web browsers: Latest Google Chrome, Firefox, Microsoft Edge, Internet Explorer 11+, and Safari 8+. Note that Safari in private browsing mode isn’t supported.
- Web browsers
- The latest version of Google Chrome
- Firefox
- Microsoft Edge
- Microsoft Internet Explorer 11 and later
- Safari 8 and later. Note that Safari is not supported in private browser mode.
- Virtual machine configurations
- All Linux VM images are natively available in Google Cloud.
No extra software or browser extensions are required. Log into the Google Cloud Console and navigate to Menu ==> Compute Engine ==> VM instances.
In the list of virtual machine instances, click SSH in the row of the instance you want to connect to.

Alternatively, you can open an SSH connection to an instance by clicking its name and then 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 can now run commands in Ubuntu Linux created on the Google Cloud server.

How to install Nginx on Ubuntu Linux on Google Cloud Server
Installing Nginx on your Ubuntu Linux Google Cloud server is possible because Ubuntu includes Nginx within its default software repositories (sources for installing applications). You can get the Nginx web server running with just a couple of commands in your terminal. This quick installation uses the apt-get command, making it very fast to get Nginx running on your Google Cloud server.
Nginx packages are available directly in Ubuntu’s default software repositories. You’ll use commands like apt-get to install the Nginx HTTP server on Ubuntu Linux.
For more details on installing and managing Nginx on Ubuntu Linux, check out this other post. It offers a deeper dive.
How to install Nginx on Ubuntu Linux
Go ahead and type your domain name in your browser; you should see an example page similar to the one below:
http://example.com

As you can see, your server hosted on Google Cloud is now resolving your domain name and server content with the Nginx HTTP web server.
We’ll continue to add other servers and software so you can run a functional website online.
Conclusion:
Installing the Nginx HTTP server on your Google Cloud server is a crucial step in establishing your online presence. Here are the key points to remember:
- Nginx is a popular open-source web server that efficiently serves web content.
- You can connect to your Google Cloud server using SSH through your web browser.
- Installing Nginx on Ubuntu Linux is straightforward and requires the use of
apt-getcommands. - After installation, your domain should display the default Nginx help page, confirming that your server is operational.
- This guide is part of a series that aims to help you build a fully functioning website online, including domain creation and server setup.
By following these steps, you are well on your way to managing your website and leveraging the power of Google Cloud services.
What is nginx in GCP?
NGINX Plus, a platform for high-performance application delivery, acts as a load balancer and web server. It’s available on Google Cloud Platform as a virtual machine (VM) image. The VM image contains the latest version of NGINX Plus, optimized for use with the Google Cloud Platform Compute Engine.
Was this guide helpful?
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.
No comments yet — be the first to share your thoughts!