# Build your own OpenWrt router firmware with GitHub Actions

> Build custom router firmware on GitHub from one settings file.

- **What it does:** Sets up a GitHub project that builds custom OpenWrt router firmware for you. You push one settings file, GitHub compiles it, and you download the finished firmware files.
- **Agents:** Claude Code and Codex (through orbit-connect), Claude and ChatGPT (through the Orbit connector)
- **Install:** `npx -y --loglevel=error orbit-connect@0.3.33 install skl_1082b8e3d5b258d1e24cd0e5`
- **Creator:** @orbit.builders on Instagram
- **Safety:** Checked by Orbit: use with care. Runs third-party template build scripts; flashing custom firmware risks bricking router.
- **Last updated:** 2026-11-14
- **Page:** https://orbitinbox.app/s/build-your-own-openwrt-router-firmware-with-github-actions

## Skill

---
name: openwrt-actions-build
description: Use when you say "start my own router firmware build" or "build OpenWrt firmware with GitHub Actions"; it sets up the Actions-OpenWrt template so you push one .config file and GitHub Actions compiles the OpenWrt firmware and gives you the binaries in Artifacts.
---

# Build your own OpenWrt router firmware with GitHub Actions

## What it does

This is the Actions-OpenWrt template: build OpenWrt using GitHub Actions. You create your own repository from the template, generate a `.config` file with Lean's OpenWrt source code, push that `.config` file to the repository, and the build starts automatically. Progress can be viewed on the Actions page. When the build is complete, you click the `Artifacts` button in the upper right corner of the Actions page to download the binaries.

The repo contains four working parts:

- `.config` - the OpenWrt configuration file that decides target, device and packages (the one in this repo targets `ar71xx` / `generic`, device profile `tl-wdr6500-v2`).
- `.github/workflows/build-openwrt.yml` - the GitHub Actions workflow that does the build. The README says the source code repo can be changed through environment variables in the workflow file.
- `diy-part1.sh` and `diy-part2.sh` - the two customization scripts the workflow runs.

The README also suggests searching GitHub for `Actions-Openwrt` first, in case someone already built a firmware that meets your needs, and adding meta info about your firmware (such as architecture and installed packages) to your repository introduction.

## What you need

- A GitHub account, with GitHub Actions available on the repository.
- A `.config` file generated with Lean's OpenWrt source code (https://github.com/coolsnowwolf/lede).
- Time: the README notes it may take a long time to create a `.config` file and to build the firmware.

Flashing firmware onto a router can make the device unusable. Only flash firmware you built for your own device, and check the device profile in `.config` matches your exact router model and version before you flash anything.

## Setup

1. Create your own repository from the template:

```
https://github.com/P3TERX/Actions-OpenWrt/generate
```

2. Get a copy of this repo's files to read and compare against:

```bash
git clone https://github.com/zszszszsz/.config.git
```

3. Generate your `.config` file using Lean's OpenWrt source code (https://github.com/coolsnowwolf/lede). The README says you can change the source through environment variables in the workflow file `.github/workflows/build-openwrt.yml`.

4. Push the `.config` file to your GitHub repository, and the build starts automatically. Progress can be viewed on the Actions page. For the exact git steps you prefer, see GitHub's own docs; the project's README only says to push the file.

5. When the build is complete, click the `Artifacts` button in the upper right corner of the Actions page to download the binaries.

For the full write-up, see the project's README at https://github.com/zszszszsz/.config (the author's blog post, in Chinese, is linked there).

## How to use it with Claude

- "Read `.github/workflows/build-openwrt.yml` and explain each step of this OpenWrt build."
- "Which environment variables in the workflow file set the OpenWrt source code repo, and what would I change to use Lean's OpenWrt?"
- "Look at the `.config` file and tell me which target, subtarget and device profile it builds for."
- "List the LuCI apps and packages switched on in this `.config`."
- "Help me add my own customizations to `diy-part1.sh` and `diy-part2.sh`."
- "Write a repository description with the firmware architecture and installed packages, like the README's tips suggest."

## Credits

Made by zszszszsz (.config, from P3TERX's Actions-OpenWrt template), packaged by Orbit. Source: https://github.com/zszszszsz/.config - license: MIT.

Shared by @orbit.builders, credited on Orbit.