Skip to content

Document Your HomeLab with Markdown

Updated

Good documentation should be easy to write, easy to read, and still useful when you change your tools. That is why I like Markdown: it keeps the focus on the information, not the application you use to manage it.

For a HomeLab, that is especially useful. Your services might be running perfectly today—but a few months later, will you remember where the configuration lives, why you changed that setting, or how to restore a backup? I use Markdown to keep that context alongside the commands and configuration, rather than trying to remember everything myself.

A Markdown document is a plain-text file, usually ending in .md. A few simple symbols add headings, lists, links, tables, and code blocks. The source stays readable, while a Markdown preview turns it into a formatted document.

What makes Markdown useful:

  • Portable: Keep your documents as plain-text files instead of tying them to one application.
  • Easy to edit: Write and read them in any text editor, even without a formatted preview.
  • Git-friendly: Track changes, compare revisions, and review documentation alongside your configuration.
  • Easy to share: Use the same source files in a repository, a documentation site, or another compatible tool.
  • Automation-friendly: Scripts and AI agents can work directly with the text.

Let's go through the formatting options you can use in your HomeLab documentation. Some extras, such as tables and checkboxes, need support from your editor or publishing platform; the examples below label those differences.

Headings: organize your service documentation

Use headings to make configuration, maintenance, and recovery instructions easy to find:

# HomeLab Service

## Overview

## Installation

### Prerequisites

### Configuration

## Backup and restore

There are six levels, from # to ######. Always leave a space after the hash marks.

Use one # title for a standalone document, ## for its main sections, and ### for subsections. If your website already displays the title, start the body at ##.

My rule here is simple: if something breaks, I should be able to find the relevant instructions without reading the entire document.

Paragraphs and line breaks

An empty line separates paragraphs:

This service runs in a Docker container.

Its configuration is maintained in a Git repository.

A single newline usually remains part of the same paragraph. For a deliberate line break, add two spaces at the end of the line—or a trailing backslash in CommonMark-compatible renderers:

Service: Example Web Server\
Environment: Test

For normal explanations, use paragraphs. Line-break behavior can vary between applications, so check the preview.

Bold, italic, and strikethrough

**Important:** Take a backup before changing the configuration.

This step is *optional*.

***Do not skip the restore test.***

~~Old hostname~~ New hostname

Use bold for important details and italic for lighter emphasis. Underscores also work: _italic_ and __bold__.

Strikethrough uses ~~two tildes~~ and requires an extension such as GitHub Flavored Markdown (GFM). It can show a change, but replace outdated operational instructions rather than leaving conflicting versions in place.

Lists: separate information from procedures

Bullet lists

Use bullets when the order does not matter:

- Docker host
- Internal DNS record
- Reverse proxy
- Backup location

Start each item with - , including the space. * and + also work, but keep the style consistent.

Numbered steps

Use numbers when the sequence matters:

1. Check the current service status.
2. Verify that a recent backup exists.
3. Apply the configuration change.
4. Confirm the service is healthy.

You can write 1. for every item and let the renderer number them. Explicit numbers are easier to follow in the plain-text source.

Nested lists and commands inside a step

Indent child content beneath its parent:

- Infrastructure
    - Hypervisor
    - Storage
- Services
    - DNS
    - Monitoring

1. Check the containers in this Compose project.

   ```bash
   docker compose ps
   ```

2. Inspect the logs if something is unhealthy.

The text after 1. starts three spaces in, so its code block is indented three spaces too. Match the parent item's content indentation to keep commands inside the correct step.

Task lists — GFM

- [x] Create the service document
- [ ] Configure monitoring
- [ ] Test backup restoration

Use - [ ] for an unfinished task and - [x] for a completed one. Keep the leading hyphen and spaces. Whether you can click the checkbox depends on the application.

Checklists are useful for repeatable work, but checking a box should mean you actually verified the result—not just ran a command.

