Home

CLI configuration

A config.toml file is generated after running supabase init.

This file is located in the supabase folder under supabase/config.toml. You can edit this file to change the settings for your locally running project. After you make changes, you will need to restart using supabase stop and then supabase start for the changes to take effect.

General Config#

project_id#

NameDefaultRequired
project_idNonetrue

Description

A string used to distinguish different Supabase projects on the same host. Defaults to the working directory name when running supabase init.

Auth Config#

auth.site_url#

NameDefaultRequired
auth.site_url"http://localhost:3000"true

Description

The base URL of your website. Used as an allow-list for redirects and for constructing URLs used in emails.

auth.additional_redirect_urls#

NameDefaultRequired
auth.additional_redirect_urls["https://localhost:3000"]true

Description

A list of exact URLs that auth providers are permitted to redirect to post authentication.

auth.jwt_expiry#

NameDefaultRequired
auth.jwt_expiry3600true

Description

How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 seconds (one week).

auth.enable_signup#

NameDefaultRequired
auth.enable_signuptruetrue

Description

Allow/disallow new user signups to your project.

auth.email.enable_signup#

NameDefaultRequired
auth.email.enable_signuptruetrue

Description

Allow/disallow new user signups via email to your project.

auth.email.double_confirm_changes#

NameDefaultRequired
auth.email.double_confirm_changestruetrue

Description

If enabled, a user will be required to confirm any email change on both the old, and new email addresses. If disabled, only the new email is required to confirm.

auth.email.enable_confirmations#

NameDefaultRequired
auth.email.enable_confirmationstruetrue

Description

If enabled, users need to confirm their email address before signing in.

auth.email.template.<type>.subject#

NameDefaultRequired
auth.email.template.type.subjectNonefalse

Description

The full list of email template types are:

  • invite
  • confirmation
  • recovery
  • magic_link
  • email_change

auth.email.template.<type>.content_path#

NameDefaultRequired
auth.email.template.type.content_pathNonefalse

Description

The full list of email template types are:

  • invite
  • confirmation
  • recovery
  • magic_link
  • email_change

auth.external.<provider>.enabled#

NameDefaultRequired
auth.external.provider.enabledtruetrue

Description

Use an external OAuth provider. The full list of providers are:

  • apple
  • azure
  • bitbucket
  • discord
  • facebook
  • github
  • gitlab
  • google
  • twitch
  • twitter
  • slack
  • spotify

auth.external.<provider>.client_id#

NameDefaultRequired
auth.external.provider.client_idNonetrue

Description

Client ID for the external OAuth provider.

auth.external.<provider>.secret#

NameDefaultRequired
auth.external.provider.secretNonetrue

Description

Client secret for the external OAuth provider.

auth.external.<provider>.url#

NameDefaultRequired
auth.external.provider.url""false

Description

The base URL used for constructing the URLs to request authorization and access tokens. Used by gitlab and keycloak. For gitlab it defaults to https://gitlab.com. For keycloak you need to set this to your instance, for example: https://keycloak.example.com/realms/myrealm .

auth.external.<provider>.redirect_uri#

NameDefaultRequired
auth.external.provider.redirect_uri""false

Description

The URI a OAuth2 provider will redirect to with the code and state values.

API Config#

api.port#

NameDefaultRequired
api.portNonetrue

Description

Port to use for the API URL.

Usage

[api]
port = 54321

api.schemas#

NameDefaultRequired
api.schemas["public", "storage", "graphql_public"]false

Description

Schemas to expose in your API. Tables, views and functions in this schema will get API endpoints. public and storage are always included.

api.extra_search_path#

NameDefaultRequired
api.extra_search_path["public"]false

Description

Extra schemas to add to the search_path of every request. public is always included.

api.max_rows#

NameDefaultRequired
api.max_rows1000false

Description

The maximum number of rows returned from a view, table, or stored procedure. Limits payload size for accidental or malicious requests.

Database Config#

db.port#

NameDefaultRequired
db.portNonetrue

Description

Port to use for the local database URL.

db.shadow_port#

NameDefaultRequired
db.shadow_port54320false

Description

Port to use for the local shadow database.

See also

    db.major_version#

    NameDefaultRequired
    db.major_version14true

    Description

    The database major version to use. This has to be the same as your remote database's. Run SHOW server_version; on the remote database to check.

    Dashboard Config#

    studio.port#

    NameDefaultRequired
    studio.portNonetrue

    Description

    Port to use for Supabase Studio.

    See also

      Local Config#

      inbucket.port#

      NameDefaultRequired
      inbucket.portNonetrue

      Description

      Port to use for the email testing server web interface.

      Emails sent with the local dev setup are not actually sent - rather, they are monitored, and you can view the emails that would have been sent from the web interface.

      inbucket.smtp_port#

      NameDefaultRequired
      inbucket.smtp_portNonefalse

      Description

      Port to use for the email testing server SMTP port.

      Emails sent with the local dev setup are not actually sent - rather, they are monitored, and you can view the emails that would have been sent from the web interface.

      If set, you can access the SMTP server from this port.

      inbucket.pop3_port#

      NameDefaultRequired
      inbucket.pop3_portNonefalse

      Description

      Port to use for the email testing server POP3 port.

      Emails sent with the local dev setup are not actually sent - rather, they are monitored, and you can view the emails that would have been sent from the web interface.

      If set, you can access the POP3 server from this port.

      storage.file_size_limit#

      NameDefaultRequired
      storage.file_size_limitNonefalse

      Description

      The maximum file size allowed (e.g. "5MB", "500KB").

      Edge-Functions Config#

      functions.<function_name>.verify_jwt#

      NameDefaultRequired
      functions.function_name.verify_jwttruefalse

      Description

      By default, when you deploy your Edge Functions or serve them locally, it will reject requests without a valid JWT in the Authorization header. Setting this configuration changes the default behavior.

      Note that the --no-verify-jwt flag overrides this configuration.

      functions.<function_name>.import_map#

      NameDefaultRequired
      functions.function_name.import_mapNonefalse

      Description

      Specify the Deno import map file to use for the Function.

      Note that the --import-map flag overrides this configuration.