Windows#

This page provides download files and instructions for installing Salt on Windows.

Important information about installing on Windows#

Windows has two installer options:

  • A Nullsoft (.exe) installer
  • An MSI (.msi) installer

If you are unsure which installer to use, use the Nullsoft (EXE) installer.

Onedir packages are currently only available for the Nullsoft (EXE) installer.

Warning

The Salt Project will support the classic, non-onedir packaging system until the 3006 release. After that time, onedir will become the standard packaging system for the Salt Project. The following instructions explain how to install Salt using the classic packaging system, but you should consider upgrading to onedir soon. See Upgrade to onedir for more information.

In order to prevent problems running classic Salt packages, you should run Salt with the default version of Python that was originally packaged with that operating system. For example, RedHat 8 and CentOS 8 should use Python 3.6. Using any other version could prevent Salt from working properly.

Install directory locations#

In versions of Salt prior to Salt 3004, Nullsoft (EXE) Windows installer only installed Salt in the root C drive directory: C:\Salt\.

In versions 3004 and later, the Nullsoft (EXE) installer defaults to installing Salt in the C:\Program Files\Salt Project\Salt directory path. The install directory stores Salt binary data. If you choose a custom install directory path, Salt registers that directory as the root_dir.

Note

You can choose a custom install directory path using the install-dir option. See Windows Nullsoft EXE install options for more information.

Also in versions 3004 and later, the Nullsoft (EXE) installer creates a second directory in C:\ProgramData\Salt Project\Salt called the config directory. The config directory is where Salt stores non-binary data such as configuration files, logs, and the cache. This path cannot be customized.

The installer will not move configuration data that is stored in the old C:\Salt directory for older installations. You can move an older, existing Salt configuration directory from the old location to the ProgramData using the /move-config option during an upgrade.

Before you start#

Before installing Salt on your operating system, ensure that you first:

Install Salt on Windows#

To install Salt on Windows:

  1. Download the Salt installation file for Windows. See Windows downloads for a list of the latest downloads.

  2. Run the file to install Salt with a graphical user interface.

    You can optionally run the file from the command line. One advantage of running the file from the command line is that you can add various options for a custom installation. See Windows Nullsoft EXE install options or Windows MSI install options for more information.

    The following is an example of running a silent installation from the command line:

    salt-3005-1-windows-amd64.exe /S /master=yoursaltmaster /minion-name=yourminionname
    

    See Windows Nullsoft EXE install options for more information about options and additional examples.

    msiexec /i Salt-Minion-3005-1-Py3-AMD64.msi.md5 /quiet /norestart MASTER=yoursaltmaster MINION_ID=yourminionname
    

    See Windows MSI install options for more information about options.

    Salt install directory

    See Install directory locations for information about where Salt is installed by default and how you can customize that setting.

After installing Salt on your operating system, you need to complete the following post-installation steps:

Windows Nullsoft EXE install options#

The most commonly used install options are:

  • /master
  • /minion-name
  • /S
Option Description Example input
/? Displays this help screen with the install option documentation. .\Salt-Minion-3005-1-Py3-AMD64-Setup.exe /?
/custom-config=

Pass in a string specifying the name of a custom configuration file. The file path must be in the same path as the installer or it should be the full path.

If /master and/or /minion-name is also passed, those values will be used to update the new custom configuration file.

Any existing configuration files will be backed up by appending a timestamp and a .bak extension, including the minion file and the minion.d directory.

  • /custom-config=my-custom-config.conf
  • /custom-config=C:\Temp\my-custom-config.conf
/default-config

If any existing configuration files are present, this option will overwrite the existing configuration and replace it with the default Salt configuration file.

The default is to use the existing configuration file if present. If /master and/or /minion-name is also passed, those values will be used to update the new default configuration file.

Any existing configuration files will be backed up by appending a timestamp and a .bak extension, including the minion file and the minion.d directory.

 
/install-dir= Specify the installation location for the Salt binaries. This option will be ignored for existing installations. See Install directory locations for information about where Salt is installed by default and how you can customize that setting. /install-dir=C:\Software\salt
/move-config If a configuration file is found at C:\Salt it will be moved to %ProgramData%.  
/master=

Sets the master name or IP address. You may pass a single master or a comma-separated list of masters. Setting the master will cause the installer to use the default config or a custom config if provided.

If no master is specified, the default value is salt.

Be aware that you can only use a master name if you have set up your DNS server to resolve the master’s name to its IP address. For example, you would need to set up salt to resolve to the IP address in order for the default to work correctly.

  • /master=192.0.2.1
  • /master=salt-windows-master-1
  • /master=master.mydomain.com
/minion-name= Sets the minion name. If no minion ID is specified, the default will be hostname. Setting the minion name causes the installer to use the default config or it will use a custom config if provided.
  • /minion-name=192.0.2.1
  • /minion-name=salt-windows-minion-1
/start-minion= If you set the value to 1, the installer will start the minion service after installation. If set to, it 0 will not. The default is 1.
  • /start-minion=1
  • /start-minion=0
