4.2. Configuration file location

repmgr and repmgrd use a common configuration file, by default called repmgr.conf (although any name can be used if explicitly specified). repmgr.conf must contain a number of required parameters, including the database connection string for the local node and the location of its data directory; other values will be inferred from defaults if not explicitly supplied. See section required configuration file settings for more details.

The configuration file will be searched for in the following locations:

Note that if a file is explicitly specified with -f/--config-file, an error will be raised if it is not found or not readable, and no attempt will be made to check default locations; this is to prevent repmgr unexpectedly reading the wrong configuraton file.

Note: If providing the configuration file location with -f/--config-file, avoid using a relative path, particularly when executing repmgr primary register and repmgr standby register, as repmgr stores the configuration file location in the repmgr metadata for use when repmgr is executed remotely (e.g. during repmgr standby switchover). repmgr will attempt to convert the a relative path into an absolute one, but this may not be the same as the path you would explicitly provide (e.g. ./repmgr.conf might be converted to /path/to/./repmgr.conf, whereas you'd normally write /path/to/repmgr.conf).