> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/fabricate/self-hosting-fabricate/configuring-fabricate/cloud-storage.md).

# Cloud storage

Fabricates stores uploaded and generated data in cloud storage. You can use either:

* Amazon S3 (or any other Amazon S3-compatible storage)
* Azure Blob Storage
* Google Cloud Storage
* Cloudflare R2
* Backblaze B2

## Identifying the cloud storage platform <a href="#cloud-storage-platform" id="cloud-storage-platform"></a>

To indicate which cloud storage platform to use, in **.env**, set the following environment variable:

```
FABRICATE_STORAGE_SERVICE=("amazon", "azure", or "google")
```

## S3 bucket <a href="#aws-s3-bucket" id="aws-s3-bucket"></a>

To use Amazon S3 to store generated data, in **.env**, set:

```
FABRICATE_STORAGE_SERVICE="amazon"
```

To set up the S3 bucket:

1. Create an S3 bucket in the AWS Region closest to where Fabricate will run.\
   \
   We recommend that you set the bucket name to `fabricate`.
2. To enable Fabricate to upload files to this S3 bucket, either:
   * In **.env**, configure `FABRICATE_AWS_ACCESS_KEY_ID` and `FABRICATE_AWS_SECRET_ACCESS_KEY`.
   * Assign an IAM role to the EC2 instances on which Fabricate runs.\
     The role must be able to write to the S3 bucket. For information on how to do this, go to this [AWS Knowledge Center article](https://repost.aws/knowledge-center/ec2-instance-access-s3-bucket).
3. In `.env`, set:

<pre data-overflow="wrap"><code>FABRICATE_S3_BUCKET=  #name of the S3 bucket
<strong>FABRICATE_AWS_REGION=  # AWS Region where the S3 bucket is located.
</strong><strong>                       # Also used when the Claude LLM provider is Amazon Bedrock.
</strong><strong>
</strong><strong># Either set these or assign an IAM role to the Fabricate EC2 instances
</strong><strong>FABRICATE_AWS_ACCESS_KEY_ID=  # Access key for the AWS account
</strong>FABRICATE_AWS_SECRET_ACCESS_KEY=  # Secret access key for the AWS account
</code></pre>

## Azure Blob Storage

To use Azure Blob Storage to store generated data, in `.env`, set:

```
FABRICATE_STORAGE_SERVICE="azure"
```

To configure the storage location and credentials, set:

```
FABRICATE_AZURE_STORAGE_ACCOUNT_NAME=  # Name of the Azure account
FABRICATE_AZURE_STORAGE_ACCESS_KEY=  # Access key for the Azure account
FABRICATE_AZURE_STORAGE_CONTAINER=  # Path to the Azure storage container to use
```

## Google Cloud Storage

To use Google Cloud Storage to store generated data, in `.env`, set:

```
FABRICATE_STORAGE_SERVICE="google"
```

To configure the storage location and credentials, set:

```
FABRICATE_GCS_PROJECT=  # Name of the Google Cloud Storage project to use
FABRICATE_GCS_CREDENTIALS=  # Credentials to connect to the project
FABRICATE_GCS_BUCKET=  # Name of the bucket to use within the project
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tonic.ai/fabricate/self-hosting-fabricate/configuring-fabricate/cloud-storage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
