# GCP

We need a properly configured Ubuntu host to run DoltLab on. This will take a few steps. Start by going to [Google Cloud Platform console](https://console.cloud.google.com/).

## Create a GCP Project

Let's create a new project for our DoltLab. Click Create Project and you'll be greeted by this screen.

![Create Project](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-415682ab967adb3a003c6e3c1a39a53b32d3c5c6%2Fdoltlab-gcp-create-project.png?alt=media)

This takes a couple seconds and then you need to switch to the project.

![New Project](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-e5b9feb2c430fff565b5af493ac99e554540c60c%2Fdoltlab-gcp-new-project.png?alt=media)

Google really wants me to use Gemini. I can't get rid of that pop up.

## Procure a New Compute Engine Instance

Now, we need a compute engine instance. Click Compute Engine and the click Enable. Compute Engine does not seem to be on by default for new projects. This takes a couple minutes but once enabled you'll be greeted with this screen.

![Compute Engine](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-31d1fc11909676f96d4fcd4db1a55e9ffd6b21ce%2Fdoltlab-gcp-compute-engine.png?alt=media)

Click Create Instance.

![Create Instance](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-f186dfdb1738692c75659cc656312d4815701fee%2Fdoltlab-gcp-create-instance.png?alt=media)

Call it something cool. I called mine `doltlab-getting-started`.

Now, you need to hit the DoltLab minimum hardware requirements; 4CPUs, 16GB of RAM, and 300GB of disk. For this, I select the E2 family of instance (because it's the default) and then in the "Machine Type" drop down I switch to "Standard" and select the "4CPU, 16GB RAM" option.

![Machine Configuration](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-63b8af2c108fae3e99ba600d7c6215257055bbc2%2Fdoltlab-gcp-machine-configuration.png?alt=media)

Now, it's time to change the Operating System and the disk size under the Boot Disk section.

![Default Boot Disk](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-9102f542b093e22dca680fa02b5e102353056533%2Fdoltlab-gcp-default-boot-disk.png?alt=media)

It looks like GCP defaults to Debian with 10GB of disk. We need Ubuntu with 300GB of disk.

![Proper Boot Disk](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-685423f091b19a0afae6a4141fca133f629c4a00%2Fdoltlab-gcp-proper-boot-disk.png?alt=media)

Much better. Either Debian 22.04 or 24.04 will work with DoltLab.

Finally, on this page, we'll enable HTTP traffic under the Firewall section. We'll need a few more ports open but we do that after the instance is created.

![Proper Boot Disk](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-761709a1ae6c2190c3cfb7034ebbe98d8fd9e245%2Fdoltlab-gcp-enable-http.png?alt=media)

Let's fire this baby up by clicking "CREATE". After a couple minutes I have a running instance.

![Running Instance](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-3d6f6b7e3d3beec259ec2209960ec8f4f8c6f1c1%2Fdoltlab-gcp-running-instance.png?alt=media)

Make note of your public IP. You'll need this to install DoltLab on the host. Ours is 34.171.211.99.

## Open the Required Ports

We need to open a few more ports for DoltLab to operate correctly. Click "Set Up Firewall Rules" and the "Create new Firewall Rule".

![New Firewall Rule](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-ce650bd14dcadd187e6f5a96208e80522449e5a2%2Fdoltlab-gcp-firewall-rule.png?alt=media)

In "Actions on Match", select "All instances in Network" and enter a Source IPv4 range as `0.0.0.0/0` or the entire range. We want the whole internet to see this wonderful DoltLab we're creating.

![Actions on Match](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-aa33e15db672187c5e8d2fc5afb068588acf515a%2Fdoltlab-gcp-actions-on-match.png?alt=media)

Scroll down to Protocols and Ports, enable TCP on port 100.

![Protocols and Ports](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-3063895911a3fe5b56793f96d74a2d1c2de2d151%2Fdoltlab-gcp-protocols-and-ports.png?alt=media)

Click "CREATE".

Rinse and repeat for ports 4321 and 50051. After your done, you're firewall rules should look like this.

![Proper Firewall Rules](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-89236f02b997803349db483ef6fb95919371bf37%2Fdoltlab-gcp-proper-firewall-rules.png?alt=media)

## SSH to the host

GCP has a cool SSH in browser that I'll use.

![SSH Button](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-f93e6171410f3f7d6c6bb96c883cd8120057cd8e%2Fdoltlab-gcp-ssh-button.png?alt=media)

This opens a new browser window for you to SSH with. Click authorize and you should be greeted with an in browser terminal window connected to your new instance.

![SSH Window](https://862511882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7MQxOUbJbb54nzvoLAi0%2Fuploads%2Fgit-blob-987edfe0ff5716acf75f9758124356d22882beef%2Fdoltlab-gcp-ssh-window.png?alt=media)

Pretty slick Google. Pretty slick.

Now that you have a DoltLab ready host, [continue the Getting Started guide](https://docs.doltlab.com/introduction/getting-started/..#download-doltlab-and-its-dependencies)
