# Required configuration file settings

Each `repmgr.conf` file must contain the following parameters:

`node_id` (`int`)

- A unique integer greater than zero which identifies the node.

`node_name` (`string`)

- An arbitrary (but unique) string; we recommend using the server's hostname or another identifier unambiguously associated with the server to avoid confusion. Avoid choosing names which reflect the node's current role, e.g. `primary` or `standby1` as roles can change and if you end up in a solution where the current primary is called `standby1` (for example), things will be confusing to say the least.

  The string's maximum length is 63 characters and it should contain only printable ASCII characters.

`conninfo` (`string`)

- Database connection information as a conninfo string. All servers in the cluster must be able to connect to the local node using this string.

  For details on conninfo strings, see section Connection Strings in the PosgreSQL documentation.

  If repmgrd is in use, consider explicitly setting `connect_timeout` in the `conninfo` string to determine the length of time which elapses before a network connection attempt is abandoned; for details see the PostgreSQL documentation.

`data_directory` (`string`)

- The node's data directory. This is needed by repmgr when performing operations when the PostgreSQL instance is not running and there's no other way of determining the data directory.

See configuration-file-optional-settings for further configuration options.