Build a WikiDocs snapshot of an Unraid server dynamically
How I built a script that snapshots my Unraid box (hardware, disks, shares, Docker, etc.) and publishes it as pretty Markdown pages in WikiDocs.
I’ve always wanted a way to document the environment my servers are running in, and to access that info without SSH’ing in and digging around. I started using WikiDocs and was doing it all manually. Then I realized: why am I doing this manually? The server already knows what it is running. Let’s make it do the work for me.
I looked around to see if anyone had done this already and didn’t find much, so I opened ChatGPT and started a little vibe-coding session. The goal was simple: build a script that collects the data I care about and renders it as Markdown for WikiDocs.
It came back with a long list across System Info, Hardware, Networking, Users and Groups, Services and Software, and Docker. For example:
# Hostname and OS hostnamectl # Distribution & version lsb_release -a # works on Ubuntu/Debian cat /etc/os-release # universal fallback # Kernel version uname -a # Uptime and load uptime
It also suggested saving output to structured Markdown. That fits WikiDocs perfectly, since it works off a folder tree with content.md files.
mkdir -p ~/server-docs hostnamectl > ~/server-docs/system-info.txt lscpu > ~/server-docs/cpu.txt lsblk -o NAME,SIZE,TYPE,MOUNTPOINT > ~/server-docs/disks.txt ...
Rendering to WikiDocs
After a few iterations, I had it output everything in a format WikiDocs can read. The plan was to generate a Markdown file for each section under servers/unraid, with a landing page and subpages for disks, Docker, networking, and more. I ended up with a structure like this:
. ├── content.md ├── unraid │ ├── content.md │ ├── disks │ │ ├── content.md │ │ ├── disk-sda │ │ │ └── content.md │ │ ├── disk-sdb │ │ │ └── content.md │ │ ├── disk-sdc │ │ │ └── content.md │ │ ├── disk-sdd │ │ │ └── content.md │ │ ├── disk-sde │ │ │ └── content.md │ │ ├── disk-sdf │ │ │ └── content.md │ │ ├── disk-sdg │ │ │ └── content.md │ │ ├── disk-sdh │ │ │ └── content.md │ │ ├── disk-sdi │ │ │ └── content.md │ │ ├── disk-sdj │ │ │ └── content.md │ │ ├── disk-sdk │ │ │ └── content.md │ │ ├── disk-sdl │ │ │ └── content.md │ │ ├── disk-sdm │ │ │ └── content.md │ │ ├── disk-sdn │ │ │ └── content.md │ │ ├── disk-sdo │ │ │ └── content.md │ │ ├── disk-sdq │ │ │ └── content.md │ │ ├── radeon-r7-a22mf061445000306 │ │ │ └── content.md │ │ ├── st3000dm001-1ch166-w1f3pr5b │ │ │ └── content.md │ │ ├── st3000dm001-1ch166-z1f334wp │ │ │ └── content.md │ │ ├── st3000vn000-1h4167-z31023t5 │ │ │ └── content.md │ │ ├── st3000vn000-1h4167-z31025dt │ │ │ └── content.md │ │ ├── st4000dm000-1f2168-s3019nam │ │ │ └── content.md │ │ ├── st4000dm000-1f2168-s3019nhk │ │ │ └── content.md │ │ ├── st4000dm000-1f2168-s3019vwq │ │ │ └── content.md │ │ ├── st4000dm000-1f2168-s301prlt │ │ │ └── content.md │ │ ├── st6000vn001-2bb186-zct3whxh │ │ │ └── content.md │ │ ├── st6000vn001-2bb186-zct3wj2j │ │ │ └── content.md │ │ ├── wdc-wd30ezrx-00dc0b0-wd-wcc1t0724596 │ │ │ └── content.md │ │ └── wdc-wds500g2b0a-00sm50-21117d801885 │ │ └── content.md │ ├── docker │ │ └── content.md │ ├── hardware │ │ └── content.md │ ├── networking │ │ └── content.md │ ├── old.md │ ├── services │ │ └── content.md │ ├── storage │ │ └── content.md │ ├── suggestions │ │ └── content.md │ ├── system │ │ └── content.md │ └── users │ ├── content.md │ └── versions │ └── 20250907_103358.md └── versions ├── 20250401_140453.md ├── 20250907_094433.md ├── 20250907_094658.md ├── 20250907_094722.md └── 20250907_094848.md
Each disk has its own content.md. Docker, hardware, networking, and the rest have their own content.md too. Everything updates nightly, which is very nice.

