# On Google Cloud

At the end, you have a box on Google Cloud, a Compute Engine VM instance in Google's words, with Docker on it, and a Terminal on it in your browser.

## At a glance

**Time:** 15 minutes, then [Any Linux computer with Docker](any-box.md).

**What you need:**

- A Google Cloud project with billing turned on
- About 25 to 35 dollars a month while the box runs

**Steps:**

1. Rent the box
2. Connect to it
3. Install Docker

## Steps

1. **Sign in to the Google Cloud console, type Compute Engine in the search bar at the top and open VM instances.** If Google asks you to enable the Compute Engine API, press **Enable** and wait a minute.
2. **Press Create instance** and fill it in:
   - **Name:** `loopgate-runner`.
   - **Region:** the one nearest your team.
   - **Machine configuration:** **General purpose**, series **E2**, machine type **e2-medium** (2 processors and 4 GB of memory).
   - **OS and storage** (called **Boot disk** in some versions): press **Change**, choose **Ubuntu**, **Ubuntu 24.04 LTS** marked **x86/64**, not Arm, and **30** GB, then **Select**.
   - **Networking:** under **Firewall**, leave **Allow HTTP traffic** and **Allow HTTPS traffic** unchecked. Nothing should come in but SSH.
3. **Press Create.**

   You should see: your instance in the list with a green tick after a minute.

4. **Press SSH on your instance's row.** Google opens a Terminal on the box in a new browser window; you need no key file.

   You should see: a prompt that ends with `loopgate-runner:~$`.

   > Google's default network lets SSH in from anywhere, guarded by Google's own keys. Leave it as it is unless your company requires otherwise.

5. **Install Docker with Docker's own script.**

   ```sh
   curl -fsSL https://get.docker.com | sudo sh
   ```

   You should see: a few minutes of output ending with a note about running Docker as a non-root user.

6. **Let your user run Docker without `sudo`.**

   ```sh
   sudo usermod -aG docker $USER
   ```

7. **Close the SSH window, then press SSH again**, so the change takes hold.

## Check

Docker answers without `sudo` with `Docker Compose version v2.` followed by more numbers:

```sh
docker compose version
```

## Next

Your box is ready. Paste the command from the portal: [Any Linux computer with Docker](any-box.md).

## If something is off

- **Google asks you to enable the Compute Engine API.** Press **Enable** and wait a minute.
- **Docker says permission denied.** Close the SSH window and press **SSH** again (step 7).

## Doing it by hand

Once Docker answers, [By hand](by-hand.md) sets the runner up from files instead of the portal's line.
