
August 23, 2026
7 min read
Table of Contents
By Kokil Thapa | Last reviewed: August 2026
You want to learn DevOps, but reading docs and watching tutorials only gets you so far. The real skill comes from building, breaking, and fixing real systems—exactly what a home lab gives you. Whether you're a developer looking to expand into infrastructure, a sysadmin moving to automation, or a student aiming for your first DevOps role, these projects will force you to solve the same problems you'll face in production. I've used variations of these setups on real client projects—from Laravel deployments to eCommerce platforms—and they work. No cloud credits, no enterprise hardware. Just free tools, a spare laptop or Raspberry Pi, and a weekend.
What hardware do you actually need for a DevOps home lab?
You don't need a rack of servers. A single spare laptop, a Raspberry Pi 4/5, or even an old desktop will work. Here's what I use on most client projects and my own lab:
- Primary node: Any x86 machine with 8 GB RAM, 120 GB SSD (a 2018+ laptop or NUC works).
- Secondary nodes: 2–3 Raspberry Pi 4/5 (4 GB RAM each) or old laptops.
- Network: Gigabit switch + CAT6 cables (or just use your home router).
- Storage: 1 TB external SSD for backups (optional but recommended).
Total cost if you buy everything new: ~Rs 40,000 (~USD 300). If you repurpose old hardware, it's free. For context, I run a 3-node Kubernetes cluster on two old ThinkPads and a Pi 5—exactly the same setup I use to test deployments for eCommerce clients before pushing to production.
How do you set up a CI/CD pipeline on a home lab?
CI/CD isn't just for cloud providers. You can build a full pipeline on a single machine using GitLab CE (self-hosted) or GitHub Actions runners. Here's how I set it up for a Laravel API project last month:
- Install GitLab CE on your primary node:
# On Ubuntu 24.04 LTS sudo apt update && sudo apt install -y curl openssh-server ca-certificates tzdata perl curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash sudo EXTERNAL_URL="http://your-lab-ip" apt install gitlab-ce - Register a GitLab Runner:
# Install runner curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash sudo apt install gitlab-runner # Register (use the token from GitLab Admin → Runners) sudo gitlab-runner register \ --non-interactive \ --url "http://your-lab-ip/" \ --registration-token "PROJECT_REGISTRATION_TOKEN" \ --executor "shell" \ --description "home-lab-runner" - Create a
.gitlab-ci.ymlpipeline:stages: - test - build - deploy test: stage: test script: - composer install --prefer-dist --no-progress - php artisan test only: - merge_requests build: stage: build script: - docker build -t registry.local/laravel-app:$CI_COMMIT_SHORT_SHA . - docker push registry.local/laravel-app:$CI_COMMIT_SHORT_SHA only: - main deploy: stage: deploy script: - ssh user@node2 "docker pull registry.local/laravel-app:$CI_COMMIT_SHORT_SHA" - ssh user@node2 "docker stop laravel-app || true" - ssh user@node2 "docker rm laravel-app || true" - ssh user@node2 "docker run -d --name laravel-app -p 8000:8000 registry.local/laravel-app:$CI_COMMIT_SHORT_SHA" only: - main - Set up a local Docker registry:
# On your primary node docker run -d -p 5000:5000 --restart=always --name registry registry:2Then add
registry.localto your/etc/hostspointing to your primary node's IP.
A common mistake I see: developers forget to open port 5000 on the firewall. On Ubuntu:
sudo ufw allow 5000/tcp
How do you run Kubernetes on a home lab with limited resources?
You don't need a data center. k3s (a lightweight Kubernetes distro) runs on Raspberry Pis and old laptops. Here's how I deployed it for a WooCommerce client who wanted to test autoscaling:
- Install k3s on your primary node (master):
curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644This gives you a single-node cluster. To add worker nodes:
- Get the node token:
sudo cat /var/lib/rancher/k3s/server/node-token - Join worker nodes:
curl -sfL https://get.k3s.io | K3S_URL=https://your-master-ip:6443 K3S_TOKEN=your-token sh - - Verify the cluster:
kubectl get nodes NAME STATUS ROLES AGE VERSION master Ready master 5m v1.29.4+k3s1 node2 Ready <none> 2m v1.29.4+k3s1 node3 Ready <none> 1m v1.29.4+k3s1 - Deploy a sample app (Nginx):
kubectl create deployment nginx --image=nginx kubectl expose deployment nginx --port 80 --type=LoadBalancerk3s includes a built-in LoadBalancer (klipper-lb) that works without cloud providers.
A common gotcha: k3s uses containerd by default, not Docker. If you need Docker:
curl -sfL https://get.k3s.io | sh -s - --docker
What infrastructure-as-code tools should you learn first?
Start with Terraform and Ansible. They solve different problems but work together. Here's how I use them on client projects:
| Tool | Use Case | Example | When to Use |
|---|---|---|---|
| Terraform | Provision cloud resources (servers, networks, databases) | Create a Linode instance + firewall rules | When you need to spin up/down infrastructure |
| Ansible | Configure servers (install packages, deploy apps) | Install Docker, Nginx, and deploy a Laravel app | When you need to manage existing servers |
Terraform example (Linode):
terraform {
required_providers {
linode = {
source = "linode/linode"
version = "2.12.0"
}
}
}
provider "linode" {
token = var.linode_token
}
resource "linode_instance" "web" {
label = "web-server"
image = "linode/ubuntu24.04"
region = "ap-west"
type = "g6-standard-1"
authorized_keys = [var.ssh_key]
}
resource "linode_firewall" "web_fw" {
label = "web-firewall"
inbound {
label = "http"
action = "ACCEPT"
protocol = "TCP"
ports = "80"
ipv4 = ["0.0.0.0/0"]
}
}
Ansible example (Docker setup):
---
- name: Install Docker
hosts: all
become: yes
tasks:
- name: Install dependencies
apt:
name:
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
state: present
update_cache: yes
- name: Add Docker GPG key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: Add Docker repo
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu noble stable
state: present
- name: Install Docker
apt:
name: docker-ce
state: present
- name: Add user to docker group
user:
name: "{{ ansible_user }}"
groups: docker
append: yes
A common mistake: mixing Terraform and Ansible for the same task. Use Terraform for immutable infrastructure (servers, networks) and Ansible for mutable configuration (packages, users).
How do you build a monitoring stack with Prometheus and Grafana?
Monitoring isn't optional—it's how you catch problems before users do. Here's how I set it up for a legal-tech portal that needed 99.9% uptime:
- Install Prometheus:
# Create a prometheus.yml config file global: scrape_interval: 15s scrape_configs: - job_name: 'prometheus' static_configs: - targets: ['localhost:9090'] - job_name: 'node' static_configs: - targets: ['node1:9100', 'node2:9100'] # Run Prometheus in Docker docker run -d -p 9090:9090 -v ./prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus - Install Node Exporter on all nodes:
# On each node docker run -d -p 9100:9100 --net="host" --pid="host" -v "/:/host:ro,rslave" prom/node-exporter - Install Grafana:
docker run -d -p 3000:3000 --name=grafana grafana/grafanaDefault login: admin/admin. Change it immediately.
- Add Prometheus as a data source in Grafana:
- Go to Configuration → Data Sources → Add data source
- Select Prometheus
- URL:
http://your-prometheus-ip:9090 - Save & Test
- Import a dashboard:
- Go to Dashboards → Import
- Use dashboard ID
1860(Node Exporter Full) - Select your Prometheus data source
A common gotcha: Node Exporter needs --net="host" and --pid="host" to collect system metrics. Without these, you'll only see container metrics.
What are the 10 best home-lab projects ranked by learning value?
Not all projects teach you the same skills. Here's my ranked list based on what I've seen working engineers actually need:
- CI/CD Pipeline (GitLab CI + Docker)
- Skills: automation, testing, deployment strategies
- Why #1: Every DevOps job requires CI/CD. This project forces you to think about build times, artifact storage, and rollback strategies.
- Kubernetes Cluster (k3s)
- Skills: container orchestration, scaling, service discovery
- Why #2: Kubernetes is the de facto standard. k3s lets you learn the concepts without the complexity of full K8s.
- Infrastructure-as-Code (Terraform + Ansible)
- Skills: reproducibility, version control for infrastructure
- Why #3: IaC is how modern teams manage servers. This project teaches you to treat infrastructure like code.
- Monitoring Stack (Prometheus + Grafana)
- Skills: observability, alerting, metric visualization
- Why #4: You can't improve what you don't measure. This project teaches you to instrument applications and set up meaningful alerts.
- Log Aggregation (Loki + Promtail)
- Skills: centralized logging, log querying
- Why #5: When something breaks, logs are your first line of defense. This project teaches you to collect and analyze logs from multiple sources.
- Secrets Management (Vault)
- Skills: security, credential rotation, access control
- Why #6: Hardcoded secrets are a security nightmare. This project teaches you to manage credentials properly.
- GitOps Workflow (ArgoCD)
- Skills: declarative infrastructure, continuous delivery
- Why #7: GitOps is how modern teams manage Kubernetes. This project teaches you to sync your cluster state with Git.
- Serverless Functions (OpenFaaS)
- Skills: event-driven architecture, scaling to zero
- Why #8: Serverless is growing fast. This project teaches you to build and deploy functions without managing servers.
- Multi-Region Deployment (Linode + Terraform)
- Skills: high availability, disaster recovery
- Why #9: Real systems need redundancy. This project teaches you to deploy across multiple regions.
- Home Automation (Home Assistant + MQTT)
- Skills: IoT, event streaming, edge computing
- Why #10: Fun and practical. This project teaches you to work with sensors and real-time data.
A common mistake: jumping straight to Kubernetes without mastering CI/CD first. The projects are ordered for a reason—each builds on the last.
How do you troubleshoot common home-lab problems?
Your lab will break. That's the point. Here's how I fix the most common issues I see on client projects and my own lab:
| Problem | Symptoms | Diagnosis | Fix |
|---|---|---|---|
| Docker containers won't start | Port already in use, permission denied | docker logs <container>, ss -tulnp | grep <port> | Kill the conflicting process or change the port |
| k3s nodes not joining | kubectl get nodes shows nodes as NotReady | journalctl -u k3s -f on the worker node | Check firewall rules (sudo ufw allow 6443/tcp), verify token |
| Terraform state mismatch | Terraform wants to destroy/create resources you didn't change | terraform plan shows unexpected changes | Check for manual changes, use terraform import to sync state |
| Prometheus scrape failures | Targets show "DOWN" in Prometheus UI | curl http://<target>:9100/metrics fails | Check Node Exporter logs (docker logs node-exporter), verify network connectivity |
| GitLab CI jobs stuck | Jobs show "pending" forever | gitlab-runner verify, gitlab-runner list | Restart the runner (sudo systemctl restart gitlab-runner), check for resource limits |
| Ansible playbook fails | Playbook stops with "unreachable" or "failed" tasks | ansible -m ping all, ansible-playbook --check playbook.yml | Check SSH connectivity, verify inventory file, use --limit to test on one host |
A common mistake: assuming the problem is with the tool, not your configuration. 90% of issues I see are caused by:
- Incorrect file permissions (
chmod 644vschmod 600) - Firewall blocking ports (
sudo ufw status) - Resource limits (check
free -manddf -h) - Version mismatches (always pin versions in config)
Start building your DevOps skills today
You don't need a cloud account or expensive hardware to learn DevOps. Pick one project from this list—CI/CD is the best starting point—and spend a weekend building it. Break it, fix it, then move to the next one. The skills you learn will apply directly to real-world systems, whether you're deploying a Laravel application, managing an eCommerce platform, or building infrastructure for a startup.
When you're ready to take your skills to the next level, I offer DevOps consulting and training for teams and individuals. Let's build something real together.

