A community-maintained, pure Docker-based build system for 1Panel v2.
This project democratizes the build process of 1Panel, allowing developers and advanced users to compile the full 1Panel stack (Core + Agent + Frontend) from source without needing a complex local development environment.
- Why use this?
- Key Features
- Project Structure
- Quick Start
- Configuration
- Output Artifacts
- CI/CD Integration
- License
The official 1Panel build process involves multiple languages (Go, Node.js) and tools (GoReleaser). This repository wraps all that complexity into a single Dockerfile. Use this if you:
- Want to customize 1Panel (modify source code, change assets).
- Need to run 1Panel on unsupported architectures (e.g., specific RISC-V boards).
- Want to verify the build process for security auditing.
- 🐳 Zero Local Dependencies: No Go, Node.js, or complex toolchains required on your host machine.
- 🖥️ Multi-Architecture Ready: Native cross-compilation for
amd64,arm64,armv7,ppc64le,s390x,loong64, andriscv64. - 🔄 Cross-Version Compatible: Smart dependency handling ensures you can build both the latest
v2.xand older versions. - 📦 Standardized Output: Produces artifacts identical in structure to official releases, ready for production use.
diyv2/
├── Dockerfile # Master build definition
├── scripts/
│ └── download_resources.sh # Universal resource fetcher (keeps build robust)
└── README.md # Documentation
-
Clone the Repository
git clone https://github.com/your-repo/1panel-diy.git cd 1panel-diy/diyv2 -
Build the Builder Image Replace
v2.0.13with your desired version.docker build -f Dockerfile \ --build-arg VERSION=v2.0.13 \ -t 1panel-v2-builder . -
Run Build & Export Artifacts This command compiles the code inside a container and saves the results to
dist/.docker run --rm -v "$(pwd)/dist:/dist" 1panel-v2-builder -
Verify Output Your packages are now ready in
dist/:ls -lh dist/
Customize your build by passing --build-arg to the docker build command.
| Build Argument | Default | Description |
|---|---|---|
VERSION |
v2.0.13 |
The Git tag or branch of 1Panel to build. |
TARGET_ARCHES |
All Supported | Space-separated target architectures (e.g., "amd64 arm64"). |
INSTALLER_REF |
v2 |
The branch/tag of the installer repository to use for scripts. |
GO_VERSION |
auto in CI |
Golang version. CI resolves it from upstream core/agent go.mod; manual builds may still override it explicitly. |
NODE_VERSION |
20 |
Node.js version for frontend assets. |
Note on Architectures: Default list is
amd64 arm64 armv7 ppc64le s390x loong64 riscv64.
The generator produces standard tarballs that look exactly like official releases:
dist/
├── 1panel-v2.0.13-linux-amd64.tar.gz # The installation package
└── 1panel-v2.0.13-linux-amd64.tar.gz.sha256
Inside the tarball:
/1panel-core: Backend server binary./1panel-agent: Agent binary./1pctl: CLI management tool./install.sh: Standard install script.- And all necessary service files/language packs.
This project is CI-ready. The included .github/workflows/build.yml:
- Runs Daily: Checks 1Panel official releases.
- Auto-Builds: If a new official version is found that hasn't been built here, it triggers a build.
- Releases: Automatically creates a GitHub Release with the artifacts.
This project is open-sourced under the Apache License 2.0.
See the LICENSE file for more details.
Made with ❤️ by the Open Source Community