/S Use this option to install Salt silently. Salt-Minion-3005-1-Py3-AMD64-Setup.exe /S
/start-minion-delayed Use this option to set the minion service to start after installation, but to delay for 30-60 seconds, depending on the operating system settings. If you use this option, set the minion start type to Automatic (Delayed Start). Salt-Minion-3005-1-Py3-AMD64-Setup.exe /start-minion-delayed

Windows MSI install options#

The most commonly used install options are:

  • MASTER
  • MINION_ID
  • /quiet
  • /norestart

Note

For more information about the MSI installer, see the Windows MSI installer repository repository on GitHub.

The following table describes all available options, listed alphabetically:

Option Description Example values
ARPSYSTEMCOMPONENT Set to 1 to hide the Salt minion application in Programs and Features. ARPSYSTEMCOMPONENT=1
CLEAN_INSTALL Set to 1 to remove configuration and clear the cache before an installation or upgrade. CLEAN_INSTALL=1
CONFIG_TYPE Set to Custom or Default for the installation scenario you want to apply. The default value is Existing. See MSI installation scenarios for more information..
  • CONFIG_TYPE=Existing
  • CONFIG_TYPE=Custom
  • CONFIG_TYPE=Default
CUSTOM_CONFIG

This option is only available from the command line and must be used along with the CONFIG_TYPE=Custom option.

Pass in the name of a custom configuration file. The file path must either be in the same path as the installer or it should be the full path.

  • CUSTOM_CONFIG=my-custom-config.conf
  • CUSTOM_CONFIG=C:\Temp\my-custom-config.conf
INSTALLDIR Use this option to install the binaries to a custom directory path. The default value is C:\Program Files\Salt Project\Salt. INSTALLDIR=C:\Salt Binaries\
MASTER

Sets the master name or IP address. You may pass a single master or a comma-separated list of masters.

If no master is specified, the default value is salt.

Be aware that you can only use a master name if you have set up your DNS server to resolve the master’s name to its IP address. For example, you would need to set up salt to resolve to the IP address in order for the default to work correctly.

  • MASTER=192.0.2.1
  • MASTER=salt-windows-master-1
  • MASTER=master.mydomain.com
MASTER_KEY Sets the master public key. To use this option, first convert the public key converted into one line by removing the first and last line: -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY-----. Then, remove any line breaks. Generally, most public keys start with ssh-rsa, ssh-dss, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-ed25519, sk-ecdsa-sha2-nistp256@openssh.com, or sk-ssh-ed25519@openssh.com.
MINION_CONFIG

Sets the content that will write to the minion configuration file.

If you use this option, it operates the same as REMOVE_CONFIG=1. That means:

  • All prior minion configuration files and options are overwritten and deleted, including all minion.d\*.conf files and the minion_id file.
  • Its content is written to configuration file conf\minion.
  • Use the ^ character for line breaks. This character will be replaced by line breaks during installation.

MINION_CONFIG="master: Anna^id: Bob" results in:

master: Anna
id: Bob
MINION_ID Sets the minion name. If no minion ID is specified, the default will be the hostname or IP address.
  • MINION_ID=192.0.2.1
  • MINION_ID=salt-windows-minion-1
MOVE_CONF Changes the directory where the configuration file is stored for Salt. By default, the MSI installer places the configuration file in the C:\salt directory. Change the value to 1 to move configuration from C:\salt to %ProgramData%. MOVE_CONF=1
/norestart Runs the installer silently. Usually used along with /quiet. msiexec /i |windows-install-msi-example| /quiet /norestart
/quiet Runs the installer silently. Usually used along with /norestart. msiexec /i |windows-install-msi-example| /quiet /norestart
REMOVE_CONFIG Set to 1 if you want to remove configuration files on uninstall. When you run MINION_CONFIG, this option is automatically run in order to delete the existing configuration file that will be replaced by the new file. Running this option alone will not create a new configuration file. REMOVE_CONF=1
ROOTDIR Use this option to install the configuration files to a custom directory path. The default value is C:\ProgramData\Salt Project\Salt ROOTDIR=C:\Salt Configurations\
START_MINION Starts the minion service after installation. Set this value to "" to prevent the start of the salt-minion service. The default value is 1, which starts the service.
  • START_MINION
  • START_MINION=1
  • START_MINION=""

MSI installation scenarios#

The CONFIG_TYPE option can support three possible installation scenarios.

Existing#

The Existing setting is recommended for simple upgrades. It makes no changes to the existing configuration and only upgrades Salt. For this type of installation, run the installer with a silent option. If there is no existing configuration, the installer creates a default configuration. The master and minion ID are applied if they are passed.

Custom#

The Custom setting will apply a custom configuration file passed from the command line. To ensure the custom configuration is applied correctly, the installer backs up any existing configurations following this order of operations:

  1. The minion configuration file is renamed to minion-<timestamp>.bak.
  2. The minion_id file is renamed to minion_id-<timestamp>.bak.
  3. The minion.d directory renamed to minion.d-<timestamp>.bak
  4. The custom config is applied by the installer. If the master and minion ID were passed, they will be to the custom configuration file.

Default#

This setting will reset the configurations to the default configurations contained in the package. Therefore, all existing config files should be backed up first, including:

  • The minion configuration file
  • The minion_id file
  • The minion.d directory