Step 1: Create a Bucket
Via the Google Cloud CLI
Via the Google Cloud console
- Go to Cloud Storage > Buckets and select Create
- Enter a Name (globally unique)
- Under Location type, select Region and choose the region of your Tembo VM
- Leave Uniform access control selected and leave all other settings as default
- Select Create
Step 2: Create a Service Account and Key
Tembo signs browser upload and download URLs with a service account key, so the key is required even if your VM has an attached service account.Via the Google Cloud CLI
Via the Google Cloud console
- Go to IAM & Admin > Service Accounts and select Create service account
- Enter a name (for example,
tembo-storage) and select Done - Go to Cloud Storage > Buckets, open your bucket, and select the Permissions tab
- Select Grant access, enter the service account email, choose the Storage Object Admin role, and select Save
- Go back to IAM & Admin > Service Accounts, open the service account, and select the Keys tab
- Select Add key > Create new key, choose JSON, and select Create
client_email and private_key values in Step 4. Delete the file after you copy them.
If your organization policy blocks service account key creation (
iam.disableServiceAccountKeyCreation), ask your Google Cloud administrator for an exception for this project.Step 3: Configure CORS
Tembo uploads image attachments directly from the browser to Cloud Storage. Cloud Storage blocks these cross-origin requests by default, so you must add a CORS rule. Save the following ascors.json:
http://<vm-external-ip> with your domain.
Apply it to the bucket:
Step 4: Add to config.json
Open/var/lib/tembo/config.json (via the VS Code server at http://<vm-external-ip>:8888 or SSH) and add:
private_key exactly as it appears in the key file, including the -----BEGIN PRIVATE KEY----- line and the \n sequences.
Then restart all Tembo services:
config.json only when they start.