> For the complete documentation index, see [llms.txt](https://deploydocs.coronasafe.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://deploydocs.coronasafe.network/cloud-deployment-overview/google-cloud-deployment/create-storage-buckets.md).

# Create storage buckets

### Create 2 storage buckets

GoTo: Cloud Storage > buckets > create ([link](https://console.cloud.google.com/storage/create-bucket))

1. Create a publicly accessible bucket for facility images:
   1. Name: **\<prefix>-care-facility**
   2. Location type: **Region**
   3. Location: **asia-south1 (Mumbai)**
   4. Default storage class: **Standard**
   5. Public access prevention: **Off**
   6. Access control: **Uniform**
   7. Protection tools: **None**
2. Create a private bucket for patient data.
   1. Name: **\<prefix>-care-patient-data**
   2. Location type: **Region**
   3. Location: **asia-south1 (Mumbai)**
   4. Default storage class: **Standard**
   5. Public access prevention: **On**
   6. Access control: **Uniform**
   7. Protection tools: Retention policy: **7 days**

### Setup access keys

Go to Cloud Storage > Settings > Interoperability ([link](https://console.cloud.google.com/storage/settings;tab=interoperability))&#x20;

1. Under Access keys for service accounts, click on Create a key for a service account
2. Click create a new service account:
   1. Name: **care-bucket-access**
   2. Click “Create and continue”
   3. Role: Storage Object Admin under Cloud Storage
   4. Click "Continue" then "Done"
3. Select **care-bucket-access** and click on create key
4. Note down the Access key and Secret for later

### Configure CORS:

1. Activate Cloud Shell
2. Create a file bucket-config.json with the following contents

```json
[
   {
     "origin": ["https://care.ohc.network", "https://care.coronasafe.in"],
     "method": ["GET", "PUT"],
     "responseHeader": ["*"],
     "maxAgeSeconds": 3600
   }
]
```

3. Replace the origin with your deployed frontend URLs
4. Apply config for buckets using gcloud cli

{% code overflow="wrap" %}

```bash
gcloud storage buckets update gs://<prefix>-care-facility --cors-file=bucket-config.json
```

{% endcode %}

{% code overflow="wrap" %}

```bash
gcloud storage buckets update gs://<prefix>-care-patient-data --cors-file=bucket-config.json
```

{% endcode %}
