Skip to content
Follow
CMS Ubuntu Linux

How to Install Nginx on Google Cloud Server

Richard
Written by
Richard
Nov 26, 2021 Updated Aug 13, 2026 3 min read
How to Install VMware Workstation Player on Ubuntu Linux
How to Install VMware Workstation Player on Ubuntu Linux

Installing Nginx on a Google Cloud server sets up a fast web server that loads websites quickly, even when many people visit at once. Nginx is free software that sends web pages from your server to internet browsers.

This guide walks you through setting up Nginx on an Ubuntu Linux system running in Google Cloud so your server listens for web traffic on port 80. Once you finish these steps, your server is ready to host your website or web app.

⚡ Quick Answer

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

Connecting to your instance requires nothing more than a standard web browser, eliminating the need for separate terminal software. The Google Cloud Console makes opening an SSH session and managing your server quick. Browser-based SSH works natively in Google Chrome, Mozilla Firefox, Microsoft Edge, Internet Explorer 11 and later, and Safari 8 and later (though Safari’s private browsing mode is not 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.

Establishing SSH connection to Google Cloud server
establish ssh connection to vm instances

Alternatively, opening an SSH connection to an instance happens by clicking its name and then selecting SSH from the instance details page.

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

Running commands inside the Ubuntu environment on the Google Cloud server is now possible.

Connecting to Google Cloud instance host for Nginx installation
connect to google cloud instance host

How to install Nginx on Ubuntu Linux on Google Cloud Server

Installing Nginx on your Ubuntu Linux Google Cloud server works because Ubuntu includes Nginx within its default software repositories (sources for installing applications). Pulling down the web server requires a couple of commands in the terminal. The apt-get package manager handles the heavy lifting, pulling down and configuring the web server in seconds.

Nginx packages are available directly in Ubuntu's default software repositories. Utilizing tools like apt-get brings the Nginx HTTP server onto 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

⚠️Warning
The Nginx web server, installed on your Google Cloud server, now responds to domain name requests. Visitors accessing your domain will see the default Nginx welcome page, confirming the installation is successful.

Typing the domain name into a browser reveals an example page similar to the one below:

http://example.com

ubuntu self-signed nginx certs
nginx ssl ubuntu 1

The server hosted on Google Cloud now successfully resolves the domain name and serves content through the Nginx HTTP web server.

Additional servers and software will be integrated in upcoming steps to build a fully 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-get commands.
  • 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.

Following these procedures establishes a solid foundation for managing a 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?

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 Install Nginx on Ubuntu Linux
Ubuntu Linux How to Install Nginx on Ubuntu Linux
How to Use Microsoft Edge in Another Language
Windows How to Use Microsoft Edge in Another Language
How to Stop Microsoft Edge from Starting Automatically in Windows 11
Browsers How to Stop Microsoft Edge from Starting Automatically in Windows 11
How to Use Password Generator to Create more Secure Passwords in Microsoft Edge
Browsers How to Use Password Generator to Create more Secure Passwords in Microsoft Edge

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

Leave a Comment

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