> For the complete documentation index, see [llms.txt](https://docs.scrt.network/secret-network-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scrt.network/secret-network-documentation/secretvm-confidential-virtual-machines/launching-a-secretvm/bring-your-own-gcp-project.md).

# Bring Your Own GCP Project

## Using SecretAI Portal

You can deploy a SecretVM directly into a Google Cloud project you control.

Your own GCP billing account is used for VM and infrastructure resources.

SecretAI charges a separate **Service Fee** for the platform layer.

{% hint style="info" %}
We strongly recommend creating a **dedicated GCP project** solely for SecretVM deployments. This keeps billing, IAM policies, and resources isolated from your other projects.
{% endhint %}

{% stepper %}
{% step %}

#### Prepare your GCP project

* Open the [Google Cloud Console](https://console.cloud.google.com/)
* Create a new project, or choose an existing one you control
* Make sure you have **Owner** access
* Enable these APIs for the project:
  * **Compute Engine API**
  * **Cloud Storage API**
    {% endstep %}

{% step %}
**Create a service account**

* In the GCP Console, go to **IAM & Admin → Service Accounts**
* Click **Create Service Account**
* Set a clear name, such as `secretvm-deployment`
* Click **Create and Continue**

<figure><img src="/files/Z09KmRruqpMK9GmC4XiD" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Assign required roles**

Grant the service account these roles:

* **Compute Admin** — `roles/compute.admin`
* **Storage Admin** — `roles/storage.admin`

Then click **Done**.

<figure><img src="/files/i8O7ZI3MHYnbYFfGNOUy" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Create a JSON key**

* Open the service account you created
* Go to the **Keys** tab
* Click **Add key** → **Create new key**
* Select **JSON**
* Click **Create**

GCP downloads the key file to your machine. Keep this file secure.

<figure><img src="/files/7clLCdx9OHa8gGUrKLF8" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/CrUb9h6nQTKkQxNYGikx" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Create a New SecretVM**

* Visit [https://secretai.scrtlabs.com](https://secretai.scrtlabs.com/)
* Click **`Create New SecretVM`**
* Under **Cloud Provider**, choose **Google Cloud**
* Enable the **Deploy to Your Own GCP Project** toggle
* Paste the full contents of the key file into **GCP Service Account Key (JSON)**

The VM type cards show a **Service Fee** label.

GCP bills VM and infrastructure resources directly to your project. The portal charges the separate **Service Fee**.

<figure><img src="/files/wOdagHoofC6NqdyuqW1S" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Configure Your Machine**

* **Select VM Type**\
  Choose `large` or `xlarge`
* **Upload Docker Compose File**\
  Upload your `docker-compose.yaml`
* **Set Secret Environment Variables (Optional)**\
  Add environment variables that are injected securely at runtime
* **Additional Ports (Optional)**\
  Ports `80`, `443`, and `29343` are opened automatically. Add any extra app ports you need.
  {% endstep %}

{% step %}
**Launch the VM**

* Click **`Launch your SecretVM`**
* The first BYO deployment usually takes **5–7 minutes**
* The VM is created in your GCP project
  {% endstep %}
  {% endstepper %}

## Default open ports

| Port  | Usage                        |
| ----- | ---------------------------- |
| 80    | HTTP                         |
| 443   | HTTPS                        |
| 29343 | SecretVM attestation service |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.scrt.network/secret-network-documentation/secretvm-confidential-virtual-machines/launching-a-secretvm/bring-your-own-gcp-project.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