[Docker documentation](https://docs.docker.com/)

[Backup procedure](./backup-procedure.md)

[Network documentation](../network/overview.md)

Put the label in square brackets and the destination in parentheses. Relative paths are useful for connecting files in a repository; check them whenever you move a document. A website may need page URLs instead of .md file paths.

Use clear filenames such as backup-procedure.md. For spaces in destinations, use %20:

[Backup procedure](./Backup%20Procedure.md)

I would link to one maintained backup procedure rather than copy the same instructions into every service document.

On GitHub, ## Backup and restore normally produces this heading link:

[Jump to backup and restore](#backup-and-restore)

Heading IDs depend on the renderer. Use its heading-link control to copy the actual anchor; not every Markdown preview generates one.

Keep a repeated destination in one place:

Read the [Docker documentation][docker-docs].

Check the [installation instructions][docker-docs].

[docker-docs]: https://docs.docker.com/

Images: include diagrams and screenshots

![Network diagram showing the firewall, switch, and servers](./images/network.png)

Image syntax is a link with an extra !. Write descriptive alt text, and keep the image file alongside your documentation when sharing it.

Image resizing is not standard Markdown, and some publishing platforms restrict images. Check the destination before relying on either.

Code: make commands and configuration clear

Inline code

Edit `compose.yaml`, then inspect the service with `docker compose ps`.

Rendered:

Edit compose.yaml, then inspect the service with docker compose ps.

Use backticks for filenames, paths, commands, and literal values. If the text contains a backtick, surround it with two:

``a literal ` backtick``

Code blocks

Put three backticks before and after a block. Add a language name to request syntax highlighting:

```bash
docker compose ps
docker compose logs --tail=50
```

```yaml
services:
  web:
    image: nginx:alpine
```

Common labels include bash, yaml, json, python, and text. Highlighting depends on the renderer; a code block never executes its contents. The YAML above is a formatting example, not a complete deployment.

For practical instructions, say where to run the command. Leave out prompts such as $ so commands can be copied, and keep example output in a separate block.

Showing code fences in documentation

When your example contains three backticks, wrap it in a longer outer fence:

````markdown
```bash
docker compose ps
```
````

Here, four backticks keep the inner three-backtick block intact.

Blockquotes: highlight important caveats

> **Warning:** Do not expose the management interface directly to the internet.
>
> Use a private network or an appropriate protected access method.

Rendered:

Warning: Do not expose the management interface directly to the internet.

Use a private network or an appropriate protected access method.

Start each line with >. A line containing only > separates paragraphs inside the quote. This is a portable way to make warnings stand out without special callout syntax.

Tables: summarize service details — GFM

| Service | Access | Port |
| :--- | :---: | ---: |
| Web server | HTTPS | 443 |
| SSH | Private network | 22 |

Rendered:

Service Access Port
Web server HTTPS 443
SSH Private network 22

Add a header row followed by a delimiter row. Three hyphens per cell are a safe convention. Colons request left, center, or right alignment.

Escape a literal pipe with \|, including inside inline code in a table:

| Command | Purpose |
| --- | --- |
| `journalctl \| grep error` | Filter log output |

Keep tables short. Commands, long explanations, and configuration blocks are usually easier to read in their own sections.

Dividers and literal characters

Use --- on its own line for a divider, with blank lines around it:

First section.

---

Next section.

Without the blank line above it, --- can turn the preceding text into a heading instead.

Escape formatting characters with a backslash when you want literal text:

\*This is not italic.\*

\# This is not a heading.

1\. This is text, not a numbered list.

Inside code blocks, ordinary Markdown formatting is already disabled.

Optional extras for technical documentation

Tables, tasks, and strikethrough are GFM extensions, not core CommonMark. The features below need additional support too. Keep important instructions understandable even if an extra feature does not render.

YAML frontmatter

Some tools read metadata at the very beginning of a file:

---
title: "Example Web Server"
status: active
environment: test
tags:
  - homelab
  - service
---

In the actual document, write the YAML between --- lines without a code fence. Use spaces for indentation and quote values when punctuation could change their meaning.

Metadata can help organize service documents, but supported fields depend on the tool. A basic Markdown renderer may display the block instead of treating it as metadata.

GitHub alerts

GitHub supports styled alerts:

> [!WARNING]
> Verify that you can restore the backup before changing the service.

Its types are NOTE, TIP, IMPORTANT, WARNING, and CAUTION. Elsewhere, use a plain blockquote with **Warning:** if alerts are unsupported.

Diagrams with Mermaid

A supported renderer can turn a mermaid code block into a diagram:

```mermaid
flowchart LR
    Client --> Proxy[Reverse proxy]
    Proxy --> App[Application]
```

That can be useful for documenting how traffic reaches a service. Without Mermaid support, the reader sees the diagram's source code instead.

Footnotes and HTML

Some platforms support footnotes:

The service uses an internal DNS name.[^dns]

[^dns]: Clients need a resolver that knows this internal zone.

Footnotes are not core CommonMark or part of the formal GFM specification. A normal link or short explanation is a simpler fallback.

Raw HTML is also renderer-dependent: tags may be removed, and Markdown inside HTML blocks may not be parsed. Hidden comments are not private—anyone with the source can read them.

The goal is not complicated formatting. It is a document that answers: What is running here, how do I manage it, and what do I do when it breaks?

References

Keep exploring

Browse more on these topics, or compare notes with the community. Guides and videos stand on their own.

Discord community

Build, break, and learn together.

Talk homelabs, self-hosting, and automation with people building this stuff. This is a community, not personal support.

Join Discord(opens in a new tab)