# 🧨 PiForge: Provision Your Raspberry Pi Without Ever Plugging in a Monitor

I love Raspberry Pi. But you know what I don’t love?

* Fumbling around with tiny HDMI cables
    
* Hitting the “login” screen just to configure Wi-Fi
    
* Not knowing what IP my Pi grabbed from the router
    
* Doing it **again and again** for every new setup
    

If you’ve been through that ritual, I feel your pain.

That's exactly why I built **PiForge** — an automation script that **flashes** and **provisions** a Raspberry Pi OS image so completely that you never need to plug in a display, keyboard, or even a mouse. It’s like a zero-touch setup, but for hobbyists, homelabbers, and tinkerers like us.

[👉 Check it out on GitHub](https://github.com/pankajackson/PiForge)

---

## 🛠️ What is PiForge?

Imagine this:

You plug in your SD card, run one command, and walk away.  
Next time you insert it into your Pi, it boots up with:

* ✅ Your custom hostname
    
* ✅ Your Wi-Fi or Ethernet already configured
    
* ✅ Your SSH keys in place
    
* ✅ A known static IP address
    
* ✅ No need to scan your network to find it
    
* ✅ A running post-boot provisioning service that ties it all together
    

No guessing. No display. No hassle.

PiForge turns a dumb SD card into a smart, pre-configured boot drive.

---

## ⚡ Real-World Use Cases

### 1\. **Home Automation Setup**

Setting up **Home Assistant** or **Zigbee2MQTT** on a Pi 5?  
With PiForge, you can configure the Pi **before** even inserting it into the device. Add static IPs for MQTT, enable SSH, and you're good to go.

### 2\. **IoT or Sensor Network Deployment**

Need to deploy 10 Pis around your home, farm, or office?  
PiForge lets you flash and configure each one with a **unique hostname and IP**, so you just plug, power, and forget.

### 3\. **Teaching & Workshops**

If you're running a Raspberry Pi workshop or class, setting up 20 devices can be chaos. With PiForge, you can prep all the cards ahead of time and hand them out like candy 🍬.

### 4\. **Cluster Computing (Pi Cluster)**

Building a Raspberry Pi Kubernetes or Docker Swarm cluster?  
Use PiForge to preconfigure static IPs and SSH across all nodes, so they can talk right away. No login required.

---

## 💥 Why This Beats Imaging Tools

Yes, tools like Raspberry Pi Imager and BalenaEtcher are great…  
**But they only flash**.

They don’t **provision**.

PiForge provisions everything **before** first boot. No post-flash juggling. No hand-editing files on the boot partition. No weird errors.

---

## 🧪 Tested on Pi 5

And yes—this works flawlessly on the brand new **Raspberry Pi 5**.  
(And should be backward-compatible with Pi 4, 3, etc., too.)

Faster boot, cleaner automation, and more fun tinkering.

---

## 🔥 Behind the Scenes: How It Works

* **Step 1**: You run [`flasher.py`](http://flasher.py)
    
* **Step 2**: It downloads the latest Raspberry Pi OS image (Lite/Desktop/Full — your choice)
    
* **Step 3**: It detects your USB or SD card and flashes the image
    
* **Step 4**: It mounts the partitions and injects your config:
    
    * Hostname, Timezone
        
    * SSH keys and user credentials
        
    * Wi-Fi/Ethernet (static or DHCP)
        
* **Step 5**: It adds a postboot systemd service to finalize everything on first boot
    
* **Step 6**: It logs everything for you to debug later if needed
    

You just plug the SD into your Pi and power it up. Done.  
Your Pi appears on the network with the name and IP you expected.

---

## 🌐 Bonus: View Logs in Browser After Boot

Wanna know what happened during the first boot?  
Point your browser to:

```http
http://<your-pi-ip>:8182/logview.html
```

Yup, no SSH needed. It serves up its own logs via a micro webserver.  
How cool is that?

---

## 🧠 Final Thoughts

When you’ve set up one Raspberry Pi, you’ve set up them all.  
But **PiForge** turns that process from a chore into a **one-liner**.

For hobbyists, educators, homelabbers, and automation nerds—it’s a game changer.

Give it a try. And the next time someone asks,

> “Hey, how’d you set up that Pi so fast?”

Just smile. 😎

---

### 📥 Get Started Now

```bash
git clone https://github.com/pankajackson/PiForge.git
cd PiForge
sudo python flasher.py
```

🚀 [https://github.com/pankajackson/PiForge](https://github.com/pankajackson/PiForge)

---

### 🔔 **Stay in the Loop**

PiForge is just getting started. New features, support for more OS flavors, advanced provisioning workflows, and maybe even a web dashboard are on the horizon.

Want to be the first to know?  
**Star the repo**, **watch for updates**, or follow along at [github.com/pankajackson/PiForge](http://github.com/pankajackson/PiForge) 🚀

Let’s forge the future of Pi provisioning—together. 🧪💻
