Skip to content

Blog

How to Write a Runbook (with a Deployment Template)

Write runbooks anyone on the team can follow under pressure: what to include, commands with expected output, console screenshots, rollback and a template.

By Steppr · · 8 min read

How to Write a Runbook (with a Deployment Template)

A runbook is the document you want open when something has to be done right, often under pressure: a deployment, a failover, a certificate renewal, a 3 a.m. alert. A good runbook lets anyone on the team carry out the procedure correctly, even if they've never done it before. A bad one sends them to Slack to ask the one person who knows.

This guide covers what a runbook should contain, how to write the steps, what to do with commands and screenshots, and how to keep runbooks trustworthy. There's a template for a deployment runbook at the end.

Runbook, playbook or SOP?

The terms overlap, and teams use them differently. A common split:

DocumentAnswersExample
Runbook"How do I carry out this specific operation?"Deploy the API to production
Playbook"How do we respond to this kind of situation?"Responding to a security incident
SOP"What's the approved way to do this routine task?"Monthly access review

A playbook often links to several runbooks. During an incident, the playbook says "fail over the database", and the failover runbook says exactly how.

What every runbook needs

The last three are the ones most often missing, and the ones you need most when something breaks.

Write steps for someone under pressure

People use runbooks when they're stressed, tired or new. Write for that reader.

Put commands in text, not screenshots

Commands belong in code blocks people can copy. Never put a command only in a screenshot: it can't be copied, searched or diffed, and one mistyped character can do damage.

Good command steps include:

Example:

5. Check that you're pointed at the production cluster:

   ```bash
   kubectl config current-context
   ```

   Expected output: `prod-us-east-1`. If you see anything else, stop.

Use screenshots for consoles and dashboards

Plenty of operations happen in a web console or a GUI: a cloud provider's console, a load balancer setting, a feature-flag dashboard, a CI pipeline's manual approval button. For those steps, a screenshot with the right button highlighted prevents mistakes, especially in consoles with dozens of similar options.

Always include rollback

Every runbook that changes something should say how to undo it, written at the same level of detail as the procedure. Include the point of no return, if there is one: "After step 9, the old version can't be restored automatically. Restore from the backup instead."

Also say when to roll back. "If error rates stay above 2% for five minutes after the deploy, roll back" is better than leaving it to judgment at 3 a.m.

Test runbooks before you need them

A runbook nobody has run is a guess. Test them:

Keep them where people will find them

Store runbooks somewhere searchable and reachable during an outage. If your wiki goes down with your production systems, that's a problem. Many teams keep runbooks in the same repository as the code, in Markdown, so changes are reviewed like code. Link each alert to its runbook so the on-call engineer lands on the right page.

Deployment runbook template

Title: Deploy [service] to production

Purpose: Release a new version of [service]. Use for every
production release.

Owner: [team or person]     Last tested: [date]

Impact: [User-visible effect, expected downtime]
Risk: [What could go wrong]

Prerequisites
- Access: [roles, clusters, consoles]
- Approval: [who approves, where]
- Window: [allowed times]

Pre-checks
1. Confirm the release passed CI: [link]
2. Confirm the database backup completed: [command or link]
3. Announce the deploy in [channel]

Procedure
1. [Command or action]
   Expected: [output or what you see]
2. ...

Verification
1. Check the health endpoint: [command] -> expect 200
2. Check error rate on [dashboard link] for 10 minutes

Rollback
Roll back if: [clear condition]
1. [Command or action]
2. Verify: [how]

Escalation
- First: [on-call rotation or person, how to reach]
- Then: [team lead]

Capture the console steps faster

Command steps are quick to document: you paste the command and its output. Console and GUI steps are slower, because each one needs a screenshot taken, cropped and highlighted, and retaken when the console changes.

If you work on a Mac, Steppr can handle those parts. You do the operation once in the console while it records. Each click becomes a numbered step with a screenshot, named after the real button or field, and you can blur account IDs or keys before sharing. Copy the steps as Markdown and paste them into your runbook in Notion, Confluence, GitHub or your docs editor, screenshots included. Steppr records clicks and keystrokes, so keep the actual terminal commands as text in code blocks, as described above.

Frequently asked questions

How detailed should a runbook be?

Detailed enough that someone who has never done the operation, but has the right access, can complete it without asking for help. If you'd have to explain a step out loud, write the explanation down.

Should runbooks be automated?

Automate what you can, and keep the runbook. The runbook then documents how to run the automation, what to check, and what to do when the automation fails.

What format should a runbook use?

Any format your team can search and edit quickly. Markdown in a Git repository, a wiki page in Confluence or Notion, or your incident tool's runbook feature all work. Consistency matters more than the tool.

For routine procedures that aren't operations, see how to write an SOP. For mapping a whole process before writing it down, see how to document a process.

Make your first guide in a minute.

Steppr is in public beta. Try every feature free for 14 days, then buy a lifetime license for $9.99. No subscription, no account.

Download for Mac