What Is Salt?
Salt (also called SaltStack) is an open-source tool for two jobs: remote execution (run a command on thousands of servers in seconds) and configuration management (describe how a server should look, and Salt makes it so). It is written in Python and released under the Apache 2.0 licence.
The Two Big Ideas
| Idea | Meaning | Example |
|---|---|---|
| Remote execution | Run a function on many machines at once, right now | salt '*' pkg.upgrade |
| Configuration management (states) | Describe the wanted state in YAML files. Salt checks and fixes each machine | 'nginx installed, running, config file correct' |
Architecture: Master and Minions
| Part | Job |
|---|---|
| Salt master | The control server. You type commands here. It keeps the state files and sends jobs to minions |
| Salt minion | A small agent on each managed machine. It keeps a connection open to the master, runs the job, and returns the result |
| Ports | Master listens on 4505 (publish: master to minions) and 4506 (return: minions to master). Only the master needs inbound ports. Minions connect out |
| Transport | A fast message bus (ZeroMQ by default, with TCP and WebSocket options). Messages are encrypted with keys that the master accepts |
| salt-ssh | Agentless mode: runs Salt over SSH, with nothing installed on the target |
| salt-call | Run Salt on the local machine, with or without a master |
Because the master pushes a job to all listening minions at the same moment, results can come back from 1,000 machines in a few seconds. This is the main speed advantage of Salt.
Main Building Blocks
| Term | Meaning |
|---|---|
| Execution module | A function you call on demand: pkg.install, service.restart, cmd.run |
| State | A declaration of a wanted condition, such as pkg.installed. Saved in .sls files |
| SLS file | A Salt state file, written in YAML with optional Jinja templating |
| Highstate | Applying all states assigned to a minion by the top.sls file |
| Grains | Facts about a minion (OS, CPU, IP). Collected by the minion |
| Pillar | Secure data defined on the master and given only to chosen minions (passwords, settings) |
| Top file | top.sls: says which states or pillar data go to which minions |
| Formula | A reusable, shareable set of states (like a module or role) |
| Reactor | Run actions when an event happens (a new minion starts, a file changes) |
| Beacon | Watches a minion and sends events (disk full, file changed, service stopped) |
| Orchestration | Run steps across many machines in order, such as 'database first, then web' |
| Returner | Sends job results to another place (database, Redis, Slack) |
| Runner | A function that runs on the master (salt-run) |
A First Look
Salt Versions: LTS and STS
Since version 3006 the Salt Project uses a long-term support (LTS) and short-term support (STS) model. Salt versions are numbers like 3006, 3007, 3008. If you are unsure which one to use, the project advises using an LTS release.
| Release | Type | Notes |
|---|---|---|
| 3006 | LTS (April 2023) | Very common in production today. In its critical-fixes phase now |
| 3007 | STS (March 2024) | A short-term release. Support has ended, so move off it |
| 3008 | LTS (May 2026) | The current LTS to learn and deploy. Updated bundled Python (3.11), x509 v2 modules by default, and more |
What Is Onedir?
Modern Salt packages use onedir: one folder (/opt/saltstack/salt on Linux) that contains Salt and its own Python and libraries. So Salt does not depend on the system Python. Extra Python libraries for Salt are installed with the salt-pip helper, not the system pip.
Salt, Ansible and Puppet
| Salt | Ansible | Puppet | |
|---|---|---|---|
| Model | Master and minion (also agentless salt-ssh) | Agentless over SSH | Agent pulls from a server |
| Speed for big fleets | Very fast (persistent connections, parallel) | Slower on huge fleets (SSH per host) | Depends on run interval |
| Language | YAML + Jinja (Python for custom modules) | YAML + Jinja | Puppet language |
| Real-time commands | Excellent (salt '*' ...) | Ad hoc commands available | Use Bolt |
| Event-driven automation | Built in (events, reactor, beacons) | Needs extra tools | Limited |
| Learning curve | Medium (many concepts) | Low | Medium |
Typical Uses
- Run a command, restart a service or install a patch on hundreds of servers right now
- Keep servers configured the same way, and fix drift
- Build servers in the cloud and configure them (Salt Cloud, cloud-init)
- React to events: a disk filling up triggers a clean-up job
- Manage Windows, Linux, macOS, network devices (through proxy minions)
- Run orchestrated, step-by-step changes across tiers
What You Will Build in This Course
- Install a master and minions in a lab
- Run remote commands and target machines by name, grain and group
- Write states, use Jinja and grains, and keep secrets in pillar
- Organise code with formulas and Git
- Use events, the reactor, beacons and orchestration
- Secure, test, and troubleshoot Salt, and finish with three real projects and interview questions
Practice Tasks
- Draw the master and minion diagram and label ports 4505 and 4506
- In your own words, explain the difference between remote execution and states
- Open the Salt version support lifecycle page and write down which version is the current LTS
- List three jobs in your work that you could do with
salt '*' ...
Conclusion
Salt is a fast remote execution and configuration tool built on a master and minion model with an event bus. Learn the 3008 LTS line, and remember the four core ideas: execution modules, states, grains and pillar.

