Configuration via config.ini
How configuration works across Pioreactors
Configuration of the Pioreactors is through configuration files, prefixed by .ini. There are two types of .ini files: a shared config.ini, which is the same across all units, and a unit-specific unit_config.ini file, which can have settings that overwrite those found in the shared config.ini.
For example (and see image below), each unit will use the shared config.ini setting of target_rpm=500, unless an alternative setting is present in their specific unit_config.ini files (like target_rpm=400 found in unit1_config.ini) . This overriding lets you customize specific behavior per Pioreactor, without having to duplicate lots of configuration over and over again.

Last-occurrence wins
The config.ini can have duplicate entries (though it's not recommended), but only the last occurrence in the file will be used.
Editing the configuration files from the web interface
At pioreactor.local, navigate to the Configuration page in the sidebar.

Select the configuration file you wish to edit from the dropdown:

Clicking [Save] will save the new configuration and will deploy the new configuration to the proper Pioreactor unit(s).

Pioreactor also stores a history of changes to each configuration file. You can view previous versions of configuration files in the dropdown. Clicking [Revert] will save the displayed configuration file.

Editing the configuration files from the command line
All the .ini files come from the leader unit. They are stored in /home/pioreactor/.pioreactor - the config.ini and a config_<unitName>.ini for each Pioreactor unit. The command pios sync-configs will deploy the .ini files to their correct unit. Editing the .ini files on the leader is correct workflow, as any edits on the worker units will be overwritten on the next pios sync-configs.
Editing the config.ini before booting
Sometimes it's desirable to make changes to the config.ini without having to boot the Pioreactor first. You can do this by plugging the microSD card into your computer, and adding a config.ini to the boot/ folder on it. This config.ini doesn't need to have all the fields, only the fields you wish to change. At start up, the Pioreactor will merge /boot/config.ini into the Pioreactor's config.ini, and then delete /boot/config.ini.
Default config.ini
If you need a reference config.ini, or to replace parts of yours, here's our default one that ships with the Raspberry Pi image. To use it, you'll need to make some changes to populate the leader, specifically to `cluster.topology` and `mqtt`.