A Suggestions Page (what to fix next)
My server is a collection of older drives from retired NAS boxes, so I asked ChatGPT for a Suggestions page.
It built a page that scores each drive on SMART health, temperature, power-on hours, key attributes like reallocated or pending sectors, uncorrectable errors, CRC errors, NVMe wear, and a few model heuristics like the ST3000DM001.
Heck yeah—let’s add a Suggestions page that flags disks to swap/plan/monitor and gives upgrade notes. It scores each drive on SMART health, temps, power-on hours, key SMART attrs (reallocated/pending/uncorrectable/CRC), NVMe wear, and some model heuristics (e.g., ST3000DM001). It then writes:
/servers/unraid/suggestions/content.md
with:
“Replace soon”, “Plan replacement”, “Monitor” lists (sorted by risk)
reasons per drive
general upgrade tips (cooling, cables, tests, spare, capacity)
Here’s the full updated script (includes your previous fixes: capacity parsing, clickable links, M/D/YYYY, breadcrumbs), now with the Suggestions page.

Modularizing the script
The first pass was a monolith. I broke it into modules so I could run it from User Scripts in Unraid and schedule it with cron. I stored everything here:
/mnt/user/appdata/server-scripts/generate-wiki-snapshot/ │ ├─ config.env ├─ run.sh ├─ lib/ │ └─ common.sh └─ modules/ ├─ 01_collect_system.sh ├─ 02_collect_shares.sh ├─ 03_collect_disks.sh ├─ 04_render_pages.sh ├─ 05_disks_pages.sh └─ 06_suggestions.sh
A quick tip for multi-turn builds with ChatGPT: if it suggests an approach you do not want, tell it what you changed. Future answers will line up with your choices instead of it trying to steer you back.
Landing Page
Once the subpages existed, I added a landing page that shows the last update time, quick links to each section, and a short system summary. This runs after the other pages, so it can reference them.

Wrapping up
I came into this with a dream, a twenty dollar ChatGPT subscription, and almost no research on what to collect beyond my manual notes. The script has been solid for a month. My goal was a self-documenting environment that stays fresh automatically, and that is what it is doing. As I add more homelab gear, I will spin up similar scripts to feed WikiDocs.
What gotchas have I found?
- Some tasks were slow, and it was not obvious if they were stuck or just busy. I added timestamps to each phase so I could see progress in real time.
- The Mac ChatGPT app can see iTerm2, which saved a lot of copy and paste during debugging.
- Bash was fine, but I might refactor to Python later for fun, and to compare dependency and setup trade-offs.
- A few optimizations mattered, such as timeouts, skipping the Unraid flash drive in SMART, and avoiding deep du scans unless needed.
- I found that using the Mac app of ChatGPT would allow it to have access to iTerm2 so it could see what was happening on the screen instead of me copy and pasting back and forth.
The repo
Yes, I had ChatGPT package it because that was half the fun.I am accepting PRs, and you can have ChatGPT draft one for you.
GitHub Repo
Install and schedule
Here is how to get the scripts onto your Unraid box, run them once, and schedule nightly updates.
1) Clone the repo to Unraid
# pick a home for scripts mkdir -p /mnt/user/appdata/server-scripts cd /mnt/user/appdata/server-scripts # clone and enter the folder git clone https://github.com/jasontucker/unraid-wikidocs-snapshot.git generate-wiki-snapshot cd generate-wiki-snapshot
2) Configure paths
cp config.env.example config.env nano config.env
Recommended values:
WIKI_ROOT="/mnt/user/appdata/wikidocs/documents/servers/unraid" DOCS_DIR="/root/server-docs" FAST_RENDER=1 WIKI_USER="nobody" WIKI_GROUP="users"
Save and exit when done.
chmod +x run.sh modules/*.sh tools/*.sh ./run.sh
Quick check that WikiDocs now has pages:
ls -R /mnt/user/appdata/wikidocs/documents/servers/unraid
4) Schedule with the User Scripts plugin
- Open Unraid, go to Plugins, make sure User Scripts is installed.
- Go to Settings, then User Scripts, then click Add New Script.
- Name it something like Generate Wiki Snapshot and paste this:
#!/bin/bash /mnt/user/appdata/server-scripts/generate-wiki-snapshot/run.sh
- Click Save Changes, then Schedule.
- Choose Custom and use a daily cron. Example at 3:30 AM:
30 3 * * *
- Click Apply. You can also click Run Script to test right away.
5) Optional quality of life tweaks
- Turn on timestamps in the console by leaving the default logging in place.
- If SMART probes are slow on a specific device, set EXCLUDE_DEVS in config.env.
- If a share scan is heavy, keep FAST_RENDER=1. Set it to 0 if you want deeper du sizes.
Learn more and contribute
Full details, updates, and a place to open issues or PRs are here:
GitHub: https://github.com/jasontucker/unraid-wikidocs-snapshot