Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
To install NGINX on a Google Cloud server, create or select a Linux Compute Engine virtual machine, allow the required VPC firewall traffic, connect with SSH, and install the package with your distribution’s package manager. On a Debian-based VM, the basic installation is sudo apt-get update followed by sudo apt-get install -y nginx. You then verify the service locally and browse to the VM’s external IP. If the local test works but the external address does not, the problem is usually the VM’s external address, network tag, or VPC firewall rule—not NGINX itself.
What does installing NGINX on a Google Cloud server involve?
NGINX runs on a Linux Compute Engine VM as a web-server process. Google Cloud provides the virtual machine, network interface, external address, and VPC firewall controls; the Linux distribution supplies NGINX through its package manager. A working public site therefore requires both a correctly installed service and a network path to it.
As an Amazon Associate I earn from qualifying purchases.
The procedure has four distinct parts:
- Create or choose a Linux Compute Engine VM.
- Give it a public external IP when the site must be reachable from the internet.
- Permit TCP port 80 for HTTP, and TCP port 443 only when you have configured HTTPS.
- Install, start, and test NGINX from the VM and from an outside client.
The commands below use a Debian-family image, such as Debian or Ubuntu, where apt-get is available. Other Linux distributions use different package-manager commands, but the Google Cloud networking steps are the same.
What do I need before creating the VM?
You need a Google Cloud project with Compute Engine access, a selected zone, and a Linux image. Decide whether the service is public or private before opening firewall access.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
- Public website: assign a public external IP and allow inbound TCP 80 from the internet if you intend to serve ordinary HTTP.
- Private or administrative service: use a narrower source range instead of allowing every IPv4 address.
- HTTPS site: plan for TCP 443 after TLS is configured. Opening 443 by itself does not create HTTPS or install a certificate.
- Automation: prepare a startup script if every VM in a group should install NGINX automatically at boot.
During deployment, record the VM name, zone, network, network tags, and external IP. The tag matters because a VPC firewall rule can be applied only to instances carrying the tag selected by that rule.
How do I create a Google Cloud VM for NGINX?
Create a Linux Compute Engine instance and enable the HTTP option if you want Google Cloud to create or associate the standard HTTP firewall access for the VM. Enable the HTTPS option only when you will configure TLS as well.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsUsing the Google Cloud console
- Open Compute Engine and choose VM instances.
- Select Create instance.
- Choose a Linux boot disk and a zone appropriate for your deployment.
- Under the networking or firewall options, select Allow HTTP traffic. Select Allow HTTPS traffic when the VM will serve configured HTTPS.
- Review the network tags assigned to the instance. The HTTP option maps to TCP port 80, while the HTTPS option maps to TCP port 443.
- Create the instance and wait until its status is running.
If the site must be accessed from outside Google Cloud, verify that the VM has an external IPv4 address. An internal address is suitable for traffic inside the VPC or connected networks but is not directly browsable from the public internet.
Which firewall ports must be open for NGINX?
Public HTTP requires an ingress rule for TCP 80. Public HTTPS requires an ingress rule for TCP 443 after TLS is configured. The rule must target the VM, either through its network tag or another supported target mechanism.
| Traffic | Port and protocol | Typical source | When to allow it |
|---|---|---|---|
| HTTP | TCP 80 | 0.0.0.0/0 for a public site, or a narrower range for private use |
When serving unencrypted HTTP or redirecting HTTP to HTTPS |
| HTTPS | TCP 443 | 0.0.0.0/0 for a public site, or a narrower range for private use |
Only after NGINX has been configured with TLS |
| SSH administration | TCP 22 | Your administrative source range or approved access path | For SSH management; do not broaden it unnecessarily |
Google Cloud’s web-server guidance describes an ingress rule allowing TCP 80 from 0.0.0.0/0 for public HTTP and requires that the VM carry the network tag targeted by the rule. The console’s Allow HTTP traffic option is the quickest path for a basic test VM, but production systems should use the narrowest source ranges and targets that meet the requirement.
How do I connect to the VM and install NGINX?
Connect over SSH, refresh the package metadata, and install the distribution package. The following commands are the documented flow for a Debian-based Compute Engine VM.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
- In the VM instances page, click SSH for the running instance, or use an approved SSH client.
- Refresh package metadata:
sudo apt-get update
- Install NGINX:
sudo apt-get install -y nginx
The package installation normally creates the NGINX service and starts it on a standard Debian-family image. Confirm rather than assuming that it is running:
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
ps auwx | grep nginx
sudo systemctl status nginx
The process listing should show the NGINX master and worker processes, and systemctl status should report an active service. If the package command fails, read the apt error before retrying; a repository, DNS, or interrupted package transaction problem must be fixed at the operating-system level.
How do I verify that NGINX is serving pages?
Test in two directions: first from inside the VM, then through its external address. This separates an NGINX installation problem from a Google Cloud networking problem.
Test locally on the VM
curl -I http://127.0.0.1
A successful response header confirms that a process on the VM answered an HTTP request on the loopback interface. If this fails, inspect sudo systemctl status nginx, then check whether another service is already using the HTTP listener or whether the package installation completed.
Test through the external address
curl -I http://EXTERNAL_IP
Replace EXTERNAL_IP with the VM’s current public address. You can also enter http://EXTERNAL_IP in a browser. A correctly installed default site should display the default NGINX page at that address.
Do not use an internal address for a test from an unrelated internet connection. If the VM has no public address, the browser test must come from a network that can route to the internal address, such as the same VPC or an authorized connected network.
Why can I reach NGINX locally but not through the external IP?
When curl -I http://127.0.0.1 succeeds but the external request fails, focus on Google Cloud’s path to the VM. NGINX is already answering locally; the usual causes are an absent external IP, a missing firewall rule, or a tag mismatch.
Check the external address
Confirm that you are using the address currently shown for the VM, not an old address from a previous instance. If the VM was recreated or its ephemeral address changed, update the URL and any DNS record accordingly.
Recommended Free Tools
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Check the VPC firewall rule
Verify that an ingress rule allows TCP 80 and that its source range includes the client making the request. A private service should use a specific corporate, VPN, or administrator range rather than 0.0.0.0/0.
Check the network tag
Inspect the VM’s network tags and compare them with the target tags in the firewall rule. The web-server guidance requires the instance to carry the tag that the rule targets. A rule aimed at http-server, for example, will not apply to an instance that lacks that tag.
Check the protocol and listener
Use an HTTP URL for port 80 unless you have explicitly configured TLS. Opening TCP 443 does not make NGINX answer HTTPS, and an HTTPS request can fail if no certificate and TLS server block have been configured.
Check again from both sides
Repeat the local loopback request and then the external request after every network change. This two-test sequence identifies whether a change affected NGINX itself or only ingress access.
Can Google Cloud install NGINX automatically when the VM is created?
Yes. Compute Engine supports a Linux metadata startup script that runs during VM boot. On public Compute Engine images with the guest environment installed, Compute Engine copies the script to the VM, sets execute permissions, and runs it as root.
Create a file named nginx-startup.sh with this content:
#!/bin/bash
apt-get update
apt-get install -y nginx
systemctl enable --now nginx
The script updates package metadata, installs NGINX without an interactive prompt, enables it for future boots, and starts it immediately. Because it runs as root, the commands do not need sudo.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Attach the script in the console
- Open Compute Engine and choose Create instance.
- Expand the advanced or management settings and locate the Startup script field.
- Paste the script, or provide the equivalent metadata value when creating the VM.
- Keep the HTTP firewall option enabled if the installed service must be publicly reachable.
- Create the instance and wait for the first boot to finish before testing the external address.
Attach the script with gcloud
For repeatable deployments, pass the script from a local file:
gcloud compute instances create nginx-vm
--zone=ZONE
--image-family=debian-12
--image-project=debian-cloud
--tags=http-server
--metadata-from-file=startup-script=nginx-startup.sh
Replace ZONE with the deployment zone and confirm the image family, project, and command-line flags against the current Google Cloud documentation before use. Google Cloud also supports supplying a script directly as metadata or storing a larger script in Cloud Storage. The VM still needs a firewall rule whose target matches the http-server tag, plus a public external IP for internet access.
How do I diagnose a startup script that did not install NGINX?
First confirm that the image includes the guest environment required for startup-script execution; public Compute Engine images include it. Then check the VM’s boot and serial-console information for script errors, connect over SSH, and run sudo systemctl status nginx. A script can fail because the package repository was temporarily unavailable, the selected image is not Debian-based, or a command returned an error before the service was enabled.
Should I use open-source NGINX or NGINX Plus?
For a normal web server, the open-source NGINX package supplied by the Linux distribution is the simplest starting point. NGINX Plus is a separate enterprise deployment option and is not required for a basic Compute Engine installation.
| Consideration | Open-source NGINX package | NGINX Plus |
|---|---|---|
| Typical installation | Install with the VM distribution’s package manager, such as apt-get. |
Deploy through the separately documented enterprise image or package process. |
| Licensing and support | Open-source software maintained through the distribution and NGINX project channels. | Commercial licensing and enterprise support. |
| Updates | Follow the selected Linux distribution’s package and security-update process. | Follow the NGINX Plus package or image lifecycle supplied with the enterprise deployment. |
| Features and tooling | Core reverse-proxy and web-server capabilities. | Additional enterprise features and operational tooling, depending on the licensed release. |
| Basic Google Cloud web page | Available after package installation and service startup. | F5 documents an image in which NGINX Plus starts automatically and serves a default page after deployment. |
Choose the open-source package unless your organization specifically needs the commercial feature set, support arrangement, or deployment model. Do not install both variants on the same VM without a deliberate migration plan; they compete for the same web-server role and listener ports.
Free tools Windows power users keep installed
One-click scans. No signup required.
How should I handle HTTP, HTTPS, and exposure after installation?
Start with the smallest exposure that matches the service. HTTP on TCP 80 is enough to verify the default page. HTTPS needs a certificate, a TLS-enabled NGINX configuration, and TCP 443 allowed through the VPC firewall.
- Use a restricted source range when the site is for administrators, testing, or an internal application.
- Allow TCP 80 from the public internet only when the website is intended to be public.
- Open TCP 443 after TLS is configured; a firewall opening alone does not provide encryption.
- Keep SSH access restricted to the addresses or access path used by administrators.
- Apply operating-system updates and NGINX updates through the package-management process appropriate to the image.
Do not describe a VM as HTTPS-ready merely because the console’s HTTPS checkbox was selected. The checkbox creates network access; NGINX still needs a certificate and server configuration that listens for TLS connections.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
How do I manage NGINX after the first installation?
Use systemd to inspect and control the service. The same status check used during installation is the quickest way to confirm whether a later change stopped the server.
sudo systemctl status nginx
After editing a configuration, validate it before reloading:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallsudo nginx -t
If the test reports success, reload the service so existing connections are handled with minimal interruption:
sudo systemctl reload nginx
Use a restart only when a reload is insufficient or the service is not running:
sudo systemctl restart nginx
Keep the local and external curl -I checks available after changes. They provide a fast distinction between a configuration error, a stopped process, and a firewall or address problem.
What are the most common installation mistakes?
- Installing on a non-Debian image with apt: use the package manager for the selected distribution, or choose a Debian-family image if you intend to use the commands in this guide.
- Forgetting the public address: a VM without an external IP cannot be reached directly from the public internet.
- Opening the wrong port: HTTP uses TCP 80; HTTPS uses TCP 443 only after TLS is configured.
- Tag mismatch: the firewall rule may exist but not apply because the VM lacks the target network tag.
- Testing only in a browser: a browser hides useful distinctions. Run the loopback and external
curl -Itests and inspect the service status. - Assuming startup completion: a VM can be running while its boot script is still executing or has failed. Check service status and boot diagnostics before changing firewall rules.
- Opening broad access for a private service: replace public source ranges with the smallest range that needs access.
What is the shortest reliable installation checklist?
- Create a Linux Compute Engine VM in the required zone.
- Assign a public external IP if internet users must reach it.
- Enable Allow HTTP traffic; enable HTTPS access only when TLS will be configured.
- Connect over SSH.
- Run
sudo apt-get update. - Run
sudo apt-get install -y nginx. - Confirm the process with
ps auwx | grep nginxand the service withsudo systemctl status nginx. - Run
curl -I http://127.0.0.1on the VM. - Run
curl -I http://EXTERNAL_IPfrom the VM or another permitted client. - If only the external test fails, inspect the external IP, VPC firewall rule, source range, and network tag.
This sequence gives you a functioning open-source NGINX web server while keeping installation, service verification, and Google Cloud networking as separate checks.
Frequently Asked Questions
Where can I find NGINX’s default web files on a Debian-based VM?
The distribution package places the default site and configuration under the standard NGINX directories on the Linux image. Use the package’s installed configuration and site files as the authoritative locations for that image, because paths can differ between distributions and package builds.
How can I see why a request returned an error?
Inspect the NGINX access and error logs on the VM and correlate their timestamps with your test request. Also compare the HTTP status from curl -I with the service status; a response from NGINX indicates that traffic reached the process even if the requested resource or configuration is wrong.
Can I run the startup script again after changing it?
A metadata startup script is intended to run during VM boot. For a one-time correction, connect over SSH and run the commands manually; for repeatable provisioning, update the metadata and recreate or reboot according to your deployment process, then verify the result from the service status and boot diagnostics.
Do I need a load balancer for one NGINX VM?
No. A single VM with an external IP can serve HTTP directly. Add a load-balancing design only when your availability, scaling, or traffic-management requirements justify multiple backends.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

