├── .gitignore └── README.md /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfect-panel/ppanel/67287d47733e81659d0570daa72158fd2b594bb6/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PPanel 2 | 3 | Perfect Panel release page. 4 | 5 | # Sponsor 6 | [![Deployed on Zeabur](https://zeabur.com/deployed-on-zeabur-dark.svg)](https://zeabur.com?referralCode=PPanelGroup&utm_source=PPanelGroup&utm_campaign=oss) 7 | 8 | ## Usage 9 | 10 | ### 1. Configuration File Path 11 | 12 | The default configuration file path is ./etc/ppanel.yaml. You can specify a custom path using the --config startup parameter. 13 | 14 | ### 2. Configuration File Format 15 | 16 | The configuration file uses the YAML format, supports comments, and should be named xxx.yaml. 17 | 18 | ```yaml 19 | # Sample Configuration File 20 | Host: # Service listening address, default: 0.0.0.0 21 | Port: # Service listening port, default: 8080 22 | Debug: # Enable debug mode; disables backend logging when enabled, default: false 23 | JwtAuth: # JWT authentication settings 24 | AccessSecret: # Access token secret, default: randomly generated 25 | AccessExpire: # Access token expiration time in seconds, default: 604800 26 | Logger: # Logging configuration 27 | FilePath: # Log file path, default: ./ppanel.log 28 | MaxSize: # Maximum log file size in MB, default: 50 29 | MaxBackup: # Maximum number of log file backups, default: 3 30 | MaxAge: # Maximum log file retention time in days, default: 30 31 | Compress: # Whether to compress log files, default: true 32 | Level: # Logging level, default: info; options: debug, info, warn, error, panic, fatal 33 | MySQL: 34 | Addr: # MySQL address, required 35 | Username: # MySQL username, required 36 | Password: # MySQL password, required 37 | Dbname: # MySQL database name, required 38 | Config: # MySQL configuration, default: charset=utf8mb4&parseTime=true&loc=Asia%2FShanghai 39 | MaxIdleConns: # Maximum idle connections, default: 10 40 | MaxOpenConns: # Maximum open connections, default: 100 41 | LogMode: # Log level, default: info; options: debug, error, warn, info 42 | LogZap: # Whether to use zap for SQL logging, default: true 43 | SlowThreshold: # Slow query threshold in milliseconds, default: 1000 44 | Redis: 45 | Host: # Redis address, default: localhost:6379 46 | Pass: # Redis password, default: "" 47 | DB: # Redis database, default: 0 48 | 49 | Administer: 50 | Email: # Admin login email, default: admin@ppanel.dev 51 | Password: # Admin login password, default: password 52 | ``` 53 | 54 | ### 3.Configuration Descriptions 55 | 56 | - Host: Service listening address, default: 0.0.0.0 57 | 58 | - Port: Service listening port, default: 8080 59 | - Debug: Enable debug mode; disables backend logging when enabled, default: false 60 | 61 | - JwtAuth: JWT authentication settings 62 | 63 | - AccessSecret: Access token secret, default: randomly generated 64 | 65 | - AccessExpire: Access token expiration time in seconds, default: 604800 66 | 67 | - Logger: Logging configuration 68 | 69 | - FilePath: Log file path, default: ./ppanel.log 70 | 71 | - MaxSize: Maximum log file size in MB, default: 50 72 | 73 | - MaxBackup: Maximum number of log file backups, default: 3 74 | 75 | - MaxAge: Maximum log file retention time in days, default: 30 76 | 77 | - Compress: Whether to compress log files, default: true 78 | 79 | - Level: Logging level, default: info; options: debug, info, warn, error, panic, fatal 80 | 81 | - MySQL: MySQL configuration 82 | 83 | - Addr: MySQL address, required 84 | 85 | - Username: MySQL username, required 86 | 87 | - Password: MySQL password, required 88 | 89 | - Dbname: MySQL database name, required 90 | 91 | - Config: MySQL configuration, default: charset=utf8mb4&parseTime=true&loc=Asia%2FShanghai 92 | 93 | - MaxIdleConns: Maximum idle connections, default: 10 94 | 95 | - MaxOpenConns: Maximum open connections, default: 100 96 | 97 | - LogMode: Log level, default: info; options: debug, error, warn, info 98 | 99 | - LogZap: Whether to use zap for SQL logging, default: true 100 | 101 | - SlowThreshold: Slow query threshold in milliseconds, default: 1000 102 | 103 | - Redis: Redis configuration 104 | 105 | - Host: Redis address, default: localhost:6379 106 | 107 | - Pass: Redis password, default: "" 108 | 109 | - DB: Redis database, default: 0 110 | 111 | - Administer: Admin login configuration 112 | 113 | - Email: Admin login email, default: 114 | 115 | - Password: Admin login password, default: password 116 | 117 | ### 4. Environment Variables 118 | 119 | Supported environment variables are as follows: 120 | 121 | | Environment Variable | Configuration | Example | 122 | |-----------------------|---------------|:-------------------------------------------| 123 | | PPANEL_DB | MySQL config | root:password@tcp(localhost:3306)/vpnboard | 124 | | PPANEL_REDIS | Redis config | redis://localhost:6379 | 125 | --------------------------------------------------------------------------------