---
id: config
slug: /config
title: Configuration
toc_max_heading_level: 3
---

<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->

A sample `.env` file is located in the [storage repository](https://github.com/supabase/storage-api/blob/master/.env.sample).

Use this file to configure your environment variables for your Storage server.




<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->

## General {#general}



### `ANON_KEY` {#ANON_KEY}

A long-lived JWT with anonymous Postgres privileges.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `SERVICE_KEY` {#SERVICE_KEY}

A long-lived JWT with Postgres privileges to bypass Row Level Security.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `TENANT_ID` {#TENANT_ID}

The ID of a Storage tenant.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `REGION` {#REGION}

Region of your S3 bucket.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `GLOBAL_S3_BUCKET` {#GLOBAL_S3_BUCKET}

Name of your S3 bucket.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `POSTGREST_URL` {#POSTGREST_URL}

The URL of your PostgREST server.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `PGRST_JWT_SECRET` {#PGRST_JWT_SECRET}

A JWT Secret for the PostgREST database.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `DATABASE_URL` {#DATABASE_URL}

The URL of your Postgres database.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `PGOPTIONS` {#PGOPTIONS}

Additional configuration parameters for Postgres startup.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `FILE_SIZE_LIMIT` {#FILE_SIZE_LIMIT}

The maximum file size allowed.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `STORAGE_BACKEND` {#STORAGE_BACKEND}

The storage provider.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `FILE_STORAGE_BACKEND_PATH` {#FILE_STORAGE_BACKEND_PATH}

The location storage when the "STORAGE_BACKEND" is set to "file".


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />




<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->

## Multi-tenant {#multitenant}



### `IS_MULTITENANT` {#IS_MULTITENANT}

Operate across multiple tenants.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `MULTITENANT_DATABASE_URL` {#MULTITENANT_DATABASE_URL}

The URL of the multitenant Postgres database.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `X_FORWARDED_HOST_REGEXP` {#X_FORWARDED_HOST_REGEXP}

TBD.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `POSTGREST_URL_SUFFIX` {#POSTGREST_URL_SUFFIX}

The suffix for the PostgREST instance.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `ADMIN_API_KEYS` {#ADMIN_API_KEYS}

Secure API key for administrative endpoints.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


### `ENCRYPTION_KEY` {#ENCRYPTION_KEY}

An key for encryting/decrypting secrets.


<ul>
<li>Required: <code>true</code></li>
<li>Default: <code>None</code></li>
</ul>

<br />


