- Home
- Infrastructure Testing Tools
- Serverspec
Serverspec
What it is
Serverspec is an open-source Ruby gem for writing RSpec tests that check whether servers are configured correctly. It examines actual machine state by running commands locally or through SSH, WinRM and the Docker API, among other methods, and does not require agent software on target servers. Documented resource checks cover packages, services, files, ports, users, Docker containers and images, Windows features, and X.509 certificates and private keys.
Serverspec supports both RSpec `should` and `expect` syntax and can be used with configuration tools such as Puppet, Ansible, CFEngine, Itamae and Chef. Its stated aim is to help refactor infrastructure code. The tutorial lists operating systems including Linux distributions, macOS, Windows, BSD systems, Solaris and SmartOS, while noting that not all are fully supported. A test suite is intended for one machine or Docker container, with a separate RSpec command advised for each target. Installation is documented through Bundler or `gem install serverspec`. The project is MIT licensed, maintained by Gosuke Miyashita, and lists v2.43.0, dated April 24, 2025, as its latest release.
For and against
For
- Open-source Ruby gem with MIT license.
- Targets do not need agent software installed.
- Checks cover files, services and Docker resources.
- Works with both RSpec `should` and `expect` syntax.
Against
- Each test suite is intended for one target.
- Not all listed operating systems are fully supported.
- Separate RSpec commands are advised for each target.
The verdict
Serverspec offers agentless configuration checks using familiar RSpec syntax, with documented integrations across several infrastructure tools. Its per-target execution model and incomplete support across some listed systems are important constraints.
Who it suits
Serverspec may suit infrastructure teams who want RSpec tests for server configuration and checks alongside configuration-management tools. It is also relevant to users seeking agentless checks on individual machines or Docker containers.
Plans and prices
Serverspec
Open source Ruby gem · no paid plans stated
Read 7 Oct 2026 · github.com
On the record
- Agentless
- The site says Serverspec does not require agent software to be installed on target servers.serverspec.org · read 7 Oct 2026
- Configuration tools
- The site names Puppet, Ansible, CFEngine, and Itamae as configuration management tools it can be used with.serverspec.org · read 7 Oct 2026
- Execution scope
- The site says a test suite is meant for one machine or Docker container and advises running a separate RSpec command for each target.serverspec.org · read 7 Oct 2026
- How it checks
- It checks servers’ actual state by executing commands locally or through SSH, WinRM, and Docker API, among other methods.serverspec.org · read 7 Oct 2026
- Infrastructure code
- The site describes helping refactor infrastructure code as Serverspec’s true aim.serverspec.org · read 7 Oct 2026
- Installation
- The site documents installing the `serverspec` Ruby gem with Bundler or `gem install serverspec`.serverspec.org · read 7 Oct 2026
- License and latest release
- GitHub identifies the repository as MIT licensed and lists v2.43.0 as its latest release, dated April 24, 2025.github.com · read 7 Oct 2026
- Maintenance
- The project’s GitHub README says it accepts pull requests and disables issues.github.com · read 7 Oct 2026
- Maker
- The official site says the project is maintained by Gosuke Miyashita.serverspec.org · read 7 Oct 2026
- Operating systems
- The tutorial lists AIX, Arch Linux, macOS, Debian, Fedora/Red Hat/CentOS, FreeBSD, Gentoo Linux, NixOS, OpenBSD, openSUSE, Plamo Linux, SmartOS, Solaris, SUSE, Ubuntu, and Windows, while noting that not all are fully supported.serverspec.org · read 7 Oct 2026
- Purpose
- Serverspec lets users write RSpec tests to check that servers are configured correctly.serverspec.org · read 7 Oct 2026
- Resource checks
- Documented resource types include packages, services, files, ports, users, Docker containers and images, Windows features, and X.509 certificates and private keys.serverspec.org · read 7 Oct 2026
- Test syntax
- Serverspec works with both RSpec `should` and `expect` syntax.serverspec.org · read 7 Oct 2026