Skip to main content

Passing in the options

You can configure the OpenFGA server in three ways:
  • Using a configuration file.
  • Using environment variables.
  • Using command line parameters.
If the same option is configured in multiple ways the command line parameters will take precedence over environment variables, which will take precedence over the configuration file.
You can configure the OpenFGA server with a config.yaml file, which can be specified in either:
  • /etc/openfga
  • $HOME/.openfga
  • . (i.e., the current working directory).
The OpenFGA server will search for the configuration file in the above order.Here is a sample configuration to run OpenFGA with a Postgres database and using a preshared key for authentication:

List of options

The following table lists the configuration options for the OpenFGA server v1.20.0, based on the config-schema.json. Check the following sections for more on how to configure OpenFGA.

Configuring OpenFGA

Learn more about the different ways to configure OpenFGA

Running OpenFGA in Production

Learn the best practices of running OpenFGA in a production environment
Last modified on September 28, 2026