# Google Cloud Platform (GCP)

Welcome to the SendingNetwork Testnet Mining tutorial! This guide is designed for both developers and non-developers interested in running a relay node on the SendingNetwork. We'll walk you through setting up a Virtual Private Server (VPS) on Google Cloud Platform (GCP), installing Ubuntu, and running a script that boosts up our node with a few commands. Don't worry if you have no coding experience; we'll keep things simple and straightforward.

### Step 1: Create a Google Cloud Platform Account

1. Go to the [Google Cloud Platform website](https://cloud.google.com/).
2. Click on the "Get started for free" button.
3. Sign in with your Google account or create a new one.
4. Follow the on-screen instructions to set up your GCP account. You might need to provide billing information, but GCP offers a free trial with $300 credit.

### Step 2: Create a New Project

1. Once logged in, go to the GCP Console.
2. At the top of the page, next to "Google Cloud Platform," you'll see a dropdown. Click on it and select "New Project."<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2FSW5APIxBQa4GdyRBm9Ln%2FScreenshot%202024-03-28%20at%205.42.58%20PM.png?alt=media&#x26;token=4747775a-2532-45e3-878e-12c02936974d" alt=""><figcaption></figcaption></figure>
3. Enter a project name and click "Create."

### Step 3: Set Up a Virtual Private Server (VPS)

1. In the GCP Console, click on the three horizontal lines in the left upper corner of the screen, then select "Compute Engine" > "VM instances."<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2F2rADvc3qQV7zRHFllFip%2FScreenshot%202024-03-28%20at%205.45.35%20PM.png?alt=media&#x26;token=f359d97f-3c29-43ae-851a-6d7a6ff1238c" alt=""><figcaption></figcaption></figure>
2. Click "Create Instance." If you don't see this button, click "ENABLE" first.

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2Fs9epXzk0OCgYknykPOQC%2FScreenshot%202024-03-28%20at%205.54.17%20PM.png?alt=media&#x26;token=56162ffa-b9e8-4858-b7da-ede2060fe3dd" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2FeGYSy8pMIFn6mSi5CnOs%2FScreenshot%202024-03-28%20at%205.58.15%20PM.png?alt=media&#x26;token=5cc90fcf-3595-4680-9fe6-d6e5e0501231" alt=""><figcaption></figcaption></figure>
3. Name your instance and choose a region.
4. In the machine type section, click on “Custom”. Configure it with 4 vCPUs for “Cores” and 8 GB for “Memory”.<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2FezYxDrhsAsHHC58dP1lF%2FScreenshot%202024-03-28%20at%206.03.51%20PM.png?alt=media&#x26;token=7c7e9d21-84d0-488c-a9aa-867d85c3b44f" alt=""><figcaption></figcaption></figure>
5. In the "Boot disk" section, click "Change," select "Ubuntu," and choose "Ubuntu 20.04 LTS" with X86/64 architecture. Set the disk size to 200 GB.<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2FJXt6DMUzQAA1rhFsdR8t%2FScreenshot%202024-03-28%20at%206.07.32%20PM.png?alt=media&#x26;token=36187c69-ed4d-4685-9f68-e449dcc40bc2" alt=""><figcaption></figcaption></figure>
6. Click "Create" to set up your VPS.

### (Edge Node Only) Step 4: Configure the firewall

1. In the GCP Console, click on the three horizontal lines in the left upper corner of the screen, then select "VPC network" > "Firewall".<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2Fls4EtGCugXcqVhn50yQ0%2FScreenshot%202024-03-29%20at%2011.03.41%20AM.png?alt=media&#x26;token=4610e531-38f3-46ad-bdf7-0d2ae26b0cbb" alt=""><figcaption></figcaption></figure>
2. Click "CREATE FIREWALL RULE" on the top:<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2FmhNC5yVuptL3dgtx4mCp%2FScreenshot%202024-03-29%20at%2011.04.28%20AM.png?alt=media&#x26;token=81b670c9-fbb4-451d-8811-07ff2db5b2b3" alt=""><figcaption></figcaption></figure>
3. Enter the rule name in the "Name" field.<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2FG2WBxnAZe4dxC7NDKHhV%2FScreenshot%202024-03-29%20at%2011.06.12%20AM.png?alt=media&#x26;token=9614f34a-d545-4c07-9002-2661886df539" alt=""><figcaption></figcaption></figure>
4. Select "Specified target tags" from the "Target" dropdown menu to ensure the firewall rule is applied only to certain instances within the virtual network. Afterwards, assign a tag to these instances by typing the tag name "relayrule" in the "Target tags" field.
5. Enter "0.0.0.0/0" in the "Source IPv4 ranges" field. Select "Specified protocols and ports," tick the "TCP" option, and specify the ports to open by entering "9085,15858,9702,2112." Click "CREATE" to add the firewall tag.<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2FGRzFUnbKE50kriGkrLdN%2FScreenshot%202024-03-29%20at%2011.07.22%20AM.png?alt=media&#x26;token=d73d3938-330e-491f-a94f-82dd2bbc0151" alt=""><figcaption></figcaption></figure>
6. Now go back to the instance page by clicking on the three horizontal lines in the left upper corner of the screen, then select "Compute Engine" > "VM instances."
7. Click on the instance to access its detail page.<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2FaQfU8jX9qYq9Q3Lv7IpD%2FScreenshot%202024-03-29%20at%2011.58.35%20AM.png?alt=media&#x26;token=d852e49e-3779-4e38-8b81-cbb46aee0fa3" alt=""><figcaption></figcaption></figure>
8. Click the "Edit" button.<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2FyvRs3MyqbUZdzjRwvYkY%2FScreenshot%202024-03-29%20at%2011.08.40%20AM.png?alt=media&#x26;token=5fa1147c-9f5c-4500-99c0-2c56ad7b26a2" alt=""><figcaption></figcaption></figure>
9. Enter the "relayrule" tag you previously created into the "Network tags" field, then click the "SAVE" button to complete the firewall configuration.<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2FmOztiwUHrtMCWCQWQkWi%2FScreenshot%202024-03-29%20at%2011.09.19%20AM.png?alt=media&#x26;token=be07401f-5d64-4a1d-8f54-07dc3b5e1cb5" alt=""><figcaption></figcaption></figure>

### Step 5: Access Your VPS

1. Go to the instance page. Click on the "SSH" button to open a terminal window directly in your browser.<br>

   <figure><img src="https://2753396368-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1hPSqZauZ9JZ15UAJezj%2Fuploads%2Ffk0j0fi90xjeftMLBkcn%2FScreenshot%202024-03-28%20at%206.12.51%20PM.png?alt=media&#x26;token=3e29c71a-57b7-45f1-ac15-2e8fb821730f" alt=""><figcaption></figcaption></figure>
2. You're now connected to your VPS!

### Conclusion

And that's it! You've successfully set up a VPS on Google Cloud Platform, installed Ubuntu 20.04 LTS with neccessary firewall configuration.

{% hint style="info" %}
Should you encounter any issues or have questions, don't hesitate to seek support from the SendingNetwork [community](https://t.me/SendingNetworkOfficial/1).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sending-network.gitbook.io/sending.network/edge-node/vps-setup-guide/google-cloud-platform-gcp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
