If you want a remote desktop accessible directly from your browser, Apache Guacamole is the perfect lightweight solution.
This guide shows you, step-by-step, how to deploy Guacamole on a Google Cloud Platform (GCP) virtual machine.


Step 1: Prepare Your GCP Project

First, log in to the Google Cloud Console.
Make sure you have:

  • A billing account set up.

  • A project selected or created.

  • The Compute Engine API enabled.

If necessary, activate billing and create a new project.


Step 2: Create a New Virtual Machine (VM)

In the GCP Console:

  • Go to Compute Engine → VM instances.

  • Click Create Instance.

  • Choose a region close to you.

  • For Machine Type, select at least e2-medium (2 vCPUs, 4 GB RAM).

  • Under Boot Disk, click Change and select:

    • OS: Ubuntu 22.04 LTS

    • Disk Size: at least 30 GB recommended.

Leave other settings default.

  • Firewall:
    Enable Allow HTTP traffic and Allow HTTPS traffic.

Finally, click Create.


Step 3: Install Docker and Deploy Guacamole

Once your VM is running, connect via SSH.

Now, install Docker and deploy Guacamole:

bash
# Update system
sudo apt-get update
sudo apt-get upgrade -y

# Install Docker
sudo apt-get install -y docker.io

# Start and enable Docker
sudo systemctl start docker
sudo systemctl enable docker

# Run Guacamole container
sudo docker run --name guacamole --restart=always -d -p 80:8080 oznu/guacamole

This will:

  • Pull the lightweight Guacamole container.

  • Expose it on port 80 of your VM.


Step 4: Open Firewall for HTTP

If not already done, ensure port 80 is open:

bash
gcloud compute firewall-rules create allow-http \
--allow tcp:80 \
--target-tags=http-server \
--description="Allow HTTP traffic"

Now your VM will accept traffic on port 80.


Step 5: Access Guacamole via Browser

Open your browser and navigate to:

cpp
http://[YOUR_VM_EXTERNAL_IP]/

Login with:

  • Username: guacadmin

  • Password: guacadmin

Important:
After the first login, you will be forced to change the admin password.


Step 6: Configure Your First Remote Session

Inside Guacamole:

  • Go to Settings → Connections → New Connection.

  • Select VNC (or RDP if your VM is a Windows machine).

  • Set:

    • Hostname: localhost

    • Port: 5901 (VNC default)

    • Username/Password: if needed.

Save and start your remote desktop session directly in the browser.


Optional: Install a Desktop Environment (for Ubuntu Server)

If you deployed a minimal Ubuntu Server, install a GUI:

bash
sudo apt-get install -y ubuntu-desktop
sudo apt-get install -y tightvncserver

Start the VNC server:

bash
vncserver :1

This provides a simple desktop accessible through Guacamole.


Final Notes

  • Guacamole is fully HTML5 — no plugins or local installations required.

  • Using Docker simplifies maintenance — you can easily restart or update your Guacamole environment.

  • Always remember to secure your VM properly (e.g., restrict SSH access, use strong passwords, etc.).


Conclusion

Setting up Apache Guacamole on GCP is a powerful way to create a fully remote, browser-based desktop for management, development, or personal use.

With this setup, you can log into your cloud desktop from anywhere, using just a web browser — securely and efficiently.