Infrastructure
Homelab Bootstrap Scripts
The shell scripts that turn a fresh Ubuntu box into a managed homelab node in one pass — Docker, the Portainer agent, and whatever comes next as the lab grows.
Problem
Every new box in the homelab needs the same handful of things before it's actually useful: Docker installed, the daemon enabled on boot, and a Portainer agent running so it shows up in the central Portainer instance without a manual click-through. Doing that by hand, again, for the fifth VM this month, is exactly the kind of thing that should be one script.
What it does today
The current script (Ubuntu-Portainer-agent.sh) is intentionally small: it installs prerequisites, adds Docker's official APT repo and GPG key, installs Docker CE plus the Compose and Buildx plugins, enables the daemon, and starts a Portainer agent container listening on port 9001 — pointed at whatever the main Portainer server's address is.
docker run -d \
-p 9001:9001 \
--name portainer_agent \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_agent_data:/data \
portainer/agentWhere this is headed
This started as a single script because that's what the lab needed at the time. As the node count grows, the honest next step is templating it against Proxmox so a new VM can be provisioned and bootstrapped in one pass, instead of cloning a template and then SSHing in to run this manually. Marked experimental because it's still exactly that — one script, growing as new nodes expose new repeated setup steps.