PPanel Server
Article 1.
All human beings are born free and equal in dignity and rights.
They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.
Article 12.
No one shall be subjected to arbitrary interference with his privacy, family, home or correspondence, nor to attacks upon his honour and reputation.
Everyone has the right to the protection of the law against such interference or attacks.
Article 19.
Everyone has the right to freedom of opinion and expression; this right includes freedom to hold opinions without interference and to seek, receive and impart information and ideas through any media and regardless of frontiers.
Source: United Nations β Universal Declaration of Human Rights (UN.org)
π Overview
PPanel Server is the backend component of the PPanel project, providing robust APIs and core functionality for managing
proxy services. Built with Go, it emphasizes performance, security, and scalability.
Key Features
- Multi-Protocol Support: Supports Shadowsocks, V2Ray, Trojan, and more.
- Privacy First: No user logs are collected, ensuring privacy and security.
- Minimalist Design: Simple yet powerful, with complete business logic.
- User Management: Full authentication and authorization system.
- Subscription System: Manage user subscriptions and service provisioning.
- Payment Integration: Supports multiple payment gateways.
- Order Management: Track and process user orders.
- Ticket System: Built-in customer support and issue tracking.
- Node Management: Monitor and control server nodes.
- API Framework: Comprehensive RESTful APIs for frontend integration.
π Quick Start
Prerequisites
- Go: 1.21 or higher
- Docker: Optional, for containerized deployment
- Git: For cloning the repository
Installation from Source
-
Clone the repository:
git clone https://github.com/perfect-panel/ppanel-server.git
cd ppanel-server
-
Install dependencies:
go mod download
-
Generate code:
chmod +x script/generate.sh
./script/generate.sh
-
Build the project:
make linux-amd64
-
Run the server:
./ppanel-server-linux-amd64 run --config etc/ppanel.yaml
π³ Docker Deployment
-
Build the Docker image:
docker buildx build --platform linux/amd64 -t ppanel-server:latest .
-
Run the container:
docker run --rm -p 8080:8080 -v $(pwd)/etc:/app/etc ppanel-server:latest
-
Use Docker Compose (create docker-compose.yml):
version: '3.8'
services:
ppanel-server:
image: ppanel-server:latest
ports:
- "8080:8080"
volumes:
- ./etc:/app/etc
environment:
- TZ=Asia/Shanghai
Run:
docker-compose up -d
-
Pull from Docker Hub (after CI/CD publishes):
docker pull ppanel/ppanel-server:latest
docker run --rm -p 8080:8080 ppanel/ppanel-server:latest
π API Documentation
Explore the full API documentation:
The documentation covers all endpoints, request/response formats, and authentication details.
| Project |
Description |
Link |
| PPanel Web |
Frontend for PPanel |
GitHub |
| PPanel User Web |
User interface for PPanel |
Preview |
| PPanel Admin Web |
Admin interface for PPanel |
Preview |
π Official Website
Visit ppanel.dev for more details.
π Architecture

π Directory Structure
.
βββ apis/ # API definition files
βββ cmd/ # Application entry point
βββ doc/ # Documentation
βββ etc/ # Configuration files (e.g., ppanel.yaml)
βββ generate/ # Code generation tools
βββ initialize/ # System initialization
βββ internal/ # Internal modules
β βββ config/ # Configuration parsing
β βββ handler/ # HTTP handlers
β βββ middleware/ # HTTP middleware
β βββ logic/ # Business logic
β βββ model/ # Data models
β βββ svc/ # Service layer
β βββ types/ # Type definitions
βββ pkg/ # Utility code
βββ queue/ # Queue services
βββ scheduler/ # Scheduled tasks
βββ script/ # Build scripts
βββ go.mod # Go module definition
βββ Makefile # Build automation
βββ Dockerfile # Docker configuration
π» Development
goctl api format --dir apis/user.api
Add a New API
- Create a new API file in
apis/.
- Import it in
apis/ppanel.api.
- Regenerate code:
./script/generate.sh
Use the Makefile to build for various platforms (e.g., Linux, Windows, macOS):
make all # Builds linux-amd64, darwin-amd64, windows-amd64
make linux-arm64 # Build for specific platform
Supported platforms include:
- Linux:
386, amd64, arm64, armv5-v7, mips, riscv64, loong64, etc.
- Windows:
386, amd64, arm64, armv7
- macOS:
amd64, arm64
- FreeBSD:
amd64, arm64
π€ Contributing
Contributions are welcome! Please follow the Contribution Guidelines for bug fixes, features, or
documentation improvements.
β¨ Special Thanks
A huge thank you to the following outstanding open-source projects that have provided invaluable support for this
project's development! π
| Project |
Description |
Project |
Description |

Gin
|
High-performance Go Web framework
|

Gorm
|
Powerful Go ORM framework
|

Asynq
|
Asynchronous task queue for Go
|

Go-Swagger
|
Comprehensive Go Swagger toolkit
|

Go-Zero
|
Go microservices framework (this project's API generator is built on Go-Zero)
|
π Salute to Open Source: Thank you to the open-source community for making development simpler and more efficient!
Please give these projects a β to support the open-source movement!
π License
This project is licensed under the GPL-3.0 License.