Salt Master Installation: Step-by-Step Guide for Ubuntu
SaltStack is a powerful open-source automation tool used for configuration management and orchestration. In this guide, we’ll walk you through the installation and configuration process for setting up Salt Master and Minion on Ubuntu. These steps will ensure your systems are properly configured to manage your infrastructure with Salt.

1. Preparing for Salt Master Installation
Before we begin, it’s essential to ensure your system packages are up to date. Start by running the following command:
# apt-get update
This command updates your system’s package list, ensuring that the latest packages are available.
2. Import the SaltStack Repository Key
To install SaltStack, we need to download and add the repository key for SaltStack to our system. Use the following command:
# wget -O- https://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
Once the key is successfully added, you’ll be able to access SaltStack’s official repository.
3. Add the SaltStack Repository
Now, let’s add the repository to our sources list:
# echo "deb http://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest bionic main" | sudo tee /etc/apt/sources.list.d/saltstack.list
Update the repository list to ensure the available system packages are up to date:
# apt-get update
4. Install Salt Master Packages
With the repository added, you’re ready to install Salt Master and its required components:
# apt -y install salt-api salt-cloud salt-master salt-ssh salt-syndic
This will install the Salt Master packages along with all necessary dependencies.
5. Configuring Salt Master
After the installation, it’s time to configure the Salt Master. Open the /etc/salt/master file in your text editor and replace the line:
# interface: 0.0.0.0
with:
interface: 192.168.1.23
Afterward, restart the Salt Master service to apply the changes:
# systemctl restart salt-master.service
6. Create a Key for Minions
Next, generate the master key that will be used by the Minions to connect to the master node:
# salt-key -F master
You’ll see the master’s public key, which you’ll need to add to the Minion’s configuration.
7. Allow Ports on Firewall
Ensure the appropriate ports (4505 and 4506) are open on your firewall:
# ufw allow proto tcp from any to any port 4505,4506
Salt Minion Installation
The next step is installing Salt Minion on your Minion server. Run the following command to install Salt Minion:
# apt -y install salt-minion
8. Configuring Salt Minion
After installing Salt Minion, configure the Minion to connect to the Salt Master. Open the /etc/hosts file and add the following entry:
192.168.1.23 saltmaster.zippyops.com
Now, set the Minion ID in the /etc/salt/minion_id file:
# cat minion_id
ubuntu-01
Then, update the Minion configuration with the Master’s public key fingerprint. Copy the fingerprint you retrieved earlier and set it in the Minion configuration file:
master_finger: 'fd:0f:be:e2:3e:03:6f:e3:b9:fc:4c:6d:a0:04:fc:c5:c2:13:13:a2:3d:06:d6:e3:a8:64:bf:aa:1d:46:c5:92'
9. Restart the Salt Minion Service
For the changes to take effect, restart the Salt Minion service:
# systemctl restart salt-minion
Verifying Communication Between Salt Master and Minion
Once both the Master and Minion are configured, you need to verify the communication. On the Salt Master, list the accepted keys:
# salt-key -L
Accept the key for your Minion:
# salt-key -A
Confirm the Minion’s key is accepted and check the key fingerprint:
# salt-call --local key.finger
Finally, verify the communication by pinging the Minion from the Master:
# salt ubuntu-01 test.ping
If everything is configured correctly, the output should show True, indicating successful communication.
Conclusion
With Salt Master and Minion properly installed and configured, you can start using SaltStack to automate and manage your infrastructure. For organizations looking to scale their operations, integrating DevOps, DataOps, or even CloudOps practices can enhance overall efficiency. At ZippyOPS, we provide consulting, implementation, and managed services in these areas, including DevOps, DevSecOps, and AIOps, ensuring your infrastructure is optimized and secure.
If you’re looking for expert guidance in setting up automated operations or securing your environment, reach out to us at sales@zippyops.com.
For more details on our services and solutions, visit ZippyOPS Services or check out our latest product offerings here.



