Skip to content

Storage Self-hosting Config

A sample .env file is located in the storage repository.

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

General

General Settings

Parameters
    ANON_KEY
    Required

    A long-lived JWT with anonymous Postgres privileges.

    SERVICE_KEY
    Required

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

    TENANT_ID
    Required

    The ID of a Storage tenant.

    REGION
    Required

    Region of your S3 bucket.

    GLOBAL_S3_BUCKET
    Required

    Name of your S3 bucket.

    POSTGREST_URL
    Required

    The URL of your PostgREST server.

    PGRST_JWT_SECRET
    Required

    A JWT Secret for the PostgREST database.

    DATABASE_URL
    Required

    The URL of your Postgres database.

    PGOPTIONS
    Required

    Additional configuration parameters for Postgres startup.

    FILE_SIZE_LIMIT
    Required

    The maximum file size allowed.

    STORAGE_BACKEND
    Required

    The storage provider.

    FILE_STORAGE_BACKEND_PATH
    Required

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

Multi-tenant

Configuration items for multi-tenant servers.

Parameters
    IS_MULTITENANT
    Required

    Operate across multiple tenants.

    MULTITENANT_DATABASE_URL
    Required

    The URL of the multitenant Postgres database.

    X_FORWARDED_HOST_REGEXP
    Required

    TBD.

    POSTGREST_URL_SUFFIX
    Required

    The suffix for the PostgREST instance.

    ADMIN_API_KEYS
    Required

    Secure API key for administrative endpoints.

    ENCRYPTION_KEY
    Required

    An key for encryting/decrypting secrets.