Skip to content

Lab Setup

The lessons run in a lab VM: a disposable Ubuntu 24.04 virtual machine. One setup file builds the same machine on macOS, Windows and Linux. The only thing you install on your own computer is Multipass, the tool that runs it.

Plan on about 15 minutes, most of it waiting for downloads.

step CLI

Request, inspect and manage certificates.

step-ca

Your own private certificate authority.

OpenSSL

The classic toolkit, for cross-checking.

nginx

Web server for the mTLS lab.

FreeRADIUS + eapol_test

RADIUS server and test client for the EAP-TLS lab.

certbot

ACME client for the ACME lab.

OpenSSH server

For the SSH certificates lab.

curl and jq

Test clients and JSON tools for the terminal.

The lessons are written against step CLI 0.31.0 and step-ca 0.30.2. The lab VM installs exactly these versions and checks their SHA-256 hashes first.

The other tools come from Ubuntu 24.04: OpenSSL 3.0.13, nginx 1.24.0, FreeRADIUS 3.2.5, eapol_test 2.10 and OpenSSH 9.6. certbot comes from the Snap Store, so you get the current release.

You need macOS 14 Sonoma or later, on Apple silicon or Intel.

Download and run the installer from canonical.com/multipass/install. Or use Homebrew:

terminal
brew install --cask multipass

Check that it works:

terminal
multipass version

It prints the Multipass version.

Download cloud-init.yaml. Save it in the folder where you’ll open your terminal.

This cloud-init file tells a new Ubuntu machine what to install on first boot. It’s short. Read it before you run it, because it runs as root inside the VM. You’ll see that it checks each step download against a known SHA-256 hash, the same idea as the signature check in module 1.

Run this from the folder that holds cloud-init.yaml:

terminal
multipass launch 24.04 --name pki-lab --cpus 2 --memory 2G --disk 10G --timeout 900 --cloud-init cloud-init.yaml
Option Meaning
24.04 The Ubuntu release. Every lesson was tested on it.
--name pki-lab The name you use in every other multipass command.
--cpus 2 --memory 2G --disk 10G Room for all the labs. Multipass’s defaults are smaller.
--timeout 900 Wait up to 15 minutes. The first launch downloads Ubuntu and every package.
--cloud-init cloud-init.yaml The setup file you downloaded.

Multipass waits until setup finishes. If the launch times out, setup keeps going in the background. Wait for it to finish:

terminal
multipass exec pki-lab -- cloud-init status --wait
terminal
multipass shell pki-lab

Your prompt changes to ubuntu@pki-lab. Run every lesson command here, unless a lesson tells you otherwise.

In the VM shell:

terminal
step version
Expected output
Smallstep CLI/0.31.0 (linux/amd64)
Release Date: 2026-09-25T19:53:51Z
terminal
step-ca version
Expected output
Smallstep CA/0.30.2 (linux/amd64)
Release Date: 2026-03-23T00:18:00Z

On an Apple silicon Mac, the platform is linux/arm64. That’s expected: the VM runs the ARM build of Ubuntu.

Your lab folder is ready too:

terminal
ls -d ~/pki-lab
Expected output
/home/ubuntu/pki-lab

A snapshot saves the VM as it is now. If a lab goes wrong, you can come back to this clean state in seconds.

Leave the VM shell with exit. Then, on your own computer, stop the VM:

terminal
multipass stop pki-lab

Take the snapshot. Multipass can only snapshot a stopped VM:

terminal
multipass snapshot pki-lab --name fresh

Start the VM again:

terminal
multipass start pki-lab

To go back to the clean state later, stop the VM, then restore the snapshot:

terminal
multipass restore pki-lab.fresh --destructive

--destructive discards everything since the snapshot. Without it, Multipass asks whether to save the current state first.

Run these on your own computer, not in the VM:

Task Command
Open a shell multipass shell pki-lab
Stop the VM multipass stop pki-lab
Start it again multipass start pki-lab
Copy a file out of the VM multipass transfer pki-lab:pki-lab/issue/web.crt .
Delete it for good multipass delete --purge pki-lab

Each lesson’s step-ca runs in the foreground. After a restart, start it again from the VM shell, as in module 2.

You can skip the VM and install the tools directly. The lesson commands are the same. Some lab steps change system services, and your output shows your own paths instead of /home/ubuntu.

Download and install the step CLI package:

terminal
wget https://github.com/smallstep/cli/releases/download/v0.31.0/step-cli_0.31.0-1_amd64.deb
sudo dpkg -i step-cli_0.31.0-1_amd64.deb

Download and install the step-ca package:

terminal
wget https://github.com/smallstep/certificates/releases/download/v0.30.2/step-ca_0.30.2-1_amd64.deb
sudo dpkg -i step-ca_0.30.2-1_amd64.deb

On ARM machines, swap amd64 for arm64 in both file names.

Install the remaining tools from your distribution:

terminal
sudo apt install -y openssl nginx freeradius eapoltest openssh-server curl jq

Install certbot from the Snap Store. Ubuntu’s apt package is an older 2.x release:

terminal
sudo snap install --classic certbot

Make the lab folder:

terminal
mkdir -p ~/pki-lab

The lab VM also makes three changes you’ll meet in the lessons on a host install:

  • The freeradius service starts on install. Module 5 stops it.
  • nginx’s default site holds port 80, which certbot needs in module 7.
  • Module 8 needs the /run/sshd folder.

Each lesson shows the fix where it matters.

step keeps your CA in ~/.step. Run step path to see where. To start over on a host install, stop step-ca and delete ~/.step and ~/pki-lab.

Package names and versions change over time. Check each project’s official install docs if a command fails.