Configuration

The configuration for fauna-shell is an INI-format file that stores the configuration for endpoints. An endpoint specifies the domain, secret, and other options that can be used to run queries against any FaunaDB instance within the database associated with the secret.

For Linux, macOS, and other UNIX-like systems, the configuration file is located in $HOME/.fauna-shell. For Windows, the configuration file is located in %userprofile%\.fauna-shell.

A configuration file that defines multiple endpoints that would connect to a variety of FaunaDB instances might look like:

default=db2

[localhost]
domain=127.0.0.1
port=8443
scheme=http
secret=secret

[cloud]
domain=db.fauna.com
scheme=https
secret=fnADS@PxN@2CE@n7z@kDa4_p6Z@fIBaZm@Qt@bYT

[db2]
domain=private.example
port=8443
scheme=https
secret=MY_ORGANIZATION_SECRET

Summary of INI configuration:

  • Each section, identified by the square brackets, provides the name for an endpoint — called an endpoint alias — and lists the properties that provide the endpoint’s configuration.

  • A property uses the format name=value, which specifies the name of a property and its configured value.

  • When a property name is re-used in a section, the last definition is used.

Global properties

Configuration key Description

default=<endpoint alias>

Optional - Specifies the default endpoint to use when one is not specified with --endpoint. If default does not exist in the configuration file, and --endpoint is not used, an error occurs.

Endpoint-specific properties

Property Description

domain=<FaunaDB hostname>

Optional - The hostname of this endpoint’s FaunaDB instance. Defaults to db.fauna.com.

scheme=<scheme>

Optional - One of https or http. Defaults to https.

port=<port>

Optional - The UNIX port number of this endpoint’s FaunaDB instance. Defaults to 8443.

secret=<secret>

The secret for a specific database.

The list of properties is not strictly enforced; additional properties can be included to help differentiate between endpoints, but these properties have no effect in fauna-shell.

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve!
Visit Fauna's Discourse forums or email docs@fauna.com

Thank you for your feedback!