A cross-platform client for connecting to and managing one or more 1Panel servers.
ไธญๆๆๆกฃ | English
- A client for users who manage 1Panel servers from mobile or desktop
- Built around multi-server switching, quick status reading, and common operations in one place
- Designed for daily tasks such as checking server state, browsing files, managing containers, apps, and websites
- 1Panel users who need to manage more than one server
- Operators who want fast access to status and common actions away from the browser
- Early adopters who want to try new client workflows and share feedback
This client provides comprehensive management capabilities for 1Panel servers with 100% API coverage (34 modules, 425+ endpoints):
- Dashboard: Real-time system monitoring with CPU, memory, disk, and network I/O metrics
- File Management: Complete file operations including browse, edit, upload/download, recycle bin, transfer manager, favorites, and mount points
- Container Management: Full Docker lifecycle management with containers, images, compose orchestration, networks, and volumes
- Application Management: App store integration with installation, updates, and lifecycle management
- Website Management: Complete website operations including SSL certificates, domain management, routing rules, and configuration center
- AI Management: Ollama model management, AI agent configuration, GPU monitoring, and domain binding
- Database Management: Full support for MySQL/MariaDB, PostgreSQL, and Redis with backup and user management
- Settings: System configuration, security settings, snapshots, and panel updates
- Firewall Management: Rules, IP whitelist, and port management
- Backup & Restore: Backup accounts, records, and complete recovery operations
- Cronjob Management: Scheduled tasks with execution history and logs
- Runtime Management: PHP extensions/configuration, Node modules/scripts, and Supervisor process management
- SSH Management: SSH settings, certificates, logs, and session management
- Process Management: System process monitoring and control
- Host Management: Host assets and system information
- Command Management: Command execution and history
- Script Library: Script management and execution
- Log Center: System logs and task log viewing
- Toolbox: Device management, disk operations, ClamAV, Fail2ban, and FTP
- OpenResty: Configuration management and source editing
- Monitoring: Real-time metrics with chart visualization
- Terminal: SSH terminal access
- Multi-server switching and management
- Unified logging system with privacy protection (automatic IP masking)
- Complete internationalization (Chinese/English)
- Mobile-optimized interface with tablet support
- Secure authentication with 1Panel API key integration
To use 1Panel Client, you must enable API access on your 1Panel server:
- Enable API & Get Key: Log into your 1Panel Web dashboard. Go to Panel Settings -> API Interface (้ขๆฟ่ฎพ็ฝฎ -> API ๆฅๅฃ). Toggle the API switch to Enable. Copy your API Key.
- Configure IP Whitelist: In the same API settings section, you must add allowed IPs. If you are using a mobile device where your IP changes frequently, add
0.0.0.0/0to allow all IP addresses. If you have a static IP or VPN, add that specific IP. - Install the Client: Install the 1Panel Client app on your device.
- Add Server: Open the app, add a new server by entering your 1Panel server URL (e.g.,
https://panel.example.com:port) and the API Key you copied. - Connect: Test the connection and save. You can now manage your server natively!
debug-*tags publish internal alpha APKs for development verification.beta-*tags publish public preview APKs for feedback collection.pre-release-*tags publish candidate APKs before stable release.release-*tags are reserved for stable releases frommain.- Automatic in-app updates are not available in these channels yet.
- The official feedback channel is GitHub Issues:
- Added terminal workbench, runtime session, and WebSocket transport layers for longer-lived terminal workflows.
- Added the Windows native host bridge, capability whitelist, and tray integration for the desktop track.
- Added adaptive shell routing and server-aware navigation so module switching stays inside the shared shell.
- Added unified API response parsing and exception handling to reduce duplicated network error logic.
- Improved files, databases, websites, logs, monitoring, settings, and security flows across the app.
- Updated iOS and macOS project configuration to keep the native platform track moving forward.
This release is still part of the debug channel and should be validated on the target platform before production use.
- Framework: Flutter 3.16+ with Material Design 3
- Networking: Dio HTTP Client with comprehensive error handling and retry mechanism
- State Management: Provider pattern
- Authentication: MD5 token-based authentication (1Panel-specific)
- Storage: Flutter Secure Storage + SharedPreferences
- Internationalization: Built-in Flutter i18n (English/Chinese)
- Logging: Unified logging system with privacy protection (IP masking)
- Authoritative standards:
AGENTS.md(hard rules for architecture, file size, testing) - File size limits: 1000 LOC hard cap for all code files (excluding docs and generated files)
- Pre-commit baseline:
flutter analyze(mandatory)dart run test/scripts/test_runner.dart unit(mandatory)dart run test/scripts/test_runner.dart integration(when touching API/network)dart run test/scripts/test_runner.dart ui(when touching UI)
- Architecture: One-way dependencies:
Presentation -> State -> Service/Repository -> API/Infra - Logging: Use
appLoggerfromlib/core/services/logger/logger_service.dart, neverprint()ordebugPrint()
This project uses a comprehensive Dio-based networking architecture with complete 1Panel V2 API integration after extensive verification:
After comprehensive analysis and implementation of the 1Panel V2 API, this project provides complete coverage of all documented V2 endpoints. Based on the official V2 OpenAPI specification with 429 API endpoints and multiple verification rounds:
- โ
AI Management -
ai_v2.dart - โ
App Management -
app_v2.dart - โ
Authentication -
auth_v2.dart - โ
Backup Management -
backup_account_v2.dart - โ
Command Management -
command_v2.dart - โ
Container Management -
container_v2.dart,compose_v2.dart - โ
Cronjob Management -
cronjob_v2.dart - โ
Dashboard Management -
dashboard_v2.dart - โ
Database Management -
database_v2.dart - โ
Disk Management -
disk_management_v2.dart - โ
Docker Management -
docker_v2.dart - โ
File Management -
file_v2.dart - โ
Firewall Management -
firewall_v2.dart - โ
Host Management -
host_v2.dart,host_tool_v2.dart - โ
Logs Management -
logs_v2.dart - โ
Monitoring Management -
monitor_v2.dart - โ
OpenResty Management -
openresty_v2.dart - โ
Process Management -
process_v2.dart - โ
Runtime Management -
runtime_v2.dart - โ
Script Library -
script_library_v2.dart - โ
Settings Management -
setting_v2.dart - โ
Snapshot Management -
snapshot_v2.dart - โ
SSH Management -
ssh_v2.dart - โ
SSL Management -
ssl_v2.dart - โ
System Group Management -
system_group_v2.dart - โ
Task Log Management -
task_log_v2.dart - โ
Terminal Management -
terminal_v2.dart - โ
Toolbox Management -
toolbox_v2.dart - โ
Update Management -
update_v2.dart - โ
User Management -
user_v2.dart - โ
Website Management -
website_v2.dart,website_group_v2.dart
- DioClient: Unified HTTP client with automatic retry and error handling
- Interceptors:
- Authentication: 1Panel-specific MD5 token generation
- MD5 hash:
MD5("1panel" + apiKey + timestamp)(matches server implementation) - Automatic timestamp and signature headers (
1Panel-Token,1Panel-Timestamp)
- MD5 hash:
- Logging (Debug mode only)
- Retry mechanism with exponential backoff
- Error handling with custom exception types
- Authentication: 1Panel-specific MD5 token generation
- API Client Management: Centralized client management for multiple servers
- Type Safety: Strong-typed data models with comprehensive API integration
- โ Round 1: Initial API implementation and authentication architecture
- โ Round 2: Deep module analysis and gap identification
- โ Round 3: Final integrity verification - Production ready status confirmed
- โ Round 4: OpenAPI V2 specification analysis with 100% coverage verification
- โ Current Status: All 34 API modules implemented with 60+ data models
- โ Automatic Retry: Configurable retry with exponential backoff
- โ Error Handling: Unified exception handling with custom types
- โ Logging: Comprehensive request/response logging with privacy protection
- โ 1Panel Authentication: Server-compatible MD5 token generation with proper headers
- โ
API Path Management: Automatic
/api/v2prefix handling for all endpoints - โ Constants Management: Unified API configuration and path management
- โ Complete Type Safety: All 425+ endpoints with strongly-typed models
- โ Unified Architecture: Consistent patterns across all API clients
- โ Build Integration: Automated code generation for models and serialization
- โ Timeout Management: Configurable timeouts for all operations
- โ Multi-server Support: Manage multiple 1Panel instances
- โ Complete V2 API Coverage: All documented endpoints across 34 V2 API modules
- โ Strong-Typed Models: 60+ comprehensive data model files with JSON serialization
- โ Privacy Protection: Automatic public IP masking in logs
Total Coverage: 425+ API endpoints across all functional areas from official 1Panel V2 documentation
API Files: 34 total modules with complete implementation Data Models: 60+ comprehensive model files covering all functional areas with JSON serialization Code Quality: All files follow strict LOC limits (โค1000 LOC hard cap)
- AI Management: Complete Ollama model integration and GPU monitoring
- Application Management: Full app store integration and lifecycle management
- Authentication: Login, logout, and session management
- Backup Management: Complete backup operations and recovery functionality
- Command Management: Command execution and management
- Container Management: Full Docker container, image, and compose management
- Cronjob Management: Scheduled tasks with execution logs and statistics
- Dashboard Management: System dashboard and overview
- Database Management: Complete database operations with strong typing
- Disk Management: Disk operations and management
- Docker Management: Docker service and integration management
- File Management: Comprehensive file operations and transfer capabilities
- Firewall Management: Complete firewall rules and port management
- Host Management: Complete host monitoring and system management
- Logs Management: System logging and analysis
- Monitoring Management: System metrics and alert management
- OpenResty Management: OpenResty configuration and management
- Process Management: Process monitoring and control
- Runtime Management: Complete runtime environment management
- Script Library: Script management and execution
- Settings Management: System configuration and snapshot management
- Snapshot Management: System backup snapshots and recovery
- SSH Management: SSH configuration and key management
- SSL Management: SSL certificate lifecycle and ACME integration
- System Group Management: Complete system user and group management
- Task Log Management: Task execution logs and history
- Terminal Management: SSH session and command execution
- Toolbox Management: System tools and utilities
- Update Management: System update and upgrade management
- User Management: Authentication, roles, and permissions
- Website Management: Full website, domain, SSL, and proxy management
Complete Data Model Coverage (60+ files):
common_models.dart- Shared models (OperateByID, PageResult, etc.)ai_models.dart- AI and Ollama management modelsapp_models.dart,app_config_models.dart,app_store_models.dart- Application managementauth_models.dart- Authentication and session modelsbackup_account_models.dart,backup_models.dart,backup_request_models.dart- Backup operationscommand_models.dart- Command execution modelscontainer_models.dart,container_extension_models.dart- Container lifecycle and resourcescronjob_models.dart+ 4 related files - Complete cronjob managementdashboard_models.dart- Dashboard and overview modelsdatabase_models.dart,database_option_models.dart- Database management with enumsdisk_management_models.dart- Disk operations modelsdocker_models.dart- Docker service modelsfile_models.dart,file_transfer_models.dart- File operations and transfersfirewall_models.dart- Firewall rules and port managementhost_models.dart+ 3 related files - Complete host managementlogs_models.dart- Comprehensive logging system modelsmonitoring_models.dart- System metrics and alertsopenresty_models.dart- OpenResty configuration modelsprocess_models.dart+ 2 related files - Process managementruntime_models.dart- Runtime environment modelsscript_library_models.dart- Script management modelssecurity_models.dart- Security scanning and access controlsetting_models.dart- System configuration modelssnapshot_models.dart- Backup snapshot modelsssh_*.dart(4 files) - Complete SSH managementssl_models.dart- SSL certificate and ACME modelssystem_group_models.dart- System group managementtask_log_models.dart- Task execution logsterminal_models.dart- Terminal and SSH session modelstoolbox_models.dart,tool_models.dart- System toolsupdate_models.dart,upgrade_models.dart- Update managementuser_models.dart- User authentication and roleswebsite_models.dart,website_group_models.dart- Website management- Plus specialized subdirectories:
ai/,file/,runtime/for complex models
Consistent Patterns:
- All APIs use
ApiConstants.buildApiPath()for/api/v2prefix - Strong-typed request/response models with Equatable
- Unified error handling and response parsing
- Consistent parameter naming and documentation
- Standardized async/await patterns
- Flutter 3.16+ or later
- Dart 3.6+
- Access to a 1Panel server with API access enabled
-
Clone the repository
git clone <repository-url> cd 1Panel-Client
-
Install dependencies
flutter pub get
-
Configure your 1Panel server
- Add server configuration in the app settings
- Ensure API access is enabled on your 1Panel server
- Get your API key from the 1Panel admin panel (Settings โ API Interface)
- Authentication: Uses API Key + Timestamp (MD5 token), no username/password required
- Token format:
MD5("1panel" + apiKey + timestamp) - Headers:
1Panel-Tokenand1Panel-Timestamp
- Token format:
-
Run the application
# Debug mode flutter run # Release mode flutter run --release
- โ Android: Full support
- โ iOS: Full support
- โ Web: Supported (with limitations)
- โ Windows: Supported (with limitations)
- โ macOS: Supported (with limitations)
lib/
โโโ api/v2/ # Type-safe API clients (1Panel V2 APIs) - 34 modules
โ โโโ ai_v2.dart # AI management API โ
โ โโโ app_v2.dart # Application management API โ
โ โโโ auth_v2.dart # Authentication API โ
โ โโโ backup_account_v2.dart # Backup account API โ
โ โโโ command_v2.dart # Command management API โ
โ โโโ compose_v2.dart # Docker Compose API โ
โ โโโ container_v2.dart # Container management API โ
โ โโโ cronjob_v2.dart # Cronjob management API โ
โ โโโ dashboard_v2.dart # Dashboard API โ
โ โโโ database_v2.dart # Database management API โ
โ โโโ disk_management_v2.dart # Disk management API โ
โ โโโ docker_v2.dart # Docker service API โ
โ โโโ file_v2.dart # File management API โ
โ โโโ firewall_v2.dart # Firewall management API โ
โ โโโ host_v2.dart # Host management API โ
โ โโโ host_tool_v2.dart # Host tools API โ
โ โโโ logs_v2.dart # Logging system API โ
โ โโโ monitor_v2.dart # Monitoring API โ
โ โโโ openresty_v2.dart # OpenResty API โ
โ โโโ process_v2.dart # Process management API โ
โ โโโ runtime_v2.dart # Runtime management API โ
โ โโโ script_library_v2.dart # Script library API โ
โ โโโ setting_v2.dart # Settings API โ
โ โโโ snapshot_v2.dart # Snapshot API โ
โ โโโ ssh_v2.dart # SSH management API โ
โ โโโ ssl_v2.dart # SSL management API โ
โ โโโ system_group_v2.dart # System group API โ
โ โโโ task_log_v2.dart # Task log API โ
โ โโโ terminal_v2.dart # Terminal API โ
โ โโโ toolbox_v2.dart # Toolbox API โ
โ โโโ update_v2.dart # Update management API โ
โ โโโ user_v2.dart # User management API โ
โ โโโ website_v2.dart # Website management API โ
โ โโโ website_group_v2.dart # Website group API โ
โโโ core/ # Core functionality
โ โโโ config/ # Application configuration
โ โ โโโ api_constants.dart # API constants and paths โ
โ โ โโโ api_config.dart # API configuration management โ
โ โ โโโ logger_config.dart # Logger configuration โ
โ โโโ network/ # Networking layer
โ โ โโโ dio_client.dart # Dio HTTP client wrapper โ
โ โ โโโ network_exceptions.dart # Custom exception types โ
โ โ โโโ interceptors/ # Request interceptors
โ โ โโโ auth_interceptor.dart # 1Panel authentication โ
โ โ โโโ logging_interceptor.dart # Request/response logging โ
โ โ โโโ retry_interceptor.dart # Automatic retry โ
โ โ โโโ business_response_interceptor.dart # Business logic handling โ
โ โโโ services/ # Core services
โ โ โโโ logger/
โ โ โโโ logger_service.dart # Unified logging with IP masking โ
โ โ โโโ log_file_manager_service.dart # Log file management โ
โ โ โโโ log_preferences_service.dart # Log preferences โ
โ โโโ i18n/ # Internationalization
โ โโโ app_localizations.dart # Localizations โ
โโโ data/ # Data layer
โ โโโ models/ # Strong-typed data models (60+ files)
โ โโโ common_models.dart # Shared models โ
โ โโโ ai_models.dart # AI management models โ
โ โโโ app_models.dart # Application models โ
โ โโโ auth_models.dart # Authentication models โ
โ โโโ backup_account_models.dart # Backup models โ
โ โโโ container_models.dart # Container models โ
โ โโโ cronjob_models.dart # Cronjob models โ
โ โโโ dashboard_models.dart # Dashboard models โ
โ โโโ database_models.dart # Database models โ
โ โโโ file_models.dart # File management models โ
โ โโโ host_models.dart # Host management models โ
โ โโโ logs_models.dart # Logging system models โ
โ โโโ system_group_models.dart # System group models โ
โ โโโ ... (50+ other model files) # Complete model coverage
โโโ features/ # Feature modules
โ โโโ ai/ # AI management feature
โ โโโ dashboard/ # Dashboard feature
โ โโโ settings/ # Settings feature
โโโ pages/ # UI pages
โ โโโ server/ # Server configuration pages
โ โโโ settings/ # Settings pages
โโโ shared/ # Shared components
โ โโโ widgets/ # Reusable UI components
โ โโโ app_card.dart # Material Design card
โโโ main.dart # Application entry point
# Install dependencies
flutter pub get
# Run the app in debug mode
flutter run
# Run the app in release mode
flutter run --release
# Run tests
flutter test
# Analyze code for issues
flutter analyze
# Build for production
flutter build apk --release
flutter build appbundleThe project uses Retrofit for type-safe API clients. After modifying API definitions, run:
flutter packages pub run build_runner buildThe app uses a comprehensive logging system with appLogger. Logs are:
- Filtered by build mode (verbose in debug, minimal in release)
- Categorized by package for easy filtering
- Structured with proper formatting and context
All network requests go through the modern DioClient with:
- Automatic retry (3 attempts with exponential backoff)
- Error handling with custom exception types
- Request logging (debug mode only)
- 1Panel Server Authentication with automatic MD5 token generation and signature verification
- API Path Management with automatic
/api/v2prefix handling
The app integrates with 1Panel V2 API using:
- Type-safe clients generated by Retrofit
- 1Panel-Specific Authentication:
- MD5 hash generation:
MD5("1panel" + apiKey + timestamp)(matches server implementation) - Automatic timestamp and signature headers (
1Panel-Token,1Panel-Timestamp) - Dynamic token refresh and validation
- API Path Prefix: All endpoints use
/api/v2prefix
- MD5 hash generation:
- Comprehensive error handling for network issues
- Multi-server support for managing multiple 1Panel instances
-
Request Preparation: Each API request automatically includes:
1Panel-Token: MD5 hash of("1panel" + apiKey + timestamp)1Panel-Timestamp: Current timestamp in seconds (server requirement)Content-Type:application/jsonAccept:application/jsonUser-Agent:1Panel-Flutter-App/1.0.0
-
MD5 Token Generation (matching server-side implementation):
// Server expects: MD5("1panel" + apiKey + timestamp) final authString = '1panel$apiKey$timestamp'; final token = md5.convert(utf8.encode(authString)).toString();
-
API Path Structure: All endpoints use
/api/v2prefix:// Example: /api/v2/ai/ollama/model final fullPath = '/api/v2$endpoint';
-
Automatic Header Injection: All required headers are automatically added to every request
- No print statements: Uses the unified logging system
- Type safety: Retrofit-generated API clients
- Error handling: Comprehensive exception handling
- Testing: Mockito for testing network operations
- Code organization: Clean architecture with clear separation of concerns
- Deployment Guide - Build and deploy the app
- User Guide - Complete user manual
- Testing Guide - Testing documentation
- Privacy Policy
- Terms of Service
- Logging Policy
- Third-Party Licenses
- Security Policy
- Contributing Guide
- Code of Conduct
- 1Panel V2 API Specification - Swagger/OpenAPI specification from the 1Panel submodule
- Follow the established code conventions
- Use the unified logging system (no print statements)
- Write tests for new features
- Update documentation as needed
- Follow the clean architecture principles
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
- โ Free to use - Use this software for any purpose
- โ Free to study - Access and study the source code
- โ Free to share - Redistribute copies of the software
- โ Free to modify - Modify and distribute your modifications
โ ๏ธ Must disclose source - If you distribute this software or derivatives, you must provide the source codeโ ๏ธ Same license - Derivative works must be licensed under GPL-3.0โ ๏ธ State changes - You must document changes you make to the software
See LICENSE for the full license text.
- 1Panel Server - The 1Panel server
- Dio HTTP Client - The HTTP client library we use
- Flutter - The UI framework